Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,15 @@ public void buildAdsSection(boolean buildCategory){
}
}

public void buildNativeSection(){
public void buildNativeSection(boolean buildCategory){
if (!(SettingsStatus.enableNativeSection())) return;

if (!buildCategory) {
Preference nativePageDescription = new Preference(context);
nativePageDescription.setSummary(strRes("piko_pref_native_page_desc"));
addPreference(nativePageDescription);
}

LegacyTwitterPreferenceCategory category = preferenceCategory(strRes("piko_title_native_downloader"));
if (SettingsStatus.nativeDownloader) {
addPreference(category,
Expand Down Expand Up @@ -423,16 +429,6 @@ public void buildMiscSection(boolean buildCategory){
);
}

if (SettingsStatus.browserChooserEnabled) {
addPreference(category,
helper.switchPreference(
strRes("piko_pref_browser_chooser"),
strRes("piko_pref_browser_chooser_desc"),
Settings.MISC_BROWSER_CHOOSER
)
);
}

if (SettingsStatus.roundOffNumbers) {
addPreference(category,
helper.switchPreference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public class Settings extends BaseSettings {
public static final BooleanSetting MISC_HIDE_RECOMMENDED_USERS = new BooleanSetting("misc_hide_recommended_users", true);
public static final BooleanSetting MISC_HIDE_COMM_NOTES = new BooleanSetting("misc_hide_comm_notes", false);
public static final BooleanSetting MISC_HIDE_VIEW_COUNT = new BooleanSetting("misc_hide_view_count", true);
public static final BooleanSetting MISC_BROWSER_CHOOSER = new BooleanSetting("misc_browser_chooser", false);
public static final StringSetting MISC_FEATURE_FLAGS = new StringSetting("misc_feature_flags", "");
public static final StringSetting MISC_FEATURE_FLAGS_SEARCH = new StringSetting("misc_feature_flags_search", "");
public static final BooleanSetting MISC_ROUND_OFF_NUMBERS = new BooleanSetting("misc_round_off_numbers", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public class SettingsStatus {
public static boolean hideLiveThreads = false;
public static boolean hideBanner = false;
public static boolean showPollResultsEnabled = false;
public static boolean browserChooserEnabled = false;
public static boolean featureFlagsEnabled = false;
public static boolean forceTranslate = false;
public static boolean enableForceHD = false;
Expand Down Expand Up @@ -146,10 +145,6 @@ public static void enableFeatureFlags() {
FeatureSwitchPatch.getFeatureFlagSearchItems();
}

public static void enableBrowserChooser() {
browserChooserEnabled = true;
}

public static void hideRecommendedUsers() {
hideRecommendedUsers = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
screenBuilder.buildExportSection(false);
toolbarText = "piko_title_backup";
}else if (bundle.getBoolean(Settings.NATIVE_SECTION.key, false)) {
screenBuilder.buildNativeSection();
screenBuilder.buildNativeSection(false);
toolbarText = "piko_title_native";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public void onCreate(@org.jetbrains.annotations.Nullable Bundle savedInstanceSta
flags.put(strRes("piko_pref_show_sensitive_media"),SettingsStatus.showSensitiveMedia);
flags.put(strRes("piko_pref_selectable_text"),SettingsStatus.selectableText);
flags.put(strRemoveRes("piko_pref_rec_users"),SettingsStatus.hideRecommendedUsers);
flags.put(strRes("piko_pref_browser_chooser"),SettingsStatus.browserChooserEnabled);
flags.put(strRes("piko_pref_custom_share_domain"),SettingsStatus.customSharingDomainEnabled);
flags.put(strRes("piko_pref_feature_flags"),SettingsStatus.featureFlagsEnabled);
flags.put(strRes("piko_pref_customisation_profiletabs"),SettingsStatus.profileTabCustomisation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
screenBuilder.buildDownloadSection(buildCategory);
screenBuilder.buildFeatureFlagsSection(buildCategory);
screenBuilder.buildAdsSection(buildCategory);
screenBuilder.buildNativeSection();
screenBuilder.buildNativeSection(buildCategory);
screenBuilder.buildMiscSection(buildCategory);
screenBuilder.buildCustomiseSection(buildCategory);
screenBuilder.buildTimelineSection(buildCategory);
Expand Down