mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-31 02:44:57 +01:00
lets not redefine the mConfig of SimpleActivity
This commit is contained in:
parent
d61f139cce
commit
5060d2b893
@ -11,7 +11,6 @@ import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.simplemobiletools.calendar.BuildConfig;
|
||||
import com.simplemobiletools.calendar.Config;
|
||||
import com.simplemobiletools.calendar.R;
|
||||
|
||||
import java.util.Calendar;
|
||||
@ -55,7 +54,7 @@ public class AboutActivity extends SimpleActivity {
|
||||
}
|
||||
|
||||
private void setupRateUs() {
|
||||
if (Config.newInstance(getApplicationContext()).getIsFirstRun()) {
|
||||
if (mConfig.getIsFirstRun()) {
|
||||
mRateUs.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import android.os.Bundle;
|
||||
import android.support.v4.app.TaskStackBuilder;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
|
||||
import com.simplemobiletools.calendar.Config;
|
||||
import com.simplemobiletools.calendar.R;
|
||||
|
||||
import butterknife.BindView;
|
||||
@ -16,13 +15,10 @@ public class SettingsActivity extends SimpleActivity {
|
||||
@BindView(R.id.settings_sunday_first) SwitchCompat mSundayFirstSwitch;
|
||||
@BindView(R.id.settings_week_numbers) SwitchCompat mWeekNumbersSwitch;
|
||||
|
||||
private static Config mConfig;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_settings);
|
||||
mConfig = Config.newInstance(getApplicationContext());
|
||||
ButterKnife.bind(this);
|
||||
|
||||
setupDarkTheme();
|
||||
|
@ -33,7 +33,7 @@ class MainActivity : SimpleActivity(), NavigationListener {
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
Config.newInstance(applicationContext).isFirstRun = false
|
||||
mConfig.isFirstRun = false
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
|
Loading…
x
Reference in New Issue
Block a user