@@ -80,12 +80,14 @@ public data class FinalPollSettings(
80
80
/* *
81
81
* Merges this instance of [PollSettings] with [other] to create a [FinalPollSettings] instance.
82
82
*/
83
- public fun PollSettings.merge (other : PollSettings ? ): FinalPollSettings = FinalPollSettings (
84
- deleteAfter ? : other?.deleteAfter,
85
- (showChartAfterClose ? : other?.showChartAfterClose) != false ,
86
- maxVotes ? : other?.maxVotes ? : 1 ,
87
- maxChanges ? : other?.maxChanges ? : 0 ,
88
- (hideResults ? : other?.hideResults) == true ,
89
- (publicResults ? : other?.publicResults) == true ,
90
- emojiMode ? : other?.emojiMode ? : PollSettings .EmojiMode .ON
91
- )
83
+ public fun PollSettings.merge (other : PollSettings ? ): FinalPollSettings {
84
+ return FinalPollSettings (
85
+ deleteAfter ? : other?.deleteAfter,
86
+ (showChartAfterClose ? : other?.showChartAfterClose) != false ,
87
+ (maxVotes ? : other?.maxVotes ? : 1 ).takeIf { maxChanges == null || maxChanges == 1 } ? : 0 ,
88
+ (maxChanges ? : other?.maxChanges ? : 1 ).takeIf { maxVotes == null || maxVotes == 1 } ? : 0 ,
89
+ (hideResults ? : other?.hideResults) == true ,
90
+ (publicResults ? : other?.publicResults) == true ,
91
+ emojiMode ? : other?.emojiMode ? : PollSettings .EmojiMode .ON
92
+ )
93
+ }
0 commit comments