updating commons
This commit is contained in:
parent
50527d6cb3
commit
0159fa448d
|
@ -64,7 +64,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:2d4e07e5f4'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:42733f39a4'
|
||||||
implementation 'com.facebook.stetho:stetho:1.5.1'
|
implementation 'com.facebook.stetho:stetho:1.5.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation 'io.github.ShawnLin013:number-picker:2.4.13'
|
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))
|
is TimerState.Finished -> EventBus.getDefault().post(TimerEvent.Start(timer.id!!, timer.seconds.secondsToMillis))
|
||||||
}
|
}
|
||||||
} else {
|
} 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)
|
callback(alarmId)
|
||||||
alertDialog.dismiss()
|
alertDialog.dismiss()
|
||||||
} else {
|
} 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.clock.models.Alarm
|
||||||
import com.simplemobiletools.commons.dialogs.PermissionRequiredDialog
|
import com.simplemobiletools.commons.dialogs.PermissionRequiredDialog
|
||||||
import com.simplemobiletools.commons.extensions.getProperTextColor
|
import com.simplemobiletools.commons.extensions.getProperTextColor
|
||||||
|
import com.simplemobiletools.commons.extensions.openNotificationSettings
|
||||||
import com.simplemobiletools.commons.extensions.toast
|
import com.simplemobiletools.commons.extensions.toast
|
||||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||||
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_CREATED
|
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_CREATED
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
import com.simplemobiletools.commons.models.AlarmSound
|
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 {
|
class AlarmFragment : Fragment(), ToggleAlarmInterface {
|
||||||
private var alarms = ArrayList<Alarm>()
|
private var alarms = ArrayList<Alarm>()
|
||||||
|
@ -135,7 +138,10 @@ class AlarmFragment : Fragment(), ToggleAlarmInterface {
|
||||||
}
|
}
|
||||||
requireContext().updateWidgets()
|
requireContext().updateWidgets()
|
||||||
} else {
|
} 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) {
|
if (granted) {
|
||||||
Stopwatch.toggle(true)
|
Stopwatch.toggle(true)
|
||||||
} else {
|
} else {
|
||||||
PermissionRequiredDialog(activity as SimpleActivity, R.string.allow_notifications_reminders)
|
PermissionRequiredDialog(
|
||||||
|
activity as SimpleActivity,
|
||||||
|
R.string.allow_notifications_reminders,
|
||||||
|
{ (activity as SimpleActivity).openNotificationSettings() })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue