mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: Refactor MeshService into smaller, single-responsibility components (#4108)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
0fa690eb61
commit
b3ebe760dd
35 changed files with 3568 additions and 2816 deletions
|
|
@ -47,12 +47,11 @@ class ChannelSetDataSource @Inject constructor(private val channelSetStore: Data
|
|||
channelSetStore.updateData { preference -> preference.toBuilder().clear().build() }
|
||||
}
|
||||
|
||||
suspend fun clearSettings() {
|
||||
channelSetStore.updateData { preference -> preference.toBuilder().clearSettings().build() }
|
||||
}
|
||||
|
||||
suspend fun addAllSettings(settingsList: List<ChannelSettings>) {
|
||||
channelSetStore.updateData { preference -> preference.toBuilder().addAllSettings(settingsList).build() }
|
||||
/** Replaces all [ChannelSettings] in a single atomic operation. */
|
||||
suspend fun replaceAllSettings(settingsList: List<ChannelSettings>) {
|
||||
channelSetStore.updateData { preference ->
|
||||
preference.toBuilder().clearSettings().addAllSettings(settingsList).build()
|
||||
}
|
||||
}
|
||||
|
||||
/** Updates the [ChannelSettings] list with the provided channel. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue