mirror of
				https://github.com/SimpleMobileTools/Simple-Clock.git
				synced 2025-06-05 22:19:17 +02:00 
			
		
		
		
	refactor
This commit is contained in:
		| @@ -268,7 +268,7 @@ fun Context.formatTo12HourFormat(showSeconds: Boolean, hours: Int, minutes: Int, | |||||||
|     return "${formatTime(showSeconds, false, newHours, minutes, seconds)} $appendable" |     return "${formatTime(showSeconds, false, newHours, minutes, seconds)} $appendable" | ||||||
| } | } | ||||||
|  |  | ||||||
| fun Context.getClosestEnabledAlarmString(callback: (String) -> Unit) { | fun Context.getClosestEnabledAlarmString(callback: (result: String) -> Unit) { | ||||||
|     getEnabledAlarms { enabledAlarms -> |     getEnabledAlarms { enabledAlarms -> | ||||||
|         if (enabledAlarms == null) { |         if (enabledAlarms == null) { | ||||||
|             callback("") |             callback("") | ||||||
| @@ -308,7 +308,7 @@ fun Context.getClosestEnabledAlarmString(callback: (String) -> Unit) { | |||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| fun Context.getEnabledAlarms(callback: (List<Alarm>?) -> Unit) { | fun Context.getEnabledAlarms(callback: (result: List<Alarm>?) -> Unit) { | ||||||
|     ensureBackgroundThread { |     ensureBackgroundThread { | ||||||
|         val alarms = dbHelper.getEnabledAlarms() |         val alarms = dbHelper.getEnabledAlarms() | ||||||
|         Handler(Looper.getMainLooper()).post { |         Handler(Looper.getMainLooper()).post { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user