1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-22 14:47:29 +00:00

more crash resolution and home decor

This commit is contained in:
Austin Huang 2020-09-10 15:57:07 -04:00
parent c9bd85cbf3
commit 73a9e627d9
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
4 changed files with 26 additions and 11 deletions

View File

@ -346,9 +346,14 @@ public final class FollowViewerFragment extends Fragment implements SwipeRefresh
groups.add(group);
}
adapter = new FollowAdapter(requireContext(), clickListener, groups);
adapter.toggleGroup(0);
binding.rvFollow.setAdapter(adapter);
try {
adapter = new FollowAdapter(requireContext(), clickListener, groups);
adapter.toggleGroup(0);
binding.rvFollow.setAdapter(adapter);
}
catch (IllegalStateException e) {
// do nothing
}
}
public void stopCurrentExecutor() {

View File

@ -56,7 +56,8 @@ public class MorePreferencesFragment extends BasePreferencesFragment {
// screen.addPreference(new MoreHeaderPreference(requireContext()));
final PreferenceCategory accountCategory = new PreferenceCategory(requireContext());
accountCategory.setTitle("Account");
accountCategory.setTitle(R.string.account);
accountCategory.setSummary(R.string.account_hint);
accountCategory.setIconSpaceReserved(false);
screen.addPreference(accountCategory);
// To re-login, user can just add the same account back from account switcher dialog
@ -116,11 +117,16 @@ public class MorePreferencesFragment extends BasePreferencesFragment {
divider.setLayoutResource(R.layout.item_pref_divider);
screen.addPreference(divider);
final Preference versionPreference = getPreference(R.string.version, BuildConfig.VERSION_NAME, -1, preference -> {
final Preference versionPreference = getPreference(R.string.version,
BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ")", -1, preference -> {
FlavorTown.updateCheck((AppCompatActivity) requireActivity(), true);
return true;
});
screen.addPreference(versionPreference);
final Preference reminderPreference = getPreference(R.string.reminder, R.string.reminder_summary, R.drawable.ic_warning, null);
reminderPreference.setEnabled(false);
screen.addPreference(reminderPreference);
}
@Override

View File

@ -43,7 +43,7 @@ public class SettingsPreferencesFragment extends BasePreferencesFragment {
isLoggedIn = !TextUtils.isEmpty(cookie) && CookieUtils.getUserIdFromCookie(cookie) != null;
final PreferenceCategory generalCategory = new PreferenceCategory(requireContext());
screen.addPreference(generalCategory);
generalCategory.setTitle(getString(R.string.pref_category_general));
generalCategory.setTitle(R.string.pref_category_general);
generalCategory.setIconSpaceReserved(false);
generalCategory.addPreference(getDefaultTabPreference());
generalCategory.addPreference(getUpdateCheckPreference());
@ -52,21 +52,21 @@ public class SettingsPreferencesFragment extends BasePreferencesFragment {
final PreferenceCategory themeCategory = new PreferenceCategory(requireContext());
screen.addPreference(themeCategory);
themeCategory.setTitle(getString(R.string.pref_category_theme));
themeCategory.setTitle(R.string.pref_category_theme);
themeCategory.setIconSpaceReserved(false);
themeCategory.addPreference(getThemePreference());
themeCategory.addPreference(getAmoledThemePreference());
final PreferenceCategory downloadsCategory = new PreferenceCategory(requireContext());
screen.addPreference(downloadsCategory);
downloadsCategory.setTitle(getString(R.string.pref_category_downloads));
downloadsCategory.setTitle(R.string.pref_category_downloads);
downloadsCategory.setIconSpaceReserved(false);
downloadsCategory.addPreference(getDownloadUserFolderPreference());
downloadsCategory.addPreference(getSaveToCustomFolderPreference());
final PreferenceCategory localeCategory = new PreferenceCategory(requireContext());
screen.addPreference(localeCategory);
localeCategory.setTitle(getString(R.string.pref_category_locale));
localeCategory.setTitle(R.string.pref_category_locale);
localeCategory.setIconSpaceReserved(false);
localeCategory.addPreference(getLanguagePreference());
localeCategory.addPreference(getPostTimePreference());

View File

@ -259,6 +259,8 @@
<string name="pref_category_theme">Theme</string>
<string name="pref_category_downloads">Downloads</string>
<string name="pref_category_locale">Locale</string>
<string name="account">Account</string>
<string name="account_hint">Current login not working? Simply add the account again.</string>
<string name="add_account">Add account</string>
<string name="about_category_license">License (English only)</string>
<string name="about_documentation">Visit our website</string>
@ -267,6 +269,8 @@
<string name="about_repository_summary">Audit, star, report bugs, contribute, and have fun (again)!</string>
<string name="about_feedback">Send feedback by email</string>
<string name="about_feedback_summary" translatable="false">instagrabber@austinhuang.me</string>
<string name="about_category_3pt">Third-Party Libraries</string>
<string name="about_category_3pt_summary">The following third-party libraries are used in this app:</string>
<string name="about_category_3pt">Third-Party Attributions</string>
<string name="about_category_3pt_summary">The following third-party open-source libraries are used:</string>
<string name="reminder">Reminder</string>
<string name="reminder_summary">Please use this app responsibly. Downloaded images should only be used for purposes allowed by applicable laws.</string>
</resources>