mirror of
				https://github.com/SimpleMobileTools/Simple-Clock.git
				synced 2025-06-05 22:19:17 +02:00 
			
		
		
		
	adding some type checks at updating viepager fragments
This commit is contained in:
		| @@ -39,14 +39,14 @@ class ViewPagerAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm) { | ||||
|     } | ||||
|  | ||||
|     fun updateClockTabAlarm() { | ||||
|         (fragments[TAB_CLOCK] as ClockFragment).updateAlarm() | ||||
|         (fragments[TAB_CLOCK] as? ClockFragment)?.updateAlarm() | ||||
|     } | ||||
|  | ||||
|     fun updateAlarmTabAlarmSound(alarmSound: AlarmSound) { | ||||
|         (fragments[TAB_ALARM] as AlarmFragment).updateAlarmSound(alarmSound) | ||||
|         (fragments[TAB_ALARM] as? AlarmFragment)?.updateAlarmSound(alarmSound) | ||||
|     } | ||||
|  | ||||
|     fun updateTimerTabAlarmSound(alarmSound: AlarmSound) { | ||||
|         (fragments[TAB_TIMER] as TimerFragment).updateAlarmSound(alarmSound) | ||||
|         (fragments[TAB_TIMER] as? TimerFragment)?.updateAlarmSound(alarmSound) | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user