File tree Expand file tree Collapse file tree 2 files changed +24
-24
lines changed
android/app/src/main/java/me/kavishdevar/aln Expand file tree Collapse file tree 2 files changed +24
-24
lines changed Original file line number Diff line number Diff line change @@ -56,27 +56,27 @@ internal fun updateAppWidget(
5656
5757 views.setTextViewText(R .id.left_battery_widget,
5858 batteryList?.find { it.component == BatteryComponent .LEFT }?.let {
59- if (it.status != BatteryStatus .DISCONNECTED ) {
59+ // if (it.status != BatteryStatus.DISCONNECTED) {
6060 " ${if (it.status == BatteryStatus .CHARGING ) " ⚡" else " " } ${it.level} %"
61- } else {
62- " "
63- }
61+ // } else {
62+ // ""
63+ // }
6464 } ? : " " )
6565 views.setTextViewText(R .id.right_battery_widget,
6666 batteryList?.find { it.component == BatteryComponent .RIGHT }?.let {
67- if (it.status != BatteryStatus .DISCONNECTED ) {
67+ // if (it.status != BatteryStatus.DISCONNECTED) {
6868 " ${if (it.status == BatteryStatus .CHARGING ) " ⚡" else " " } ${it.level} %"
69- } else {
70- " "
71- }
69+ // } else {
70+ // ""
71+ // }
7272 } ? : " " )
7373 views.setTextViewText(R .id.case_battery_widget,
7474 batteryList?.find { it.component == BatteryComponent .CASE }?.let {
75- if (it.status != BatteryStatus .DISCONNECTED ) {
75+ // if (it.status != BatteryStatus.DISCONNECTED) {
7676 " ${if (it.status == BatteryStatus .CHARGING ) " ⚡" else " " } ${it.level} %"
77- } else {
78- " "
79- }
77+ // } else {
78+ // ""
79+ // }
8080 } ? : " " )
8181
8282 appWidgetManager.updateAppWidget(appWidgetId, views)
Original file line number Diff line number Diff line change @@ -262,23 +262,23 @@ class AirPodsService: Service() {
262262 updatedNotification = NotificationCompat .Builder (this , " background_service_status" )
263263 .setSmallIcon(R .drawable.airpods)
264264 .setContentTitle(""" AirPods –${batteryList?.find { it.component == BatteryComponent .LEFT }?.let {
265- if (it.status != BatteryStatus .DISCONNECTED ) {
265+ // if (it.status != BatteryStatus.DISCONNECTED) {
266266 " L:${if (it.status == BatteryStatus .CHARGING ) " ⚡" else " " } ${it.level} %"
267- } else {
268- " "
269- }
267+ // } else {
268+ // ""
269+ // }
270270 } ? : " " }${batteryList?.find { it.component == BatteryComponent .RIGHT }?.let {
271- if (it.status != BatteryStatus .DISCONNECTED ) {
271+ // if (it.status != BatteryStatus.DISCONNECTED) {
272272 " R:${if (it.status == BatteryStatus .CHARGING ) " ⚡" else " " } ${it.level} %"
273- } else {
274- " "
275- }
273+ // } else {
274+ // ""
275+ // }
276276 } ? : " " }${batteryList?.find { it.component == BatteryComponent .CASE }?.let {
277- if (it.status != BatteryStatus .DISCONNECTED ) {
277+ // if (it.status != BatteryStatus.DISCONNECTED) {
278278 " C:${if (it.status == BatteryStatus .CHARGING ) " ⚡" else " " } ${it.level} %"
279- } else {
280- " "
281- }
279+ // } else {
280+ // ""
281+ // }
282282 } ? : " " } """ )
283283 .setCategory(Notification .CATEGORY_SERVICE )
284284 .setPriority(NotificationCompat .PRIORITY_LOW )
You can’t perform that action at this time.
0 commit comments