Replace the UserPreference property wrapper with the new macro version.

This commit is contained in:
Doug
2026-06-26 13:46:14 +01:00
committed by Doug
parent c53e0c1466
commit f05fd41c36
17 changed files with 143 additions and 388 deletions
@@ -508,7 +508,7 @@ class TimelineInteractionHandler {
duration: voiceMessageRoomTimelineItem.content.duration,
waveform: voiceMessageRoomTimelineItem.content.waveform,
playbackSpeed: appSettings.voiceMessagePlaybackSpeed,
playbackSpeedPublisher: appSettings.$voiceMessagePlaybackSpeed)
playbackSpeedPublisher: appSettings.voiceMessagePlaybackSpeedPublisher)
mediaPlayerProvider.register(audioPlayerState: playerState)
return playerState
}
@@ -556,19 +556,19 @@ class TimelineViewModel: TimelineViewModelType, TimelineViewModelProtocol {
}
private func setupAppSettingsSubscriptions() {
appSettings.$sharePresence
appSettings.sharePresencePublisher
.weakAssign(to: \.state.showReadReceipts, on: self)
.store(in: &cancellables)
appSettings.$viewSourceEnabled
appSettings.viewSourceEnabledPublisher
.weakAssign(to: \.state.isViewSourceEnabled, on: self)
.store(in: &cancellables)
appSettings.$threadsEnabled
appSettings.threadsEnabledPublisher
.weakAssign(to: \.state.areThreadsEnabled, on: self)
.store(in: &cancellables)
appSettings.$jumpToReadMarkerEnabled
appSettings.jumpToReadMarkerEnabledPublisher
.weakAssign(to: \.state.jumpToReadMarkerEnabled, on: self)
.store(in: &cancellables)