Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Device Manager] Render current session (PSG-671) #6903

Merged
merged 10 commits into from
Aug 26, 2022

Conversation

onurays
Copy link
Contributor

@onurays onurays commented Aug 22, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Implement current session section as in the new layout.

Motivation and context

#6902

Screenshots / GIFs

Verified Session (Light) Verified Session (Dark)
verified_session_light verified_session_dark
Unverified Session (Light) Unverified Session (Dark)
unverified_session_light unverified_session_dark

Tests

  • Enable the new device management feature flag
  • Go to "Security & Privacy" settings
  • Press the "Show all sessions (V2, WIP)" entry
  • See the current session is rendered as in the new layout

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@onurays onurays linked an issue Aug 22, 2022 that may be closed by this pull request
@onurays onurays requested review from a team and ouchadam and removed request for a team August 22, 2022 10:14
is DevicesViewEvents.Loading -> showLoading(it.message)
is DevicesViewEvents.Failure -> showFailure(it.throwable)
is DevicesViewEvents.RequestReAuth -> Unit // TODO. Next PR
is DevicesViewEvents.PromptRenameDevice -> Unit // TODO. Next PR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if possible it could be handy to link to tickets, although I guess the PS tickets are in jira 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they are private atm.

}

override fun invalidate() = withState(viewModel) { state ->
val currentDeviceInfo = state.devices()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the difference between state.devices() and state.devices? is it possible to have a currentDeviceInfo and not have devices in the Success state?

Copy link
Contributor

@ouchadam ouchadam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

you may need to add manual ignores to the string resources or include them in future PRs that make use of the strings

* develop: (169 commits)
  new app layouts invites (#6911)
  bottom navigation tabs are removed for AppLayout (#6905)
  focus input when changing server address
  Fix copyright
  Improve createRoomThreePidEvents for clarity
  Remove roomCreatorUserId and use current userId by default
  Remove useless explicit field type
  Change visibility of LocalRoomThirdPartyInviteContent to internal
  Remove useless apply in CreateLocalRoomStateEventsTask
  Update doc
  Extract condition to reduce code complexity
  Verify tombstone event
  Remove safe call
  Add unit tests for CreateRoomFromLocalRoomTask
  Add unit tests for CreateLocalRoomStateEventsTask
  Set stateKey as empty by default
  Create local room state events in dedicated task
  Fix local events generation following the specification
  Update CreateRoomParams from the potential FeaturePreset before persisting
  Persists CreateRoomParams into LocalRoomSummaryEntity
  ...

# Conflicts:
#	vector/src/main/java/im/vector/app/features/settings/devices/v2/VectorSettingsDevicesFragment.kt
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
12.1% 12.1% Duplication

@onurays onurays merged commit dc99c11 into develop Aug 26, 2022
@onurays onurays deleted the feature/ons/device_manager_current_session branch August 26, 2022 13:22
@onurays onurays changed the title [Device Manager] Render current session (PSG-668) [Device Manager] Render current session (PSG-671) Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Device Manager] Current Session Section
2 participants