renaming a function
This commit is contained in:
parent
9a1d9d6b3b
commit
2bd5a6dce4
3 changed files with 6 additions and 6 deletions
|
@ -57,11 +57,11 @@ public class Config {
|
|||
mPrefs.edit().putInt(Constants.LAST_OTHER_REMINDER_MINS, lastMins).apply();
|
||||
}
|
||||
|
||||
public int getView() {
|
||||
public int getStoredView() {
|
||||
return mPrefs.getInt(Constants.VIEW, Constants.MONTHLY_VIEW);
|
||||
}
|
||||
|
||||
public void setView(int view) {
|
||||
public void setStoredView(int view) {
|
||||
mPrefs.edit().putInt(Constants.VIEW, view).apply();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ class MainActivity : SimpleActivity(), EventListFragment.DeleteListener, ChangeV
|
|||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
if (mIsMonthSelected && mConfig.view == Constants.YEARLY_VIEW) {
|
||||
if (mIsMonthSelected && mConfig.storedView == Constants.YEARLY_VIEW) {
|
||||
updateView(Constants.YEARLY_VIEW)
|
||||
} else {
|
||||
super.onBackPressed()
|
||||
|
@ -98,9 +98,9 @@ class MainActivity : SimpleActivity(), EventListFragment.DeleteListener, ChangeV
|
|||
}
|
||||
|
||||
private fun updateViewPager() {
|
||||
if (mConfig.view == Constants.YEARLY_VIEW) {
|
||||
if (mConfig.storedView == Constants.YEARLY_VIEW) {
|
||||
fillYearlyViewPager()
|
||||
} else if (mConfig.view == Constants.EVENTS_LIST_VIEW) {
|
||||
} else if (mConfig.storedView == Constants.EVENTS_LIST_VIEW) {
|
||||
fillEventsList()
|
||||
} else {
|
||||
val targetDay = DateTime().toString(Formatter.DAYCODE_PATTERN)
|
||||
|
|
|
@ -38,7 +38,7 @@ class ChangeViewDialog(val activity: Activity) : AlertDialog.Builder(activity),
|
|||
}
|
||||
|
||||
fun getSavedItem(): Int {
|
||||
return when (Config.newInstance(activity).view) {
|
||||
return when (Config.newInstance(activity).storedView) {
|
||||
Constants.YEARLY_VIEW -> R.id.dialog_radio_yearly
|
||||
Constants.EVENTS_LIST_VIEW -> R.id.dialog_radio_events_list
|
||||
else -> R.id.dialog_radio_monthly
|
||||
|
|
Loading…
Reference in a new issue