Make GIF search layout option sticky.

Fixes #7843
This commit is contained in:
Alan Evans
2019-03-12 11:36:34 -03:00
parent f010a3ec0d
commit 2c28fa6a57
5 changed files with 91 additions and 40 deletions

View File

@@ -177,6 +177,8 @@ public class TextSecurePreferences {
public static final String LINK_PREVIEWS = "pref_link_previews";
private static final String GIF_GRID_LAYOUT = "pref_gif_grid_layout";
public static boolean isScreenLockEnabled(@NonNull Context context) {
return getBooleanPreference(context, SCREEN_LOCK, false);
}
@@ -362,6 +364,14 @@ public class TextSecurePreferences {
return getBooleanPreference(context, LINK_PREVIEWS, true);
}
public static boolean isGifSearchInGridLayout(Context context) {
return getBooleanPreference(context, GIF_GRID_LAYOUT, false);
}
public static void setIsGifSearchInGridLayout(Context context, boolean isGrid) {
setBooleanPreference(context, GIF_GRID_LAYOUT, isGrid);
}
public static @Nullable String getProfileKey(Context context) {
return getStringPreference(context, PROFILE_KEY_PREF, null);
}