Skip to content

Commit fcca339

Browse files
committed
Only show scripts up to day on debug mode
1 parent e96f493 commit fcca339

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

app/src/main/java/com/paulcoding/hviewer/worker/UpdateScriptsWork.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import androidx.core.app.NotificationCompat
88
import androidx.work.CoroutineWorker
99
import androidx.work.Data
1010
import androidx.work.WorkerParameters
11+
import com.paulcoding.hviewer.BuildConfig
1112
import com.paulcoding.hviewer.CHECK_FOR_UPDATE_CHANNEL
1213
import com.paulcoding.hviewer.MainActivity
1314
import com.paulcoding.hviewer.R
@@ -63,10 +64,12 @@ class UpdateScriptsWorker(
6364
}
6465

6566
else -> {
66-
notificationBuilder
67-
.setContentTitle("Up to date")
68-
.setContentText(LocalDateTime.now().toString())
69-
notificationManager.notify(Random.nextInt(2, 100), notificationBuilder.build())
67+
if (BuildConfig.DEBUG) {
68+
notificationBuilder
69+
.setContentTitle("Up to date")
70+
.setContentText(LocalDateTime.now().toString())
71+
notificationManager.notify(Random.nextInt(2, 100), notificationBuilder.build())
72+
}
7073
}
7174
}
7275
}

0 commit comments

Comments
 (0)