Commit e6d6b140 authored by wanglei's avatar wanglei

...

parent 3116b084
......@@ -69,7 +69,10 @@ object NotificationHelp {
val time = System.currentTimeMillis().formatTimeH()
val lashPushTime =
AppPreferences.getInstance().getLong("last_usage_notification_time", 0).formatTimeH()
return TimeUtils.isTimeBetweenWan17toWan23() && time != lashPushTime
val flag1 = TimeUtils.isTimeBetweenWan17toWan23()
val flag2 = time != lashPushTime
LogEx.logDebug(TAG, "flag1=$flag1 flag2=$flag2")
return flag1 && flag2
}
private fun canPushConstellation(): Boolean {
......
......@@ -23,7 +23,9 @@ import com.base.browserwhite.bean.ConstObject.BING
import com.base.browserwhite.bean.ConstObject.BOOKMARK
import com.base.browserwhite.bean.ConstObject.DUCKDUCKGO
import com.base.browserwhite.bean.ConstObject.GOOGLE
import com.base.browserwhite.bean.ConstObject.ID_CONSTELLATION
import com.base.browserwhite.bean.ConstObject.ID_NEWS
import com.base.browserwhite.bean.ConstObject.ID_USAGE_REPORT
import com.base.browserwhite.bean.ConstObject.ID_WEATHER
import com.base.browserwhite.bean.ConstObject.JUNK_CLEANER
import com.base.browserwhite.bean.ConstObject.NEWS
......@@ -372,7 +374,8 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
// i++
// lastClickTime = System.currentTimeMillis()
NotificationUiUtil.sendNotification(requireContext(), ConstObject.ID_USAGE_REPORT)
// NotificationUiUtil.sendNotification(requireContext(), ConstObject.ID_USAGE_REPORT)
NotificationHelp.canPushNotification(ID_USAGE_REPORT)
}
binding.ivUp.setOnClickListener {
binding.rv.scrollToPosition(0)
......
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