Crash fixes

This commit is contained in:
Grishka 2024-06-29 09:11:03 +03:00
parent 65c1b4def0
commit 1e729d97a0
3 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ public class GlobalUserPreferences{
public static boolean playGifs; public static boolean playGifs;
public static boolean useCustomTabs; public static boolean useCustomTabs;
public static boolean altTextReminders, confirmUnfollow, confirmBoost, confirmDeletePost; public static boolean altTextReminders, confirmUnfollow, confirmBoost, confirmDeletePost;
public static ThemePreference theme; public static ThemePreference theme=ThemePreference.AUTO;
private static SharedPreferences getPrefs(){ private static SharedPreferences getPrefs(){
return MastodonApp.context.getSharedPreferences("global", Context.MODE_PRIVATE); return MastodonApp.context.getSharedPreferences("global", Context.MODE_PRIVATE);

View File

@ -94,7 +94,7 @@ public class AccountSessionManager{
Log.e(TAG, "Error loading accounts", x); Log.e(TAG, "Error loading accounts", x);
} }
lastActiveAccountID=prefs.getString("lastActiveAccount", null); lastActiveAccountID=prefs.getString("lastActiveAccount", null);
MastodonAPIController.runInBackground(()->readInstanceInfo(domains)); readInstanceInfo(domains);
maybeUpdateShortcuts(); maybeUpdateShortcuts();
} }

View File

@ -544,7 +544,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements ComposeE
ignoreSelectionChanges=true; ignoreSelectionChanges=true;
mainEditText.setSelection(mainEditText.length()); mainEditText.setSelection(mainEditText.length());
ignoreSelectionChanges=false; ignoreSelectionChanges=false;
mediaViewController.onViewCreated(savedInstanceState);; mediaViewController.onViewCreated(savedInstanceState);
}else{ }else{
String prefilledText=getArguments().getString("prefilledText"); String prefilledText=getArguments().getString("prefilledText");
if(!TextUtils.isEmpty(prefilledText)){ if(!TextUtils.isEmpty(prefilledText)){