diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java index 406d74673..232c20487 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java @@ -211,7 +211,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr else charLimit=500; - loadDefaultStatusVisibility(savedInstanceState); + if (editingStatus == null) loadDefaultStatusVisibility(savedInstanceState); } @Override diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java index 53ee3d297..50be8f64c 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -281,7 +281,7 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList username+="@"+AccountSessionManager.getInstance().getAccount(accountID).domain; } getActivity().getSystemService(ClipboardManager.class).setPrimaryClip(ClipData.newPlainText(null, "@"+username)); - if(Build.VERSION.SDK_INT props=Class.forName("android.os.SystemProperties"); + Method get=props.getMethod("get", String.class); + return (String)get.invoke(null, key); + }catch(Exception ignore){} + return null; + } + + public static boolean isMIUI(){ + return !TextUtils.isEmpty(getSystemProperty("ro.miui.ui.version.code")); + } }