fix NPE in SettingsFrame

This commit is contained in:
Mike Schwörer 2018-11-23 18:42:10 +01:00
parent d7afdd00f2
commit 9304da9422
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
3 changed files with 9 additions and 2 deletions

View File

@ -99,4 +99,6 @@ public class SCNApp extends Application implements LifecycleObserver
} }
} }
//TODO TabLayout indicator does not corretly animate when directly clicking on tabs //TODO TabLayout indicator does not correctly animate when directly clicking on tabs
//TODO Vibrate is a single long and not two short ?
//TODO Crash (see report)

View File

@ -77,4 +77,9 @@ public class NotificationsFragment extends Fragment implements MessageAdapterTou
snackbar.show(); snackbar.show();
} }
} }
public void updateDeleteSwipeEnabled()
{
if (touchHelper != null) touchHelper.updateEnabled();
}
} }

View File

@ -341,7 +341,7 @@ public class SettingsFragment extends Fragment implements MusicPickerListener
{ {
SCNSettings.inst().save(); SCNSettings.inst().save();
updateUI(); updateUI();
SCNApp.getMainActivity().adpTabs.tab1.touchHelper.updateEnabled(); SCNApp.getMainActivity().adpTabs.tab1.updateDeleteSwipeEnabled();
} }
private void onUpgradeAccount() private void onUpgradeAccount()