Added theme to conversation prefs

This commit is contained in:
Moez Bhatti
2015-12-20 12:58:18 -05:00
parent 24ce737406
commit 7104a676a8
@@ -21,6 +21,11 @@ public class ConversationPrefsHelper {
mConversationPrefs = context.getSharedPreferences(CONVERSATIONS_FILE + threadId, Context.MODE_PRIVATE);
}
public int getColor() {
//return getInt(SettingsFragment.THEME, 0xFF009688);
return 0xFFFF0000;
}
public boolean getNotificationsEnabled() {
return getBoolean(SettingsFragment.NOTIFICATIONS, true);
}
@@ -65,6 +70,15 @@ public class ConversationPrefsHelper {
return getBoolean(SettingsFragment.DISMISSED_READ, false);
}
public void putInt(String key, int value) {
mConversationPrefs.edit().putInt(key, value).apply();
}
public int getInt(String key, int defaultValue) {
int globalValue = mPrefs.getInt(key, defaultValue);
return mConversationPrefs.getInt(key, globalValue);
}
public void putString(String key, String value) {
mConversationPrefs.edit().putString(key, value).apply();
}