Fix crashes
This commit is contained in:
parent
4ccd299fda
commit
d97a78362c
|
@ -99,7 +99,9 @@ public class SpannableHelper {
|
||||||
public static Spannable convert(Context context, String text,
|
public static Spannable convert(Context context, String text,
|
||||||
Status status, Account account, Announcement announcement,
|
Status status, Account account, Announcement announcement,
|
||||||
WeakReference<View> viewWeakReference, Status.Callback callback) {
|
WeakReference<View> viewWeakReference, Status.Callback callback) {
|
||||||
|
if (text == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
int currentNightMode = context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
|
int currentNightMode = context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
|
||||||
boolean customLight = sharedpreferences.getBoolean(context.getString(R.string.SET_CUSTOMIZE_LIGHT_COLORS), false);
|
boolean customLight = sharedpreferences.getBoolean(context.getString(R.string.SET_CUSTOMIZE_LIGHT_COLORS), false);
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class FragmentMediaProfile extends Fragment {
|
||||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
flagLoading = false;
|
flagLoading = false;
|
||||||
accountsVM = new ViewModelProvider(FragmentMediaProfile.this).get(AccountsVM.class);
|
accountsVM = new ViewModelProvider(requireActivity()).get(AccountsVM.class);
|
||||||
mediaStatuses = new ArrayList<>();
|
mediaStatuses = new ArrayList<>();
|
||||||
|
|
||||||
if (checkRemotely) {
|
if (checkRemotely) {
|
||||||
|
|
Loading…
Reference in New Issue