do not try fetching current week timestamp if it hasnt been passed to fragment

This commit is contained in:
tibbi 2018-12-03 22:35:55 +01:00
parent 51b78244ac
commit dd9dd2c021

View file

@ -35,7 +35,7 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val dateTimeString = arguments?.getString(WEEK_START_DATE_TIME) ?: ""
val dateTimeString = arguments?.getString(WEEK_START_DATE_TIME) ?: return
currentWeekTS = (DateTime.parse(dateTimeString) ?: DateTime()).seconds()
thisWeekTS = currentWeekTS
}