Reversed auto close

This commit is contained in:
M66B 2020-03-02 18:31:18 +01:00
parent 1e22e1abe1
commit 8582ccb97a
1 changed files with 8 additions and 1 deletions

View File

@ -4040,7 +4040,14 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
finish();
else {
Log.i("Navigating to id=" + closeId);
navigate(closeId, "previous".equals(onclose));
Context context = getContext();
if (context == null)
finish();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean reversed = prefs.getBoolean("reversed", false);
navigate(closeId, "previous".equals(onclose) ^ reversed);
}
}
}