Skip to content

Commit

Permalink
fix: Hide notif panel when launching apps
Browse files Browse the repository at this point in the history
  • Loading branch information
axel358 committed Sep 13, 2024
1 parent 0d5f2d7 commit 69d16bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/src/main/java/cu/axel/smartdock/services/DockService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,8 @@ class DockService : AccessibilityService(), OnSharedPreferenceChangeListener, On
if (!isPinned && sharedPreferences.getBoolean("auto_pin", true))
pinDock()
}
if (Utils.notificationPanelVisible)
toggleNotificationPanel(false)
}

private fun setOrientation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,8 @@ class NotificationService : NotificationListenerService(), OnNotificationClickLi
}

override fun onNotificationLongClicked(notification: StatusBarNotification, item: View) {
val ignoredApps = sharedPreferences.getStringSet("ignored_notifications_panel", mutableSetOf())!!
val ignoredApps =
sharedPreferences.getStringSet("ignored_notifications_panel", mutableSetOf())!!
ignoredApps.add(notification.packageName)
sharedPreferences.edit().putStringSet("ignored_notifications_panel", ignoredApps).apply()
item.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
Expand Down

0 comments on commit 69d16bb

Please sign in to comment.