remove a redundant function

This commit is contained in:
tibbi 2018-03-30 00:02:39 +02:00
parent 14f125e808
commit 02b4de56c5

View File

@ -155,16 +155,12 @@ class MainActivity : SimpleActivity() {
when (view_pager.currentItem) {
TAB_ALARM -> getViewPagerAdapter()?.updateAlarmTabAlarmSound(newAlarmSound)
TAB_TIMER -> updateTimerTabAlarmSound(newAlarmSound)
TAB_TIMER -> getViewPagerAdapter()?.updateTimerTabAlarmSound(newAlarmSound)
}
}
private fun getViewPagerAdapter() = view_pager.adapter as? ViewPagerAdapter
fun updateTimerTabAlarmSound(alarmSound: AlarmSound) {
getViewPagerAdapter()?.updateTimerTabAlarmSound(alarmSound)
}
private fun initFragments() {
view_pager.adapter = ViewPagerAdapter(supportFragmentManager)
view_pager.onPageChangeListener {