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

Dynamically adjusting the visibleRoomsView's timeline limit based on … #507

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

stefanceriu
Copy link
Member

…the app state

Requires matrix-org/matrix-rust-sdk#1399 and #502

This will start the app with visibleRooms[timelineLimit=0], then, as soon as that receives updates, switch to visibleRooms[timeline=1] + allRooms and later, once the initial data has been displayed, switch to visibleRooms[timeline=20]+allRooms

After that, while scrolling and chaning the visible range the timeline limit with be set to 1 and then set again to 20 when the scrolling has stopped to precache room history

@stefanceriu stefanceriu requested a review from pixlwave January 31, 2023 13:54
@github-actions
Copy link

github-actions bot commented Jan 31, 2023

Warnings
⚠️ Please add a changelog.
⚠️ Some of the commits are missing ticket numbers. Please consinder using them for better tracking.
⚠️ You seem to have made changes to views. Please consider adding screenshots.

Generated by 🚫 Danger Swift against 3fb4666

@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Base: 40.91% // Head: 40.91% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (6c884f6) compared to base (4f8cc08).
Patch coverage: 54.71% of modified lines in pull request are covered.

❗ Current head 6c884f6 differs from pull request most recent head 3fb4666. Consider uploading reports for the commit 3fb4666 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #507      +/-   ##
===========================================
- Coverage    40.91%   40.91%   -0.01%     
===========================================
  Files          289      289              
  Lines        16496    16516      +20     
  Branches     10889    10904      +15     
===========================================
+ Hits          6749     6757       +8     
- Misses        9440     9451      +11     
- Partials       307      308       +1     
Flag Coverage Δ
unittests 21.08% <14.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../Sources/Screens/HomeScreen/HomeScreenModels.swift 68.85% <ø> (-2.06%) ⬇️
...Sources/Services/Client/SlidingSyncViewProxy.swift 0.00% <0.00%> (ø)
...ces/Room/RoomSummary/MockRoomSummaryProvider.swift 70.58% <0.00%> (ø)
...ervices/Room/RoomSummary/RoomSummaryProvider.swift 0.00% <0.00%> (ø)
...Room/RoomSummary/RoomSummaryProviderProtocol.swift 0.00% <ø> (ø)
ElementX/Sources/Services/Client/ClientProxy.swift 24.93% <6.66%> (-0.21%) ⬇️
...X/Sources/Screens/HomeScreen/View/HomeScreen.swift 47.54% <83.33%> (-1.45%) ⬇️
...urces/Screens/HomeScreen/HomeScreenViewModel.swift 66.52% <92.85%> (+0.74%) ⬆️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@manuroe
Copy link
Member

manuroe commented Jan 31, 2023

This will start the app with visibleRooms[timelineLimit=0], then, as soon as that receives updates, switch to visibleRooms[timeline=1] + allRooms and later, once the initial data has been displayed, switch to visibleRooms[timeline=20]+allRooms

After that, while scrolling and chaning the visible range the timeline limit with be set to 1 and then set again to 20 when the scrolling has stopped to precache room history

If it works, we need to add those sentences somewhere in the documentation. There are super clear.

Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

LGTM

ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift Outdated Show resolved Hide resolved
@stefanceriu stefanceriu force-pushed the stefan/dynamicTimelineLimit branch from 6c884f6 to 3fb4666 Compare January 31, 2023 15:19
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

@stefanceriu stefanceriu merged commit 8f3842f into develop Jan 31, 2023
@stefanceriu stefanceriu deleted the stefan/dynamicTimelineLimit branch January 31, 2023 18:59
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.

3 participants