diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 7766e5d8dee954d93cf86d4e0167460b3d1127b6..a6213a7e7f9c6b2fb2e97f7e66f12145636635f3 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -17,6 +17,25 @@
  * with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/*
+ * Quasseldroid - Quassel client for Android
+ *
+ * Copyright (c) 2018 Janne Koschinski
+ * Copyright (c) 2018 The Quassel Project
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3 as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 /*
  * Quasseldroid - Quassel client for Android
  *
@@ -131,7 +150,7 @@ android {
 }
 
 dependencies {
-  implementation(kotlin("stdlib", "1.2.40"))
+  implementation(kotlin("stdlib", "1.2.41"))
 
   // App Compat
   withVersion("27.1.1") {
diff --git a/app/sampledata/libraries.json b/app/sampledata/libraries.json
index 81d6689079c8e884a9ac442440b513bc90323438..312203a3d01f1115096f6c5c7c786d2f737b2e4a 100644
--- a/app/sampledata/libraries.json
+++ b/app/sampledata/libraries.json
@@ -170,7 +170,7 @@
     },
     {
       "name": "Kotlin Standard Library",
-      "version": "1.2.40",
+      "version": "1.2.41",
       "license": {
         "short_name": "Apache-2.0",
         "full_name": "Apache License"
diff --git a/app/src/main/java/de/kuschku/quasseldroid/dagger/SettingsModule.kt b/app/src/main/java/de/kuschku/quasseldroid/dagger/SettingsModule.kt
index 74caf21aa15bc0ca6bd6036f622834a650c39b9c..661d5941c77e97ff890338ab2c522e3218f9ec24 100644
--- a/app/src/main/java/de/kuschku/quasseldroid/dagger/SettingsModule.kt
+++ b/app/src/main/java/de/kuschku/quasseldroid/dagger/SettingsModule.kt
@@ -35,6 +35,9 @@ class SettingsModule {
   @Provides
   fun provideMessageSettings(context: Context) = Settings.message(context)
 
+  @Provides
+  fun provideNotificationSettings(context: Context) = Settings.notification(context)
+
   @Provides
   fun provideAutoCompleteSettings(context: Context) = Settings.autoComplete(context)
 
diff --git a/app/src/main/java/de/kuschku/quasseldroid/service/QuasselNotificationBackend.kt b/app/src/main/java/de/kuschku/quasseldroid/service/QuasselNotificationBackend.kt
index e0e7ad22ba06efc47ebdcefc5934ee10a189d7f5..7a7dcf937ab96dbb2906d78a523d164f695b1a8a 100644
--- a/app/src/main/java/de/kuschku/quasseldroid/service/QuasselNotificationBackend.kt
+++ b/app/src/main/java/de/kuschku/quasseldroid/service/QuasselNotificationBackend.kt
@@ -33,6 +33,8 @@ import de.kuschku.quasseldroid.GlideApp
 import de.kuschku.quasseldroid.R
 import de.kuschku.quasseldroid.persistence.QuasselDatabase
 import de.kuschku.quasseldroid.settings.MessageSettings
+import de.kuschku.quasseldroid.settings.NotificationSettings
+import de.kuschku.quasseldroid.settings.Settings
 import de.kuschku.quasseldroid.util.AvatarHelper
 import de.kuschku.quasseldroid.util.NotificationMessage
 import de.kuschku.quasseldroid.util.QuasseldroidNotificationManager
@@ -45,7 +47,6 @@ import javax.inject.Inject
 class QuasselNotificationBackend @Inject constructor(
   private val context: Context,
   private val database: QuasselDatabase,
-  private val messageSettings: MessageSettings,
   private val contentFormatter: ContentFormatter,
   private val notificationHandler: QuasseldroidNotificationManager
 ) : NotificationManager {
@@ -56,43 +57,80 @@ class QuasselNotificationBackend @Inject constructor(
     R.color.senderColorC, R.color.senderColorD, R.color.senderColorE, R.color.senderColorF
   ).map(context::getColorCompat).toIntArray()
 
+  private lateinit var notificationSettings: NotificationSettings
+
+  private lateinit var messageSettings: MessageSettings
 
   private val selfColor = context.getColorCompat(android.R.color.background_dark)
 
+  init {
+    updateSettings()
+  }
+
   override fun init(session: Session) {
     val buffers = session.bufferSyncer.bufferInfos()
     for (buffer in buffers) {
       val lastSeenId = session.bufferSyncer.lastSeenMsg(buffer.bufferId)
       database.notifications().markRead(buffer.bufferId, lastSeenId)
 
-      if (buffer.type.hasFlag(Buffer_Type.QueryBuffer)) {
-        val activity = session.bufferSyncer.activity(buffer.bufferId)
-        if (activity.hasFlag(Message_Type.Plain) ||
-            activity.hasFlag(Message_Type.Action) ||
-            activity.hasFlag(Message_Type.Notice))
-          session.backlogManager.requestBacklogFiltered(
-            buffer.bufferId, lastSeenId, -1, 20, 0,
-            Message_Type.of(Message_Type.Plain, Message_Type.Action, Message_Type.Notice).toInt(),
-            0
-          )
-      } else {
-        val highlightCount = session.bufferSyncer.highlightCount(buffer.bufferId)
-        if (highlightCount != 0) {
-          session.backlogManager.requestBacklogFiltered(
-            buffer.bufferId, lastSeenId, -1, 20, 0,
-            Message_Type.of(Message_Type.Plain, Message_Type.Action, Message_Type.Notice).toInt(),
-            Message_Flag.of(Message_Flag.Highlight).toInt()
-          )
+      val level = buffer.type.let {
+        when {
+          it hasFlag Buffer_Type.QueryBuffer   -> notificationSettings.query
+          it hasFlag Buffer_Type.ChannelBuffer -> notificationSettings.channel
+          else                                 -> notificationSettings.other
+        }
+      }
+
+      when (level) {
+        NotificationSettings.Level.ALL       -> {
+          val activity = session.bufferSyncer.activity(buffer.bufferId)
+          if (activity.hasFlag(Message_Type.Plain) ||
+              activity.hasFlag(Message_Type.Action) ||
+              activity.hasFlag(Message_Type.Notice))
+            session.backlogManager.requestBacklogFiltered(
+              buffer.bufferId, lastSeenId, -1, 20, 0,
+              Message_Type.of(Message_Type.Plain, Message_Type.Action, Message_Type.Notice).toInt(),
+              0
+            )
+        }
+        NotificationSettings.Level.HIGHLIGHT -> {
+          val highlightCount = session.bufferSyncer.highlightCount(buffer.bufferId)
+          if (highlightCount != 0) {
+            session.backlogManager.requestBacklogFiltered(
+              buffer.bufferId, lastSeenId, -1, 20, 0,
+              Message_Type.of(Message_Type.Plain, Message_Type.Action, Message_Type.Notice).toInt(),
+              Message_Flag.of(Message_Flag.Highlight).toInt()
+            )
+          }
+        }
+        NotificationSettings.Level.NONE      -> {
+          // We don’t want notifications for this type of channel, so we won’t get any.
         }
       }
     }
   }
 
+  fun updateSettings() {
+    notificationSettings = Settings.notification(context)
+    messageSettings = Settings.message(context)
+  }
+
   @Synchronized
   override fun processMessages(session: Session, vararg messages: Message) {
     val results = messages.filter {
-      it.flag.hasFlag(Message_Flag.Highlight) ||
-      it.bufferInfo.type.hasFlag(Buffer_Type.QueryBuffer)
+      val level = it.bufferInfo.type.let {
+        when {
+          it hasFlag Buffer_Type.QueryBuffer   -> notificationSettings.query
+          it hasFlag Buffer_Type.ChannelBuffer -> notificationSettings.channel
+          else                                 -> notificationSettings.other
+        }
+      }
+
+      when (level) {
+        NotificationSettings.Level.ALL       -> true
+        NotificationSettings.Level.HIGHLIGHT -> it.flag.hasFlag(Message_Flag.Highlight)
+        NotificationSettings.Level.NONE      -> false
+      }
     }.filter {
       val bufferName = it.bufferInfo.bufferName ?: ""
       val networkId = it.bufferInfo.networkId
@@ -173,11 +211,15 @@ class QuasselNotificationBackend @Inject constructor(
 
         val size = context.resources.getDimensionPixelSize(R.dimen.notification_avatar_width)
         val avatarList = AvatarHelper.avatar(messageSettings, it)
-        val avatarResult = GlideApp.with(context).loadWithFallbacks(avatarList)
-          ?.optionalCircleCrop()
-          ?.placeholder(TextDrawable.builder().buildRound(initial, senderColor))
-          ?.submit(size, size)
-          ?.get()
+        val avatarResult = try {
+          GlideApp.with(context).loadWithFallbacks(avatarList)
+            ?.optionalCircleCrop()
+            ?.placeholder(TextDrawable.builder().buildRound(initial, senderColor))
+            ?.submit(size, size)
+            ?.get()
+        } catch (_: Throwable) {
+          null
+        }
         val avatar = avatarResult ?: TextDrawable.builder().buildRound(initial, senderColor)
 
         NotificationMessage(
diff --git a/app/src/main/java/de/kuschku/quasseldroid/service/QuasselService.kt b/app/src/main/java/de/kuschku/quasseldroid/service/QuasselService.kt
index ded101d70fa57e64897a983dbdb9785070b622ad..afac73faee45b57b2795a2b14cf822fad46f5e33 100644
--- a/app/src/main/java/de/kuschku/quasseldroid/service/QuasselService.kt
+++ b/app/src/main/java/de/kuschku/quasseldroid/service/QuasselService.kt
@@ -70,6 +70,7 @@ class QuasselService : DaggerLifecycleService(),
 
   override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
     update()
+    notificationBackend.updateSettings()
   }
 
   private fun update() {
diff --git a/app/src/main/java/de/kuschku/quasseldroid/settings/NotificationSettings.kt b/app/src/main/java/de/kuschku/quasseldroid/settings/NotificationSettings.kt
new file mode 100644
index 0000000000000000000000000000000000000000..83329df1c3778127b6607ca4430ac0e890220791
--- /dev/null
+++ b/app/src/main/java/de/kuschku/quasseldroid/settings/NotificationSettings.kt
@@ -0,0 +1,44 @@
+/*
+ * Quasseldroid - Quassel client for Android
+ *
+ * Copyright (c) 2018 Janne Koschinski
+ * Copyright (c) 2018 Ken Børge Viktil
+ * Copyright (c) 2018 Magnus Fjell
+ * Copyright (c) 2018 Martin Sandsmark
+ * Copyright (c) 2018 The Quassel Project
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3 as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package de.kuschku.quasseldroid.settings
+
+data class NotificationSettings(
+  val query: Level = Level.ALL,
+  val channel: Level = Level.HIGHLIGHT,
+  val other: Level = Level.NONE
+) {
+  enum class Level {
+    ALL,
+    HIGHLIGHT,
+    NONE;
+
+    companion object {
+      private val map = values().associateBy { it.name }
+      fun of(name: String) = map[name]
+    }
+  }
+
+  companion object {
+    val DEFAULT = NotificationSettings()
+  }
+}
diff --git a/app/src/main/java/de/kuschku/quasseldroid/settings/Settings.kt b/app/src/main/java/de/kuschku/quasseldroid/settings/Settings.kt
index 5196c970d4fe149b307757050c44033dba1d0fa7..b66503e7a5f3f541c68086182be255ce73c2bf52 100644
--- a/app/src/main/java/de/kuschku/quasseldroid/settings/Settings.kt
+++ b/app/src/main/java/de/kuschku/quasseldroid/settings/Settings.kt
@@ -123,6 +123,29 @@ object Settings {
     )
   }
 
+  fun notification(context: Context) = context.sharedPreferences {
+    NotificationSettings(
+      query = NotificationSettings.Level.of(
+        getString(
+          context.getString(R.string.preference_notification_query_key),
+          ""
+        )
+      ) ?: NotificationSettings.DEFAULT.query,
+      channel = NotificationSettings.Level.of(
+        getString(
+          context.getString(R.string.preference_notification_channel_key),
+          ""
+        )
+      ) ?: NotificationSettings.DEFAULT.channel,
+      other = NotificationSettings.Level.of(
+        getString(
+          context.getString(R.string.preference_notification_other_key),
+          ""
+        )
+      ) ?: NotificationSettings.DEFAULT.other
+    )
+  }
+
   fun autoComplete(context: Context) = context.sharedPreferences {
     AutoCompleteSettings(
       senderDoubleClick = getBoolean(
diff --git a/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/AboutFragment.kt b/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/AboutFragment.kt
index e5e8d6cf8dead1a8d80f5278221902f1bee79f44..a291be6eb68e8d7e62c6ea2c2dd1c492fd3584e3 100644
--- a/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/AboutFragment.kt
+++ b/app/src/main/java/de/kuschku/quasseldroid/ui/clientsettings/about/AboutFragment.kt
@@ -218,7 +218,7 @@ class AboutFragment : DaggerFragment() {
       ),
       Library(
         name = "Kotlin Standard Library",
-        version = "1.2.40",
+        version = "1.2.41",
         license = apache2,
         url = "https://kotlinlang.org/"
       ),
diff --git a/app/src/main/java/de/kuschku/quasseldroid/util/QuasseldroidNotificationManager.kt b/app/src/main/java/de/kuschku/quasseldroid/util/QuasseldroidNotificationManager.kt
index 97825ab1f58567b07b385002d580881159dc3dbd..aae8f6baa0ca8000bd9d36ffe4e4bca7ce056076 100644
--- a/app/src/main/java/de/kuschku/quasseldroid/util/QuasseldroidNotificationManager.kt
+++ b/app/src/main/java/de/kuschku/quasseldroid/util/QuasseldroidNotificationManager.kt
@@ -60,7 +60,7 @@ class QuasseldroidNotificationManager @Inject constructor(private val context: C
         NotificationChannel(
           context.getString(R.string.notification_channel_background),
           context.getString(R.string.notification_channel_connection_title),
-          NotificationManager.IMPORTANCE_MIN
+          NotificationManager.IMPORTANCE_LOW
         ),
         NotificationChannel(
           context.getString(R.string.notification_channel_highlight),
diff --git a/app/src/main/res/values-de/strings_preferences.xml b/app/src/main/res/values-de/strings_preferences.xml
index 889e899863a4cfea3e5c832f4fd21a0a9fb6161f..91a1876c8f7d10c540264340de0d593a22ea8e95 100644
--- a/app/src/main/res/values-de/strings_preferences.xml
+++ b/app/src/main/res/values-de/strings_preferences.xml
@@ -43,6 +43,16 @@
   <string name="preference_show_lag_summary">Zeigt die Gerät-Core-Latenz in der Statusleiste</string>
 
 
+  <string name="preference_notifications_title">Benachrichtigungen</string>
+
+  <string name="preference_notification_query_title">Direktnachrichten</string>
+  <string name="preference_notification_channel_title">Räume</string>
+  <string name="preference_notification_other_title">Andere Nachrichten</string>
+  <string name="preference_notifications_level_all">Alle Nachrichten</string>
+  <string name="preference_notifications_level_highlight">Erwähnungen</string>
+  <string name="preference_notifications_level_none">Niemals</string>
+
+
   <string name="preference_messages_title">Nachrichten</string>
 
   <string name="preference_monospace_title">Monospace-Schrift verwenden</string>
diff --git a/app/src/main/res/values/strings_preferences.xml b/app/src/main/res/values/strings_preferences.xml
index b22097270829d3a8856081c60f5fff89a7f81b5a..d59aa3e8fd488c144813f0baceb64bfcfdc6bd39 100644
--- a/app/src/main/res/values/strings_preferences.xml
+++ b/app/src/main/res/values/strings_preferences.xml
@@ -78,6 +78,32 @@
   <string name="preference_show_lag_summary">Displays the lag between client and core in the action bar</string>
 
 
+  <string name="preference_notifications_title">Notifications</string>
+
+  <string name="preference_notification_query_key" translatable="false">notification_query</string>
+  <string name="preference_notification_query_title">Direct Messages</string>
+
+  <string name="preference_notification_channel_key" translatable="false">notification_channel</string>
+  <string name="preference_notification_channel_title">Channel Messages</string>
+
+  <string name="preference_notification_other_key" translatable="false">notification_other</string>
+  <string name="preference_notification_other_title">Other Messages</string>
+
+  <string name="preference_notifications_level_all">All Messages</string>
+  <string name="preference_notifications_level_highlight">Mentions</string>
+  <string name="preference_notifications_level_none">Never</string>
+  <string-array name="preference_notifications_level_entries">
+    <item>@string/preference_notifications_level_all</item>
+    <item>@string/preference_notifications_level_highlight</item>
+    <item>@string/preference_notifications_level_none</item>
+  </string-array>
+  <string-array name="preference_notifications_level_entryvalues" translatable="false">
+    <item>ALL</item>
+    <item>HIGHLIGHT</item>
+    <item>NONE</item>
+  </string-array>
+
+
   <string name="preference_messages_title">Messages</string>
 
   <string name="preference_monospace_key" translatable="false">monospace</string>
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index 92d3b93a6ff9095b98b1fcd07175c49e635c5e18..d47e1523799b9fff6bbf570cb5fcad51629b05f1 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -44,6 +44,28 @@
       android:title="@string/preference_show_lag_title" />
   </PreferenceCategory>
 
+  <PreferenceCategory android:title="@string/preference_notifications_title">
+    <DropDownPreference
+      android:defaultValue="ALL"
+      android:entries="@array/preference_notifications_level_entries"
+      android:entryValues="@array/preference_notifications_level_entryvalues"
+      android:key="@string/preference_notification_query_key"
+      android:title="@string/preference_notification_query_title" />
+    <DropDownPreference
+      android:defaultValue="HIGHLIGHT"
+      android:entries="@array/preference_notifications_level_entries"
+      android:entryValues="@array/preference_notifications_level_entryvalues"
+      android:key="@string/preference_notification_channel_key"
+      android:title="@string/preference_notification_channel_title" />
+    <DropDownPreference
+      android:defaultValue="NONE"
+      android:entries="@array/preference_notifications_level_entries"
+      android:entryValues="@array/preference_notifications_level_entryvalues"
+      android:key="@string/preference_notification_other_key"
+      android:title="@string/preference_notification_other_title" />
+    <!-- TODO: Add Notification ringtone/etc setting links -->
+  </PreferenceCategory>
+
   <PreferenceCategory android:title="@string/preference_messages_title">
 
     <SwitchPreference
diff --git a/build.gradle.kts b/build.gradle.kts
index 82f81e70d0e6967083f78ef833c6f91cafe36d52..11145919d78058d9b085c8cf3688e52add943f54 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,3 +1,22 @@
+/*
+ * Quasseldroid - Quassel client for Android
+ *
+ * Copyright (c) 2018 Janne Koschinski
+ * Copyright (c) 2018 The Quassel Project
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3 as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 buildscript {
   repositories {
     google()
@@ -5,7 +24,7 @@ buildscript {
   }
   dependencies {
     classpath("com.android.tools.build:gradle:3.1.2")
-    classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.40")
+    classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.41")
   }
 }
 
diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts
index adcbfa55b59411212c3bd5494c6ae190160ae8b6..e5afee0617e8c61f2f40aa0e8b490565bfe4c086 100644
--- a/lib/build.gradle.kts
+++ b/lib/build.gradle.kts
@@ -17,6 +17,25 @@
  * with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/*
+ * Quasseldroid - Quassel client for Android
+ *
+ * Copyright (c) 2018 Janne Koschinski
+ * Copyright (c) 2018 The Quassel Project
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3 as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 /*
  * Quasseldroid - Quassel client for Android
  *
@@ -51,7 +70,7 @@ plugins {
 }
 
 dependencies {
-  implementation(kotlin("stdlib", "1.2.40"))
+  implementation(kotlin("stdlib", "1.2.41"))
 
   withVersion("27.1.1") {
     implementation("com.android.support", "support-annotations", version)
diff --git a/malheur/build.gradle.kts b/malheur/build.gradle.kts
index 8afb5cc04c907566824a763686fc85f019e43788..92d078e957e21ebd24d505a0c6991da33cb8ba9a 100644
--- a/malheur/build.gradle.kts
+++ b/malheur/build.gradle.kts
@@ -17,6 +17,25 @@
  * with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/*
+ * Quasseldroid - Quassel client for Android
+ *
+ * Copyright (c) 2018 Janne Koschinski
+ * Copyright (c) 2018 The Quassel Project
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3 as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 /*
  * Quasseldroid - Quassel client for Android
  *
@@ -68,7 +87,7 @@ android {
 }
 
 dependencies {
-  implementation(kotlin("stdlib", "1.2.40"))
+  implementation(kotlin("stdlib", "1.2.41"))
 
   implementation("com.google.code.gson", "gson", "2.8.2")
 }
diff --git a/persistence/build.gradle.kts b/persistence/build.gradle.kts
index 09d7c058a701e53d09af071977f6e184b1d7815a..039b8c6e50371937a84ccd2e82776157f605ba09 100644
--- a/persistence/build.gradle.kts
+++ b/persistence/build.gradle.kts
@@ -17,6 +17,25 @@
  * with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/*
+ * Quasseldroid - Quassel client for Android
+ *
+ * Copyright (c) 2018 Janne Koschinski
+ * Copyright (c) 2018 The Quassel Project
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3 as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 /*
  * Quasseldroid - Quassel client for Android
  *
@@ -74,7 +93,7 @@ android {
 }
 
 dependencies {
-  implementation(kotlin("stdlib", "1.2.40"))
+  implementation(kotlin("stdlib", "1.2.41"))
 
   // App Compat
   withVersion("27.1.1") {
diff --git a/persistence/src/main/java/de/kuschku/quasseldroid/persistence/QuasselDatabase.kt b/persistence/src/main/java/de/kuschku/quasseldroid/persistence/QuasselDatabase.kt
index bc7a596e9da9dd9ed3dc0f0f4fc42d890bb3dd6f..e8563824dc5c951fbc9c34587edc543cd8eef735 100644
--- a/persistence/src/main/java/de/kuschku/quasseldroid/persistence/QuasselDatabase.kt
+++ b/persistence/src/main/java/de/kuschku/quasseldroid/persistence/QuasselDatabase.kt
@@ -246,12 +246,18 @@ abstract class QuasselDatabase : RoomDatabase() {
     @Insert(onConflict = OnConflictStrategy.REPLACE)
     fun save(vararg entities: NotificationData)
 
+    @Query("SELECT * FROM notification ORDER BY time ASC")
+    fun all(): List<NotificationData>
+
     @Query("SELECT * FROM notification WHERE bufferId = :bufferId ORDER BY time ASC")
     fun all(bufferId: BufferId): List<NotificationData>
 
     @Query("DELETE FROM notification WHERE bufferId = :bufferId AND messageId <= :messageId")
     fun markRead(bufferId: BufferId, messageId: MsgId)
 
+    @Query("DELETE FROM notification WHERE bufferId = :bufferId AND flag & 2 = 0")
+    fun markReadNormal(bufferId: BufferId)
+
     @Query("DELETE FROM notification")
     fun clear()
   }
diff --git a/viewmodel/build.gradle.kts b/viewmodel/build.gradle.kts
index 7bb314e41e41b9696680773df0262b220b383752..026e5d4a3170c42b9ef66835c6dff12c03c4d65d 100644
--- a/viewmodel/build.gradle.kts
+++ b/viewmodel/build.gradle.kts
@@ -17,6 +17,25 @@
  * with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/*
+ * Quasseldroid - Quassel client for Android
+ *
+ * Copyright (c) 2018 Janne Koschinski
+ * Copyright (c) 2018 The Quassel Project
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3 as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 /*
  * Quasseldroid - Quassel client for Android
  *
@@ -68,7 +87,7 @@ android {
 }
 
 dependencies {
-  implementation(kotlin("stdlib", "1.2.40"))
+  implementation(kotlin("stdlib", "1.2.41"))
 
   // App Compat
   withVersion("27.1.1") {