remove unclear code

This commit is contained in:
Milos Kozak 2020-01-09 23:29:16 +01:00
parent 0d85ad4f69
commit 6bd6a04710

View file

@ -143,7 +143,7 @@ class NotificationStore @Inject constructor(
@Synchronized @Synchronized
fun updateNotifications(notificationsView: RecyclerView) { fun updateNotifications(notificationsView: RecyclerView) {
removeExpired() removeExpired()
unSnooze() // unSnooze()
if (store.size > 0) { if (store.size > 0) {
val adapter = NotificationRecyclerViewAdapter(cloneStore()) val adapter = NotificationRecyclerViewAdapter(cloneStore())
notificationsView.adapter = adapter notificationsView.adapter = adapter
@ -159,7 +159,7 @@ class NotificationStore @Inject constructor(
clone.addAll(store) clone.addAll(store)
return clone return clone
} }
/*
private fun unSnooze() { private fun unSnooze() {
if (sp.getBoolean(R.string.key_nsalarm_staledata, false)) { if (sp.getBoolean(R.string.key_nsalarm_staledata, false)) {
val notification = Notification(Notification.NSALARM, resourceHelper.gs(R.string.nsalarm_staledata), Notification.URGENT) val notification = Notification(Notification.NSALARM, resourceHelper.gs(R.string.nsalarm_staledata), Notification.URGENT)
@ -168,7 +168,7 @@ class NotificationStore @Inject constructor(
aapsLogger.debug(LTag.NOTIFICATION, "Snoozed to current time and added back notification!") aapsLogger.debug(LTag.NOTIFICATION, "Snoozed to current time and added back notification!")
} }
} }
*/
inner class NotificationRecyclerViewAdapter internal constructor(private val notificationsList: List<Notification>) : RecyclerView.Adapter<NotificationRecyclerViewAdapter.NotificationsViewHolder>() { inner class NotificationRecyclerViewAdapter internal constructor(private val notificationsList: List<Notification>) : RecyclerView.Adapter<NotificationRecyclerViewAdapter.NotificationsViewHolder>() {
override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): NotificationsViewHolder { override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): NotificationsViewHolder {
val v = LayoutInflater.from(viewGroup.context).inflate(R.layout.overview_notification_item, viewGroup, false) val v = LayoutInflater.from(viewGroup.context).inflate(R.layout.overview_notification_item, viewGroup, false)