chore: Remove duplicate and obsolete legacy code#2050
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the de-legacy effort by switching several app call sites from core.legacy.* utilities/APIs to the newer Core modules (network + Coil3), and removing duplicate legacy implementations.
Changes:
- Replace legacy UI/avatar helpers and legacy networking imports with
com.infomaniak.core.coil.*andcom.infomaniak.core.network.*. - Migrate multiple adapters/dialog image-loading call sites from Coil 2 (
coil.*) to Coil 3 (coil3.*). - Remove the duplicate legacy public-share token interceptor and tighten a Dropbox-related API return type.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/java/com/infomaniak/drive/ui/MainActivity.kt | Switch avatar helpers from legacy UtilsUi to new Core Coil helpers. |
| app/src/main/java/com/infomaniak/drive/ui/home/LastActivitiesAdapter.kt | Migrate coil.load usage to coil3.load. |
| app/src/main/java/com/infomaniak/drive/ui/fileList/preview/PreviewVideoFragment.kt | Switch from legacy networking (core.legacy.networking) to new Core network APIs. |
| app/src/main/java/com/infomaniak/drive/ui/fileList/fileShare/SharedItemsAdapter.kt | Migrate coil.load usage to coil3.load. |
| app/src/main/java/com/infomaniak/drive/ui/fileList/fileShare/FileShareAddUserDialog.kt | Migrate Coil request/execution code to Coil 3 and replace legacy Coil helpers with Core Coil helpers. |
| app/src/main/java/com/infomaniak/drive/ui/fileList/fileShare/AvailableShareableItemsAdapter.kt | Migrate coil.load usage to coil3.load. |
| app/src/main/java/com/infomaniak/drive/ui/fileList/fileDetails/FileActivitiesAdapter.kt | Migrate coil.load usage to coil3.load. |
| app/src/main/java/com/infomaniak/drive/ui/dropbox/DropboxViewModel.kt | Make the LiveData return type explicit using the new ApiResponse model. |
| app/src/main/java/com/infomaniak/drive/MainApplication.kt | Remove legacy core init/debug tooling and initialize new Core modules (but currently hard-codes PreProd env). |
| app/src/main/java/com/infomaniak/drive/data/api/publicshare/PublicShareTokenInterceptor.kt | Remove duplicate legacy public-share interceptor implementation and legacy aliases. |
| app/src/androidTest/java/com/infomaniak/drive/KDriveTest.kt | Update test networking imports and OkHttp client source to new Core network client. |
e4487c1 to
804d7dc
Compare
Contributor
|
This PR/issue depends on:
|
804d7dc to
7acd3ab
Compare
FabianDevel
approved these changes
Jul 6, 2026
7acd3ab to
9b0b947
Compare
|
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.



Depends on Infomaniak/android-core#807