lets warn the user if the new events type is filtered out
This commit is contained in:
parent
62cc28b19d
commit
5f781cafe3
1 changed files with 6 additions and 1 deletions
|
@ -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…
Reference in a new issue