Skip to content

Commit

Permalink
preference ID fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
syslogic committed Aug 7, 2023
1 parent 9222473 commit 68cef0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mobile/src/main/java/io/syslogic/github/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public final class Constants {
@NonNull public static final Integer RECYCLERVIEW_DEFAULT_PAGE_SIZE = 30;

/** Preference Keys */
@NonNull public static final String PREFERENCE_KEY_PERSONAL_ACCESS_TOKEN = "personal_access_token";
@NonNull public static final String PREFERENCE_KEY_ACCOUNT_SETTINGS = "account_settings";
@NonNull public static final String PREFERENCE_KEY_WORKSPACE_DIRECTORY = "workspace_directory";

@NonNull public static final String PREFERENCE_KEY_SHOW_REPOSITORY_TOPICS = "show_repository_topics";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,11 @@ public void onCreatePreferences(@Nullable Bundle savedInstanceState, @Nullable S
this.setPreferencesFromResource(resId, rootKey);

/* Preference: Account Manager */
Preference pref = this.findPreference(Constants.PREFERENCE_KEY_PERSONAL_ACCESS_TOKEN);
Preference pref = this.findPreference(Constants.PREFERENCE_KEY_ACCOUNT_SETTINGS);
if (pref != null) {

String accessToken = TokenHelper.getAccessToken(requireContext());
if (accessToken != null) {
pref.setSummary(R.string.summary_personal_access_token);
}
if (accessToken != null) {pref.setSummary(R.string.summary_personal_access_token);}

pref.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent();
Expand Down

0 comments on commit 68cef0c

Please sign in to comment.