Commit df40beb7 authored by wanglei's avatar wanglei

...

parent 584194bc
...@@ -20,20 +20,16 @@ object NotificationHoverUtils { ...@@ -20,20 +20,16 @@ object NotificationHoverUtils {
*/ */
fun sendHoverNotification(context: Context) { fun sendHoverNotification(context: Context) {
val hoverCount = AppPreferences.getInstance().getString("popup_hover_count", "0").toInt()
val hoverDelay = AppPreferences.getInstance().getString("popup_hover_delay", "0").toLong()
val hoverStatus = AppPreferences.getInstance().getString("popup_hover_status", "0").toInt()
if (hoverStatus == 0) return
if (handlerThread == null) { if (handlerThread == null) {
handlerThread = HandlerThread("NotificationHandlerThread") handlerThread = HandlerThread("NotificationHandlerThread")
handlerThread?.start() handlerThread?.start()
} }
var hoverCount = AppPreferences.getInstance().getString("popup_hover_count", "0").toInt()
var hoverDelay = AppPreferences.getInstance().getString("popup_hover_delay", "0").toLong()
if (BuildConfig.DEBUG) {
hoverCount = 5
hoverDelay = 1000L
}
// 创建 Handler // 创建 Handler
if (handler == null) { if (handler == null) {
handlerThread?.let { handlerThread?.let {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment