diff --git a/apps/apps_container.cpp b/apps/apps_container.cpp index 6938827f0..8deb2d00d 100644 --- a/apps/apps_container.cpp +++ b/apps/apps_container.cpp @@ -78,7 +78,7 @@ void AppsContainer::suspend(bool checkIfPowerKeyReleased) { } bool AppsContainer::dispatchEvent(Ion::Events::Event event) { - bool alphaLockWantsRedraw = m_window.updateAlphaLock(); + bool alphaLockWantsRedraw = updateAlphaLock(); bool didProcessEvent = Container::dispatchEvent(event); @@ -163,8 +163,8 @@ void AppsContainer::shutdownDueToLowBattery() { window()->redraw(true); } -void AppsContainer::reloadTitleBar() { - m_window.reloadTitleBar(); +bool AppsContainer::updateAlphaLock() { + return m_window.updateAlphaLock(); } OnBoarding::UpdateController * AppsContainer::updatePopUpController() { @@ -186,5 +186,5 @@ Timer * AppsContainer::containerTimerAtIndex(int i) { void AppsContainer::resetShiftAlphaStatus() { Ion::Events::setShiftAlphaStatus(Ion::Events::ShiftAlphaStatus::Default); - m_window.updateAlphaLock(); + updateAlphaLock(); } diff --git a/apps/apps_container.h b/apps/apps_container.h index cd90d7bf1..0611819eb 100644 --- a/apps/apps_container.h +++ b/apps/apps_container.h @@ -41,7 +41,7 @@ public: void refreshPreferences(); void displayExamModePopUp(bool activate); void shutdownDueToLowBattery(); - void reloadTitleBar(); + bool updateAlphaLock(); OnBoarding::UpdateController * updatePopUpController(); protected: Home::App::Snapshot * homeAppSnapshot() { return &m_homeSnapshot; } diff --git a/apps/apps_window.cpp b/apps/apps_window.cpp index e3d11d693..74aa44f1e 100644 --- a/apps/apps_window.cpp +++ b/apps/apps_window.cpp @@ -41,10 +41,6 @@ void AppsWindow::hideTitleBarView(bool hide) { } } -void AppsWindow::reloadTitleBar() { - m_titleBarView.reload(); -} - int AppsWindow::numberOfSubviews() const { return (m_contentView == nullptr ? 1 : 2); } diff --git a/apps/apps_window.h b/apps/apps_window.h index e60d57309..e6f9a61e7 100644 --- a/apps/apps_window.h +++ b/apps/apps_window.h @@ -14,7 +14,6 @@ public: void refreshPreferences(); bool updateAlphaLock(); void hideTitleBarView(bool hide); - void reloadTitleBar(); private: constexpr static KDCoordinate k_titleBarHeight = 18; int numberOfSubviews() const override; diff --git a/apps/title_bar_view.cpp b/apps/title_bar_view.cpp index 332ae61b9..7f49cec9e 100644 --- a/apps/title_bar_view.cpp +++ b/apps/title_bar_view.cpp @@ -22,10 +22,6 @@ void TitleBarView::drawRect(KDContext * ctx, KDRect rect) const { ctx->fillRect(KDRect(0, 0, bounds().width(), 2), Palette::YellowDark); } -void TitleBarView::reload() { - markRectAsDirty(bounds()); -} - void TitleBarView::setTitle(I18n::Message title) { m_titleView.setMessage(title); } diff --git a/apps/title_bar_view.h b/apps/title_bar_view.h index 2058cb898..5cac9bb24 100644 --- a/apps/title_bar_view.h +++ b/apps/title_bar_view.h @@ -10,7 +10,6 @@ class TitleBarView : public View { public: TitleBarView(); void drawRect(KDContext * ctx, KDRect rect) const override; - void reload(); void setTitle(I18n::Message title); bool setChargeState(Ion::Battery::Charge chargeState); bool setIsCharging(bool isCharging);