Skip to content

Commit

Permalink
fix(YouTube - SponsorBlock): Adjust import/export UI text (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
LisoUseInAIKyrios committed Oct 2, 2023
1 parent a198ef8 commit 4215be4
Showing 1 changed file with 9 additions and 2 deletions.
Expand Up @@ -72,7 +72,7 @@ private void updateUI() {
} else if (!SettingsEnum.SB_CREATE_NEW_SEGMENT.getBoolean()) {
SponsorBlockViewController.hideNewSegmentLayout();
}
// voting and add new segment buttons automatically shows/hides themselves
// Voting and add new segment buttons automatically shows/hide themselves.

sbEnabled.setChecked(enabled);

Expand Down Expand Up @@ -109,6 +109,12 @@ private void updateUI() {
privateUserId.setText(SettingsEnum.SB_PRIVATE_USER_ID.getString());
privateUserId.setEnabled(enabled);

// If the user has a private user id, then include a subtext that mentions not to share it.
String exportSummarySubText = SponsorBlockSettings.userHasSBPrivateId()
? str("sb_settings_ie_sum_warning")
: "";
importExport.setSummary(str("sb_settings_ie_sum", exportSummarySubText));

apiUrl.setEnabled(enabled);
importExport.setEnabled(enabled);
segmentCategory.setEnabled(enabled);
Expand Down Expand Up @@ -329,6 +335,7 @@ private void addGeneralCategory(final Context context, PreferenceScreen screen)
return false;
}
SettingsEnum.SB_PRIVATE_USER_ID.saveValue(newUUID);
updateUI();
fetchAndDisplayStats();
return true;
});
Expand Down Expand Up @@ -375,7 +382,7 @@ protected void onPrepareDialogBuilder(AlertDialog.Builder builder) {
}
};
importExport.setTitle(str("sb_settings_ie"));
importExport.setSummary(str("sb_settings_ie_sum"));
// Summary is set in updateUI()
importExport.getEditText().setInputType(InputType.TYPE_CLASS_TEXT
| InputType.TYPE_TEXT_FLAG_MULTI_LINE
| InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
Expand Down

0 comments on commit 4215be4

Please sign in to comment.