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

Migrate TimelineFragment and dependencies to new architecture #3436

Closed
wants to merge 196 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
29ded40
Remove NetworkTimelineRemoteMediator
nikclayton Mar 11, 2023
21f9ceb
Merge branch 'develop' into 3433-timeline-fragment-arch
nikclayton Mar 11, 2023
2b07406
Introduce NetworkTimelineRepository, to mediate access to the timeline
nikclayton Mar 11, 2023
464cd3e
Move StatusDisplayOptions responsibility
nikclayton Mar 11, 2023
d184510
Push preference handling down to the view model
nikclayton Mar 12, 2023
a11bc64
Migrate reblog, favourite, bookmark, and vote
nikclayton Mar 12, 2023
ea5b978
Migrate from TimelineViewModel.Kind to TimelineKind
nikclayton Mar 13, 2023
60476d2
ktlint 11.3.1 and format
nikclayton Mar 13, 2023
cf4a58e
Merge branch 'develop' into 3433-timeline-fragment-arch
nikclayton Mar 13, 2023
a3b772c
Merge branch 'develop' into 3433-timeline-fragment-arch
nikclayton Apr 10, 2023
f435045
Lint
nikclayton Apr 10, 2023
83ac6ba
First pass at migrating CachedTimeline* to the new architecture
nikclayton Apr 15, 2023
728e6f1
Fix typo
nikclayton Apr 15, 2023
4e965e2
Remove period
nikclayton Apr 15, 2023
c633d99
Remove placeholder types
nikclayton Apr 15, 2023
d2c4de2
Lint
nikclayton Apr 15, 2023
a326f31
Remove "Load more" handling from Timeline view models
nikclayton Apr 15, 2023
26673ad
Remove PlaceholderViewHolder
nikclayton Apr 15, 2023
98dba8d
Stop using the ReadingOrder preference
nikclayton Apr 16, 2023
f29c35d
Move functions that modify statuses in the DB to the repository
nikclayton Apr 16, 2023
02cdbba
Remove unnecessary constant
nikclayton Apr 16, 2023
257074d
Move cache pruning to a WorkManager worker
nikclayton Apr 16, 2023
322d2df
Update timeline on mutes and blocks.
nikclayton Apr 16, 2023
e4c1584
AGP 8 / Java 17 (for Android Studio Flamingo)
nikclayton Apr 16, 2023
c91a931
Remove obsolete onLoadMore method from interface and implementations
nikclayton Apr 16, 2023
00a8fc5
Emit UiSuccess events when a status is composed or edited
nikclayton Apr 16, 2023
56ea51f
Move TimelineKind definition to a separate file
nikclayton Apr 16, 2023
e784949
Skeleton code to save the user's reading position
nikclayton Apr 17, 2023
579ff39
Lint
nikclayton Apr 17, 2023
cfc9dcc
Handle filters with a repository and flows
nikclayton Apr 18, 2023
4522054
Use a channel for errors, update docs
nikclayton Apr 18, 2023
4fd7a70
Implement load state adapter for timelines
nikclayton Apr 19, 2023
6c2147e
Re-implement clear and reload for CachedTimelineViewModel
nikclayton Apr 19, 2023
4a080fa
Fetch network pages using min_id not since_id
nikclayton Apr 20, 2023
6f9291e
Additional logging
nikclayton Apr 20, 2023
1cf6781
Cache statuses from the network in the viewmodel
nikclayton Apr 20, 2023
285d3a2
Remove "flowOn" comment
nikclayton Apr 20, 2023
bf19e7f
Additional documentation for StatusViewData fields
nikclayton Apr 21, 2023
52ea238
Fix typo
nikclayton Apr 22, 2023
7146e4d
Initial in-memory cache for timeline data
nikclayton Apr 22, 2023
70d71eb
Update network status cache in response to events
nikclayton Apr 23, 2023
c168cf2
Remove more code that deals with placeholders
nikclayton Apr 23, 2023
28f46e6
Lint
nikclayton Apr 23, 2023
0f0739d
Translated using Weblate (Latvian)
papuass Apr 23, 2023
97d50e3
Translated using Weblate (Vietnamese)
mastoduy Apr 23, 2023
1d37442
Translated using Weblate (Welsh)
Meddal Apr 23, 2023
20c03f4
Translated using Weblate (Galician)
xmgz Apr 23, 2023
b2b6be2
Translated using Weblate (German)
Apr 23, 2023
3b9f62c
Translated using Weblate (Occitan)
Apr 23, 2023
ef2bdaf
Translated using Weblate (Swedish)
bittin Apr 23, 2023
6511387
Merge remote-tracking branch 'weblate/develop' into develop
nikclayton Apr 24, 2023
736b195
Merge branch 'tuskyapp:develop' into develop
nikclayton Apr 24, 2023
6e0bffd
Merge branch 'tuskyapp:develop' into develop
nikclayton Apr 24, 2023
1f31697
Revert "AGP 8 / Java 17 (for Android Studio Flamingo)"
nikclayton Apr 24, 2023
8b68d88
Merge branch 'develop' into 3433-timeline-fragment-arch
nikclayton Apr 24, 2023
234a5dc
Handle all preferences that update statusDisplayOptions
nikclayton Apr 26, 2023
970ea6d
Merge branch 'develop' into 3433-timeline-fragment-arch
nikclayton Apr 26, 2023
cca3022
Lint
nikclayton Apr 26, 2023
b8a04aa
Derive alwaysShowSensitiveMedia and alwaysOpenSpoiler from StatusDisp…
nikclayton Apr 26, 2023
2fdecca
Throttle clicks, instead of debouncing them
nikclayton Apr 26, 2023
a315566
Remove "Reading order" preference
nikclayton Apr 26, 2023
4ec02a3
Clear local caches on upgrade
nikclayton Apr 28, 2023
deab885
Clean up all accounts, not just the active one.
nikclayton Apr 28, 2023
7fefbc9
Merge branch 'develop' into 3433-timeline-fragment-arch
nikclayton May 8, 2023
b794229
Scroll the list down a bit of refreshing found new content
nikclayton May 11, 2023
1608dae
Merge remote-tracking branch 'origin/develop' into 3433-timeline-frag…
nikclayton May 11, 2023
075d3fc
Remove tests that expect placeholders to be created or removed
nikclayton May 11, 2023
1321535
Wrap a debug block in BuildConfig.DEBUG check
nikclayton May 11, 2023
b714aa4
Update tests for NetworkTimelinePagingSource
nikclayton May 11, 2023
e1e8fdc
Add a comparator to the page cache
nikclayton May 12, 2023
6a94592
Update CachedTimelineRemoteMediatorTest
nikclayton May 12, 2023
a56520e
Update NetworkTimelineRemoteMediator tests
nikclayton May 12, 2023
7f36e93
Lint
nikclayton May 12, 2023
4b35516
Perform long running operations with an external scope
nikclayton May 12, 2023
856b8f9
Remove obsolete TODO
nikclayton May 12, 2023
730c790
Lint
nikclayton May 12, 2023
807b06e
Initial network timeline tests
nikclayton May 13, 2023
8bd297d
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton May 13, 2023
ce76ce1
`authorServerId` can be non-null
nikclayton May 13, 2023
60fbf62
Save visible status ID only after knowing what the timeline kind is
nikclayton May 13, 2023
638118f
Lint
nikclayton May 13, 2023
94d3498
Add equivalent tests for the CachedTimelineViewModel
nikclayton May 13, 2023
10d1aef
Delete obsolete translations
nikclayton May 13, 2023
628f9b3
Note the desired visibility for makeEmptyPageCache()
nikclayton May 14, 2023
41f729e
Lint
nikclayton May 14, 2023
68d3ad6
Merge tag 'v22.0-beta.3' into 3433-timeline-fragment-arch
nikclayton Jun 12, 2023
d40dc32
Merge tag 'v22.0-beta.4' into 3433-timeline-fragment-arch
nikclayton Jun 12, 2023
0dddfce
Merge tag 'v22.0-beta.5' into 3433-timeline-fragment-arch
nikclayton Jun 12, 2023
cb92d28
Merge tag 'v22.0-beta.6' into 3433-timeline-fragment-arch
nikclayton Jun 12, 2023
ff1e9d5
Merge tag 'v22.0-beta.7' into 3433-timeline-fragment-arch
nikclayton Jun 12, 2023
3d0ce79
Merge tag 'v22.0' into 3433-timeline-fragment-arch
nikclayton Jun 12, 2023
1297498
Merge remote-tracking branch 'origin/develop' into 3433-timeline-frag…
nikclayton Jun 12, 2023
fb869c5
Merge branch 'develop' into 3433-timeline-fragment-arch
nikclayton Jun 12, 2023
6377bfa
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Jun 12, 2023
018ef0f
Make workerfactories private
nikclayton Jun 12, 2023
7f68b81
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Jun 15, 2023
2cedf78
Set initialLoadSize to match the page size
nikclayton Jun 15, 2023
f5a9836
Only use the active account at the time the view model was created
nikclayton Jun 15, 2023
cb4abe0
Save the reading position more often, use it when resuming
nikclayton Jun 15, 2023
0931594
Use the `pageSize` parameter
nikclayton Jun 15, 2023
fc8fb77
Move save visible ID functionality in to a function
nikclayton Jun 15, 2023
fbba259
Explicitly throw and catch timeline case errors
nikclayton Jun 15, 2023
f380053
Don't set a state restoration policy explicitly, the base adapter alr…
nikclayton Jun 16, 2023
8a6c2cc
Initial "Load newest" implementation
nikclayton Jun 16, 2023
b699624
Use show/hide instead of toggling isVisible
nikclayton Jun 18, 2023
f14149b
WIP: Failure to load
nikclayton Jun 18, 2023
67a148e
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Jun 19, 2023
f3a8834
Simplify repeated code that shows errors
nikclayton Jun 19, 2023
61ab11a
Show errors as snackbar is the list has contents
nikclayton Jun 19, 2023
05748ad
Remove unnecessary distinctUntilChanged
nikclayton Jun 19, 2023
95b6120
Retry the adapter operation
nikclayton Jun 19, 2023
9182cde
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Jun 19, 2023
aa84ad4
Fix bookmarks and other timelines with weird paging rules
nikclayton Jun 20, 2023
9c4aadb
Update tests to be correct
nikclayton Jun 21, 2023
4ef41ab
Fetch the bigger than normal initial load to cover animations
nikclayton Jun 21, 2023
d7a2e29
Peeking to show new content is not dependent on the Append state
nikclayton Jun 22, 2023
e5287b8
Set isRefreshing in refreshContent()
nikclayton Jun 22, 2023
9602d59
Simplify the code to show/hide different views
nikclayton Jun 22, 2023
bba7c5d
Show error based on the mediator error state
nikclayton Jun 22, 2023
431a7ea
Correctly use refreshContent()
nikclayton Jun 22, 2023
e913fcb
Index pages by prev
nikclayton Jun 23, 2023
3cc000b
Use the last ID as the key not the first ID
nikclayton Jun 26, 2023
269d8f1
notifyItemRangeChanged for all items
nikclayton Jun 28, 2023
1ae50b6
Move the page cache to its own class
nikclayton Jun 28, 2023
e7c2335
Remove debug code
nikclayton Jun 28, 2023
e676bc8
No need to synchronize
nikclayton Jun 28, 2023
56bb11f
WIP: Working on full refresh
nikclayton Jun 28, 2023
a4ef7c7
Migrate "room" from "kapt" to "ksp"
nikclayton Jun 29, 2023
12ef66d
Merge branch 'ksp-room' into 3433-timeline-fragment-arch
nikclayton Jun 29, 2023
31ae4aa
Load a huge page on refresh
nikclayton Jul 1, 2023
bf685ec
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Jul 1, 2023
8b4d84b
Return LoadResult.Invalid if the paging source has been invalidated
nikclayton Jul 2, 2023
770d23c
Load huge pages asynchronously
nikclayton Jul 3, 2023
8bece6f
Check for null when creating the huge page
nikclayton Jul 4, 2023
76bc564
Link to relevant bugs
nikclayton Jul 4, 2023
4ec61c7
Lint
nikclayton Jul 4, 2023
af99ef4
Correct off-by-two error in state.anchorPosition
nikclayton Jul 5, 2023
d22658a
Add scope to remote mediator tests
nikclayton Jul 5, 2023
bdeb681
Show the display name again
nikclayton Jul 5, 2023
7c00e7e
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Jul 5, 2023
324220d
Comments
nikclayton Jul 5, 2023
4c44481
RemoteKeys implementation for cached timeline
nikclayton Jul 5, 2023
54c5058
Lint
nikclayton Jul 5, 2023
1a86e41
Restore the reading position for the cached home timeline
nikclayton Jul 5, 2023
5c07689
Don't overwrite next/prev keys with null if an empty page is returned
nikclayton Jul 6, 2023
86698e8
Update tests
nikclayton Jul 6, 2023
d662dc7
Fix lint issues in AppDatabase.java
nikclayton Jul 6, 2023
798e74a
Merge branch 'lint-appdatabase' into 3433-timeline-fragment-arch
nikclayton Jul 6, 2023
d0ed7f3
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Jul 6, 2023
6f81830
Rename readingPosition to readingPositionId
nikclayton Jul 9, 2023
ef92c1d
Work with a fixed active account, prevent possible data corruption
nikclayton Jul 9, 2023
39bf9d9
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Jul 9, 2023
50c484f
Improve reload from newest in cached timelines, and other clean ups
nikclayton Jul 10, 2023
7b22d3c
ItemSnapshotList's first item may not be at position 0
nikclayton Jul 10, 2023
0af9f1d
Rejig presentation states
nikclayton Jul 10, 2023
a4b6138
Move FilterPrefs to the companion object.
nikclayton Jul 11, 2023
de1b5c8
Include the exception message in the UI
nikclayton Jul 11, 2023
94944a9
Add an error case to PresentationState
nikclayton Jul 11, 2023
d4fca64
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Jul 12, 2023
92ac56f
Lint
nikclayton Jul 12, 2023
1548218
Handle placeholder items in a timeline list
nikclayton Jul 13, 2023
95fe4bb
Use withPresentationState for peeking behaviour
nikclayton Jul 13, 2023
4318770
Ditch listIsEmpty
nikclayton Jul 13, 2023
6f69eca
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Jul 24, 2023
75f9f7e
Add snackbars to show why voting didn't happen
nikclayton Jul 24, 2023
01150e3
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Jul 27, 2023
d6f9c76
Initialise the hashtag variable from the timeline kind
nikclayton Jul 27, 2023
edc0865
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Jul 30, 2023
56ae1d3
INITIAL can only transition to REMOTE_LOADING
nikclayton Jul 30, 2023
6e94bce
Display the username again
nikclayton Jul 30, 2023
38c52e9
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Aug 4, 2023
33092a2
Remove kapt flags
nikclayton Aug 5, 2023
ddd5170
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Aug 6, 2023
243fc56
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Aug 6, 2023
63c3da1
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Aug 6, 2023
f9e0e85
Transition to PRESENTED when refresh has stopped
nikclayton Aug 7, 2023
91ba338
Use when with PresentationState instead of if chains
nikclayton Aug 7, 2023
245ea37
Remove duplicate file (PruneCacheWorker)
nikclayton Aug 7, 2023
f893dc2
Update app/src/main/java/com/keylesspalace/tusky/components/timeline/…
nikclayton Aug 7, 2023
c25e9c3
Get the poll from the "actionable" status, in case this was a poll in…
nikclayton Aug 8, 2023
e5c5c73
Fix poll bug in NotificationsFragment too
nikclayton Aug 8, 2023
98a0e18
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Aug 10, 2023
211cadd
Correct anchorPosition, peeking, and progress indicators
nikclayton Aug 11, 2023
a3567a2
Correctly pass `arguments` when creating a hashtag tab
nikclayton Aug 13, 2023
5f8e8a9
Don't compare against the previous top ID, it might not be loaded in …
nikclayton Aug 15, 2023
d854f70
Track the first prepend more accurately
nikclayton Aug 15, 2023
2a5d858
Remove unnecessary \n
nikclayton Aug 15, 2023
2a42b7a
Track source and mediator prepends
nikclayton Aug 15, 2023
f325a83
Revert "Don't compare against the previous top ID, it might not be lo…
nikclayton Aug 16, 2023
e3c9d81
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Aug 16, 2023
4524681
Remove "huge page" support now that prepend isn't jumping all over th…
nikclayton Aug 16, 2023
9998621
Make PageCache.debug() easier to optimise out
nikclayton Aug 17, 2023
e0b38e6
Refresh cached timeline from close to the current key, not the top
nikclayton Aug 17, 2023
5d0b301
Start/stop UI coroutines on the viewlifecycle
nikclayton Aug 17, 2023
cc65333
Copy the peeking and progress bar behaviour to NotificationsFragment
nikclayton Aug 17, 2023
2664406
Merge remote-tracking branch 'upstream/develop' into 3433-timeline-fr…
nikclayton Aug 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -186,23 +186,6 @@ dependencies {
androidTestImplementation libs.androidx.test.junit
}

// Work around warnings of:
// WARNING: Illegal reflective access by org.jetbrains.kotlin.kapt3.util.ModuleManipulationUtilsKt (file:/C:/Users/Andi/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-annotation-processing-gradle/1.8.22/28dab7e0ee9ce62c03bf97de3543c911dc653700/kotlin-annotation-processing-gradle-1.8.22.jar) to constructor com.sun.tools.javac.util.Context()
// See https://youtrack.jetbrains.com/issue/KT-30589/Kapt-An-illegal-reflective-access-operation-has-occurred
tasks.withType(org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask) {
kaptProcessJvmArgs.addAll([
"--add-opens", "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"])
}

tasks.register("newLintBaseline") {
description 'Deletes and then recreates the lint baseline'

Expand Down
Loading
Loading