Skip to content

Commit

Permalink
Remove incorrect warning text from the security screen
Browse files Browse the repository at this point in the history
This happened when the user accessed the security screen while the
repository was locked. The message was "The security options are not
available for blind repositories", but given that the user did in fact
enter the security screen means that they had a password to the repo and
thus it was a locked repo as opposed to a blind one.
  • Loading branch information
inetic committed Sep 18, 2024
1 parent 47b30e8 commit 71d6f4a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/app/pages/repo_security_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class RepoSecurityPage extends StatelessWidget {
content: PopScope(
canPop: false,
onPopInvoked: (didPop) => _onPopInvoked(context, didPop, cubit.state),
child: RepoSecurity(cubit, repo.state.accessMode == AccessMode.blind),
// We know the `currentLocalSecret` so the repository is not blind.
child: RepoSecurity(cubit, isBlind: false),
),
footer: BlocBuilder<RepoSecurityCubit, RepoSecurityState>(
bloc: cubit,
Expand Down
2 changes: 1 addition & 1 deletion lib/app/widgets/repo_creation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class RepoCreation extends StatelessWidget {
_buildUseCacheServersSwitch(context, creationState),
RepoSecurity(
securityCubit,
creationState.accessMode == AccessMode.blind,
isBlind: creationState.accessMode == AccessMode.blind,
),
],
);
Expand Down
4 changes: 2 additions & 2 deletions lib/app/widgets/repo_security.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import 'widgets.dart';

class RepoSecurity extends StatelessWidget {
const RepoSecurity(
this.cubit,
this.isBlind, {
this.cubit, {
required this.isBlind,
super.key,
});

Expand Down

0 comments on commit 71d6f4a

Please sign in to comment.