mirror of
				https://github.com/SimpleMobileTools/Simple-Clock.git
				synced 2025-06-05 22:19:17 +02:00 
			
		
		
		
	updating commons
This commit is contained in:
		@@ -64,7 +64,7 @@ android {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
dependencies {
 | 
			
		||||
    implementation 'com.github.SimpleMobileTools:Simple-Commons:2d4e07e5f4'
 | 
			
		||||
    implementation 'com.github.SimpleMobileTools:Simple-Commons:42733f39a4'
 | 
			
		||||
    implementation 'com.facebook.stetho:stetho:1.5.1'
 | 
			
		||||
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
 | 
			
		||||
    implementation 'io.github.ShawnLin013:number-picker:2.4.13'
 | 
			
		||||
 
 | 
			
		||||
@@ -130,7 +130,7 @@ class TimerAdapter(
 | 
			
		||||
                            is TimerState.Finished -> EventBus.getDefault().post(TimerEvent.Start(timer.id!!, timer.seconds.secondsToMillis))
 | 
			
		||||
                        }
 | 
			
		||||
                    } else {
 | 
			
		||||
                        PermissionRequiredDialog(activity, R.string.allow_notifications_reminders)
 | 
			
		||||
                        PermissionRequiredDialog(activity, R.string.allow_notifications_reminders, { activity.openNotificationSettings() })
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -171,7 +171,7 @@ class EditAlarmDialog(val activity: SimpleActivity, val alarm: Alarm, val callba
 | 
			
		||||
                                callback(alarmId)
 | 
			
		||||
                                alertDialog.dismiss()
 | 
			
		||||
                            } else {
 | 
			
		||||
                                PermissionRequiredDialog(activity, R.string.allow_notifications_reminders)
 | 
			
		||||
                                PermissionRequiredDialog(activity, R.string.allow_notifications_reminders, { activity.openNotificationSettings() })
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
 
 | 
			
		||||
@@ -17,12 +17,15 @@ import com.simplemobiletools.clock.interfaces.ToggleAlarmInterface
 | 
			
		||||
import com.simplemobiletools.clock.models.Alarm
 | 
			
		||||
import com.simplemobiletools.commons.dialogs.PermissionRequiredDialog
 | 
			
		||||
import com.simplemobiletools.commons.extensions.getProperTextColor
 | 
			
		||||
import com.simplemobiletools.commons.extensions.openNotificationSettings
 | 
			
		||||
import com.simplemobiletools.commons.extensions.toast
 | 
			
		||||
import com.simplemobiletools.commons.extensions.updateTextColors
 | 
			
		||||
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_CREATED
 | 
			
		||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
 | 
			
		||||
import com.simplemobiletools.commons.models.AlarmSound
 | 
			
		||||
import kotlinx.android.synthetic.main.fragment_alarm.view.*
 | 
			
		||||
import kotlinx.android.synthetic.main.fragment_alarm.view.alarm_fab
 | 
			
		||||
import kotlinx.android.synthetic.main.fragment_alarm.view.alarm_fragment
 | 
			
		||||
import kotlinx.android.synthetic.main.fragment_alarm.view.alarms_list
 | 
			
		||||
 | 
			
		||||
class AlarmFragment : Fragment(), ToggleAlarmInterface {
 | 
			
		||||
    private var alarms = ArrayList<Alarm>()
 | 
			
		||||
@@ -135,7 +138,10 @@ class AlarmFragment : Fragment(), ToggleAlarmInterface {
 | 
			
		||||
                }
 | 
			
		||||
                requireContext().updateWidgets()
 | 
			
		||||
            } else {
 | 
			
		||||
                PermissionRequiredDialog(activity as SimpleActivity, R.string.allow_notifications_reminders)
 | 
			
		||||
                PermissionRequiredDialog(
 | 
			
		||||
                    activity as SimpleActivity,
 | 
			
		||||
                    R.string.allow_notifications_reminders,
 | 
			
		||||
                    { (activity as SimpleActivity).openNotificationSettings() })
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -129,7 +129,10 @@ class StopwatchFragment : Fragment() {
 | 
			
		||||
            if (granted) {
 | 
			
		||||
                Stopwatch.toggle(true)
 | 
			
		||||
            } else {
 | 
			
		||||
                PermissionRequiredDialog(activity as SimpleActivity, R.string.allow_notifications_reminders)
 | 
			
		||||
                PermissionRequiredDialog(
 | 
			
		||||
                    activity as SimpleActivity,
 | 
			
		||||
                    R.string.allow_notifications_reminders,
 | 
			
		||||
                    { (activity as SimpleActivity).openNotificationSettings() })
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user