Skip to content

Commit

Permalink
Preserve clock chip padding after SystemUI restart (closes #652)
Browse files Browse the repository at this point in the history
Signed-off-by: DrDisagree <[email protected]>
  • Loading branch information
Mahmud0808 committed Nov 5, 2024
1 parent 3b1556f commit f150190
Showing 1 changed file with 21 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,25 +356,31 @@ class BackgroundChip(context: Context?) : ModPack(context!!) {
private fun updateStatusBarClock(force: Boolean) {
if (!mShowSBClockBg) return

if (mClockView != null && mClockView!!.background == null || force) {
updateClockView(
mClockView,
Gravity.LEFT or Gravity.CENTER
)
if (mClockView != null && (mClockView!!.background == null || force)) {
mClockView!!.post {
updateClockView(
mClockView,
Gravity.LEFT or Gravity.CENTER
)
}
}

if (mCenterClockView != null && mCenterClockView!!.background == null || force) {
updateClockView(
mCenterClockView,
Gravity.CENTER
)
if (mCenterClockView != null && (mCenterClockView!!.background == null || force)) {
mCenterClockView!!.post {
updateClockView(
mCenterClockView,
Gravity.CENTER
)
}
}

if (mRightClockView != null && mRightClockView!!.background == null || force) {
updateClockView(
mRightClockView,
Gravity.RIGHT or Gravity.CENTER
)
if (mRightClockView != null && (mRightClockView!!.background == null || force)) {
mRightClockView!!.post {
updateClockView(
mRightClockView,
Gravity.RIGHT or Gravity.CENTER
)
}
}
}

Expand Down

0 comments on commit f150190

Please sign in to comment.