fix: show lockscreen only if the logind session is removed#692
Closed
calsys456 wants to merge 2 commits intolinuxdeepin:masterfrom
Closed
fix: show lockscreen only if the logind session is removed#692calsys456 wants to merge 2 commits intolinuxdeepin:masterfrom
calsys456 wants to merge 2 commits intolinuxdeepin:masterfrom
Conversation
This will work as intended. Since updateLocketState will do its things, no additional changes needed. Only remove redundant code is enough.
There's a bunch of shit in this obsolete code, but this quickfix can temporarily make it behave well...
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: calsys456 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves redundant internal login state updates from the greeter logout flow so that lockscreen visibility relies solely on logind session removal handled by updateLocketState(). Sequence diagram for updated greeter logout and lockscreen behaviorsequenceDiagram
actor User
participant GreeterUI
participant GreeterProxy
participant Helper
participant Session
participant Logind
participant LockScreenManager
User->>GreeterUI: initiateLogout()
GreeterUI->>GreeterProxy: logout()
rect rgb(230,230,250)
note over GreeterProxy: Previous behavior (removed)
GreeterProxy-xGreeterProxy: set d.isLoggedIn = false
GreeterProxy-xGreeterProxy: emit isLoggedInChanged
end
GreeterProxy->>Helper: activeSession()
Helper-->>GreeterProxy: weak_ptr<Session>
GreeterProxy->>Session: getId()
GreeterProxy->>Logind: sendLogoutMessage(sessionId)
Logind-->>Session: removeSession()
Session-->>LockScreenManager: updateLocketState()
LockScreenManager-->>LockScreenManager: evaluateLockscreenVisibility()
LockScreenManager-->>GreeterUI: updateLockscreenShownState()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Now that
logout()no longer updatesd->isLoggedIn, double-check whetherisLoggedInis still needed as a member at all and consider removing it or consolidating responsibility for its updates to a single place. - Consider whether there are any edge cases where
logout()is called but the logind session removal (and correspondingupdateLocketState) might not occur, and if so whether the UI would be left in an inconsistent state without emittingisLoggedInChanged()here.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Now that `logout()` no longer updates `d->isLoggedIn`, double-check whether `isLoggedIn` is still needed as a member at all and consider removing it or consolidating responsibility for its updates to a single place.
- Consider whether there are any edge cases where `logout()` is called but the logind session removal (and corresponding `updateLocketState`) might not occur, and if so whether the UI would be left in an inconsistent state without emitting `isLoggedInChanged()` here.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
TAG Bot New tag: 0.8.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will work as intended.
Since updateLocketState will do its things, no additional changes needed. Only remove redundant code is enough.
Summary by Sourcery
Bug Fixes: