fix #334, make sure the FAB works properly at third party intents

This commit is contained in:
tibbi 2018-02-01 12:04:56 +01:00
parent cee7ea87a4
commit e0b070b6dc

View File

@ -72,7 +72,11 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
appLaunched() appLaunched()
checkWhatsNewDialog() checkWhatsNewDialog()
calendar_fab.beVisibleIf(config.storedView != YEARLY_VIEW) calendar_fab.beVisibleIf(config.storedView != YEARLY_VIEW)
calendar_fab.setOnClickListener {
launchNewEventIntent(currentFragments.last().getNewEventDayCode())
}
storeStateVariables()
if (resources.getBoolean(R.bool.portrait_only)) { if (resources.getBoolean(R.bool.portrait_only)) {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
} }
@ -93,7 +97,6 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
} }
} }
storeStateVariables()
updateViewPager() updateViewPager()
if (!hasPermission(PERMISSION_WRITE_CALENDAR) || !hasPermission(PERMISSION_READ_CALENDAR)) { if (!hasPermission(PERMISSION_WRITE_CALENDAR) || !hasPermission(PERMISSION_READ_CALENDAR)) {
@ -104,9 +107,6 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
refreshCalDAVCalendars(false) refreshCalDAVCalendars(false)
} }
calendar_fab.setOnClickListener {
launchNewEventIntent(currentFragments.last().getNewEventDayCode())
}
checkOpenIntents() checkOpenIntents()
} }