import android.annotation.SuppressLint;
import android.os.Bundle;
+import androidx.annotation.Nullable;
+
import net.ktnx.mobileledger.model.Data;
import net.ktnx.mobileledger.model.MobileLedgerProfile;
import net.ktnx.mobileledger.utils.Colors;
-
-import androidx.annotation.Nullable;
+import net.ktnx.mobileledger.utils.MLDB;
@SuppressLint("Registered")
public class ProfileThemedActivity extends CrashReportingActivity {
}
protected void onCreate(@Nullable Bundle savedInstanceState) {
initProfile();
- super.onCreate(savedInstanceState);
setupProfileColors();
+ super.onCreate(savedInstanceState);
}
protected void initProfile() {
- mProfile = Data.profile.get();
+ mProfile = Data.profile.getValue();
+ if (mProfile == null) {
+ String profileUUID = MLDB.getOption(MLDB.OPT_PROFILE_UUID, null);
+ MobileLedgerProfile startupProfile;
+
+
+ startupProfile = Data.getProfile(profileUUID);
+ Data.setCurrentProfile(startupProfile);
+ mProfile = startupProfile;
+ }
}
}