Skip to content

Extract SyncResolverApi interface and SyncDeviceManager class#3943

Merged
guiyanakuang merged 2 commits intomainfrom
refactor/issue-3942-extract-sync-resolver-api
Feb 24, 2026
Merged

Extract SyncResolverApi interface and SyncDeviceManager class#3943
guiyanakuang merged 2 commits intomainfrom
refactor/issue-3942-extract-sync-resolver-api

Conversation

@guiyanakuang
Copy link
Copy Markdown
Member

Closes #3942

Summary

  • Extract SyncResolverApi interfaceSyncResolver now implements this interface; GeneralSyncManager and Koin bindings depend on the abstraction instead of the concrete class
  • Extract SyncDeviceManager class — 7 device management methods moved from SyncResolver into a focused class with only 3 dependencies (SecureStore, SyncClientApi, SyncRuntimeInfoDao)
  • Split tests — 11 device management tests moved from SyncResolverTest to dedicated SyncDeviceManagerTest, each mocking only 3 deps instead of 10+

Test plan

  • ./gradlew app:desktopTest --tests "com.crosspaste.sync.*" — all sync tests pass
  • ./gradlew ktlintFormat — passes

@guiyanakuang guiyanakuang merged commit 73a731a into main Feb 24, 2026
2 checks passed
@guiyanakuang guiyanakuang deleted the refactor/issue-3942-extract-sync-resolver-api branch February 24, 2026 12:37
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.

Refactor: Extract SyncResolverApi interface and SyncDeviceManager class

1 participant