Update registration UI.

This commit is contained in:
Greyson Parrelli
2019-02-13 11:52:55 -08:00
parent 6b476876d9
commit bf28e109d3
67 changed files with 1096 additions and 813 deletions

View File

@@ -0,0 +1,16 @@
package org.thoughtcrime.securesms.util;
import android.app.Activity;
import org.thoughtcrime.securesms.R;
public class DynamicRegistrationTheme extends DynamicTheme {
@Override
protected int getSelectedTheme(Activity activity) {
String theme = TextSecurePreferences.getTheme(activity);
if (theme.equals("dark")) return R.style.TextSecure_DarkRegistrationTheme;
return R.style.TextSecure_LightRegistrationTheme;
}
}

View File

@@ -74,6 +74,7 @@ public class TextSecurePreferences {
private static final String VERIFYING_STATE_PREF = "pref_verifying";
public static final String REGISTERED_GCM_PREF = "pref_gcm_registered";
private static final String GCM_PASSWORD_PREF = "pref_gcm_password";
private static final String SEEN_WELCOME_SCREEN_PREF = "pref_seen_welcome_screen";
private static final String PROMPTED_PUSH_REGISTRATION_PREF = "pref_prompted_push_registration";
private static final String PROMPTED_DEFAULT_SMS_PREF = "pref_prompted_default_sms";
private static final String PROMPTED_OPTIMIZE_DOZE_PREF = "pref_prompted_optimize_doze";
@@ -842,6 +843,14 @@ public class TextSecurePreferences {
return getBooleanPreference(context, SMS_DELIVERY_REPORT_PREF, false);
}
public static boolean hasSeenWelcomeScreen(Context context) {
return getBooleanPreference(context, SEEN_WELCOME_SCREEN_PREF, true);
}
public static void setHasSeenWelcomeScreen(Context context, boolean value) {
setBooleanPreference(context, SEEN_WELCOME_SCREEN_PREF, value);
}
public static boolean hasPromptedPushRegistration(Context context) {
return getBooleanPreference(context, PROMPTED_PUSH_REGISTRATION_PREF, false);
}