Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d5c77b3 authored by Evan Laird's avatar Evan Laird
Browse files

[Statusbar] requestLayout when datatype vis changes

Testing manually, we are missing some layout passes when the visibility
fo the data type icon changes. Manually causing a relayout by e.g.
expanding / collapsing the QS shade fixes it, so we are clearly not
getting a chance to relayout the mobile view (unknown root cause).

Test: toggle airplane mode with a SIM that has mobile data. Note that
when the data type icon shows it is laid out properly (no overlap).
Fixes: 307844609
Flag: NONE

Change-Id: I97e5466840ebd6c3053aa747315bab22fdf3538a
parent 62d998ce
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -154,8 +154,13 @@ object MobileIconBinder {
                                dataTypeId,
                            )
                            dataTypeId?.let { IconViewBinder.bind(dataTypeId, networkTypeView) }
                            val prevVis = networkTypeContainer.visibility
                            networkTypeContainer.visibility =
                                if (dataTypeId != null) VISIBLE else GONE

                            if (prevVis != networkTypeContainer.visibility) {
                                view.requestLayout()
                            }
                        }
                    }