mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-31 19:05:01 +01:00
lets warn the user if the new events type is filtered out
This commit is contained in:
parent
62cc28b19d
commit
5f781cafe3
@ -20,6 +20,7 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.core.app.AlarmManagerCompat
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.print.PrintHelper
|
||||
@ -98,7 +99,11 @@ fun Context.scheduleNextEventReminder(event: Event, showToasts: Boolean) {
|
||||
val validReminders = event.getReminders().filter { it.type == REMINDER_NOTIFICATION }
|
||||
if (validReminders.isEmpty()) {
|
||||
if (showToasts) {
|
||||
toast(R.string.saving)
|
||||
if (config.displayEventTypes.contains(event.eventType.toString())) {
|
||||
toast(R.string.saving)
|
||||
} else {
|
||||
toast(R.string.saving_filtered_out, Toast.LENGTH_LONG)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user