add waiting status for profile service
This commit is contained in:
4 files changed
+9
-9
No files matched your search
@@ -109,12 +109,5 @@
|
||||
<action android:name="android.service.quicksettings.action.QS_TILE" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<receiver
|
||||
android:name=".OnBootReceiver"
|
||||
android:enabled="false">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -159,9 +159,14 @@ class ProfileBackgroundService : BaseService() {
|
||||
}
|
||||
|
||||
private fun refreshStatusNotification(queueSize: Int) {
|
||||
val content = if ( queueSize != 0 )
|
||||
getString(R.string.format_in_queue, queueSize)
|
||||
else
|
||||
getString(R.string.waiting)
|
||||
|
||||
val notification = NotificationCompat.Builder(this, NotificationChannels.PROFILE_STATUS)
|
||||
.setContentTitle(getText(R.string.processing_profiles))
|
||||
.setContentText(getString(R.string.format_in_queue, queueSize))
|
||||
.setContentText(content)
|
||||
.setColor(getColor(R.color.colorAccentService))
|
||||
.setSmallIcon(R.drawable.ic_notification)
|
||||
.setOnlyAlertOnce(true)
|
||||
|
||||
@@ -15,4 +15,5 @@
|
||||
<string name="profiles_and_providers">配置文件和外部引用</string>
|
||||
<string name="profile_yaml">配置文件.yaml</string>
|
||||
<string name="provider_files">外部引用文件</string>
|
||||
<string name="waiting">等待中</string>
|
||||
</resources>
|
||||
@@ -5,7 +5,8 @@
|
||||
<string name="clash_service_status_channel">Clash Status</string>
|
||||
<string name="profile_service_status_channel">Profile Service Status</string>
|
||||
<string name="processing_profiles">Processing Profiles</string>
|
||||
<string name="format_in_queue">%d items in Queue</string>
|
||||
<string name="format_in_queue">%d items in queue</string>
|
||||
<string name="waiting">Waiting</string>
|
||||
<string name="process_result">Process Result</string>
|
||||
<string name="format_update_complete">Update %s Completed</string>
|
||||
<string name="format_update_failure">Update %s Failure</string>
|
||||
|
||||
Reference in new issue
Block a user