Skip to content

refactor(client-repository) - #17790

Open
alperozturk96 wants to merge 4 commits into
masterfrom
refactor/client-factory
Open

alperozturk96 wants to merge 4 commits into
masterfrom
refactor/client-factory

Conversation

@alperozturk96

Copy link
Copy Markdown
Collaborator

Changes

  • Injects RemoteClientRepository thus via

    val client = clientRepository?.getNextcloudClient()

    instead

    final User user = accountManager.getUser();
    
    if (user.isAnonymous()) {
        return;
    }
    
    final Context context = MainApp.getAppContext();
    NextcloudClient nextcloudClient = null;
    try {
        nextcloudClient = OwnCloudClientManagerFactory
            .getDefaultSingleton()
            .getNextcloudClientFor(
                user.toOwnCloudAccount(),
                context);
    } catch (OperationCanceledException | AuthenticatorException | IOException e) {
        Log_OC.e(this, "Error retrieving user quota", e);
    }
  • Mark client factory as deprecated

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@alperozturk96 alperozturk96 added this to the Nextcloud App 35.1.0 milestone Oct 8, 2026
@alperozturk96 alperozturk96 added the ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) label Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit a880fd2
Version 17790
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codacy

SpotBugs

CategoryBaseNew
Bad practice3030
Correctness5454
Dodgy code177177
Experimental11
Malicious code vulnerability22
Multithreaded correctness2626
Performance3535
Security1616
Total341341

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 30.00000% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...com/nextcloud/repository/RemoteClientRepository.kt 41.66% 7 Missing ⚠️
...d/android/ui/fragment/albums/AlbumItemsFragment.kt 0.00% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant