mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Add overflow toast and fix edit menu option.
This commit is contained in:
committed by
Greyson Parrelli
parent
3a06412cd8
commit
0711a22188
@@ -11,13 +11,14 @@ import org.thoughtcrime.securesms.logging.SignalUncaughtExceptionHandler;
|
||||
*/
|
||||
public final class SignalStore {
|
||||
|
||||
private static final String LAST_PREKEY_REFRESH_TIME = "last_prekey_refresh_time";
|
||||
private static final String MESSAGE_REQUEST_ENABLE_TIME = "message_request_enable_time";
|
||||
private static final String LAST_PREKEY_REFRESH_TIME = "last_prekey_refresh_time";
|
||||
private static final String MESSAGE_REQUEST_ENABLE_TIME = "message_request_enable_time";
|
||||
|
||||
private SignalStore() {}
|
||||
|
||||
public static void onFirstEverAppLaunch() {
|
||||
registrationValues().onFirstEverAppLaunch();
|
||||
uiHints().onFirstEverAppLaunch();
|
||||
}
|
||||
|
||||
public static @NonNull KbsValues kbsValues() {
|
||||
@@ -60,6 +61,10 @@ public final class SignalStore {
|
||||
putLong(MESSAGE_REQUEST_ENABLE_TIME, time);
|
||||
}
|
||||
|
||||
public static UiHints uiHints() {
|
||||
return new UiHints(getStore());
|
||||
}
|
||||
|
||||
public static @NonNull PreferenceDataStore getPreferenceDataStore() {
|
||||
return new SignalPreferenceDataStore(getStore());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.thoughtcrime.securesms.keyvalue;
|
||||
|
||||
public class UiHints {
|
||||
|
||||
private static final String HAS_SEEN_GROUP_SETTINGS_MENU_TOAST = "uihints.has_seen_group_settings_menu_toast";
|
||||
|
||||
private final KeyValueStore store;
|
||||
|
||||
UiHints(KeyValueStore store) {
|
||||
this.store = store;
|
||||
}
|
||||
|
||||
void onFirstEverAppLaunch() {
|
||||
markHasSeenGroupSettingsMenuToast();
|
||||
}
|
||||
|
||||
public void markHasSeenGroupSettingsMenuToast() {
|
||||
store.beginWrite().putBoolean(HAS_SEEN_GROUP_SETTINGS_MENU_TOAST, true).apply();
|
||||
}
|
||||
|
||||
public boolean hasSeenGroupSettingsMenuToast() {
|
||||
return store.getBoolean(HAS_SEEN_GROUP_SETTINGS_MENU_TOAST, false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user