From afc23eb047cd42698389ef6412c0cb1ec4ab5e42 Mon Sep 17 00:00:00 2001 From: Electric1447 Date: Wed, 25 Aug 2021 23:23:14 +0300 Subject: [PATCH] Use case view for "singlepods" --- .../airpods/notification/NotificationBuilder.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/OpenPods/app/src/main/java/com/dosse/airpods/notification/NotificationBuilder.java b/OpenPods/app/src/main/java/com/dosse/airpods/notification/NotificationBuilder.java index 8cdfc60..c6ffbda 100644 --- a/OpenPods/app/src/main/java/com/dosse/airpods/notification/NotificationBuilder.java +++ b/OpenPods/app/src/main/java/com/dosse/airpods/notification/NotificationBuilder.java @@ -57,11 +57,11 @@ public class NotificationBuilder { notification.setImageViewResource(R.id.rightPodImg, ((RegularPods)airpods).getRightDrawable()); notification.setImageViewResource(R.id.podCaseImg, ((RegularPods)airpods).getCaseDrawable()); } else { - notification.setImageViewResource(R.id.leftPodImg, ((SinglePods)airpods).getDrawable()); + notification.setImageViewResource(R.id.podCaseImg, ((SinglePods)airpods).getDrawable()); } + notification.setViewVisibility(R.id.leftPod, single ? View.GONE : View.VISIBLE); notification.setViewVisibility(R.id.rightPod, single ? View.GONE : View.VISIBLE); - notification.setViewVisibility(R.id.podCase, single ? View.GONE : View.VISIBLE); } if (isFreshStatus(status)) for (RemoteViews notification : notificationArr) { @@ -92,10 +92,9 @@ public class NotificationBuilder { } else { SinglePods singlePods = (SinglePods)airpods; - notification.setTextViewText(R.id.leftPodText, singlePods.getParsedStatus()); - notification.setImageViewResource(R.id.leftBatImg, singlePods.getBatImgSrcId()); - notification.setViewVisibility(R.id.leftBatImg, singlePods.getBatImgVisibility()); - notification.setViewVisibility(R.id.leftInEarImg, singlePods.getInEarVisibility()); + notification.setTextViewText(R.id.podCaseText, singlePods.getParsedStatus()); + notification.setImageViewResource(R.id.caseBatImg, singlePods.getBatImgSrcId()); + notification.setViewVisibility(R.id.caseBatImg, singlePods.getBatImgVisibility()); } } else for (RemoteViews notification : notificationArr) {