|
|
|
@ -63,6 +63,7 @@ class ComposeViewModel |
|
|
|
|
private var startingVisibility: Status.Visibility = Status.Visibility.UNKNOWN |
|
|
|
|
private var contentWarningStateChanged: Boolean = false |
|
|
|
|
public var formattingSyntax: String = "" |
|
|
|
|
private var modifiedInitialState: Boolean = false |
|
|
|
|
|
|
|
|
|
val markMediaAsSensitive = |
|
|
|
|
mutableLiveData(accountManager.activeAccount?.defaultMediaSensitivity ?: false) |
|
|
|
@ -88,7 +89,7 @@ class ComposeViewModel |
|
|
|
|
val mediaChanged = !media.value.isNullOrEmpty() |
|
|
|
|
val pollChanged = poll.value != null |
|
|
|
|
|
|
|
|
|
return textChanged || contentWarningChanged || mediaChanged || pollChanged |
|
|
|
|
return modifiedInitialState || textChanged || contentWarningChanged || mediaChanged || pollChanged |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fun contentWarningChanged(value: Boolean) { |
|
|
|
@ -186,7 +187,7 @@ class ComposeViewModel |
|
|
|
|
preferredVisibility.num.coerceAtLeast(replyVisibility.num)) |
|
|
|
|
|
|
|
|
|
inReplyToId = composeOptions?.inReplyToId |
|
|
|
|
|
|
|
|
|
modifiedInitialState = composeOptions?.modifiedInitialState == true |
|
|
|
|
|
|
|
|
|
val contentWarning = composeOptions?.contentWarning |
|
|
|
|
if (contentWarning != null) { |
|
|
|
@ -266,4 +267,4 @@ class ComposeViewModel |
|
|
|
|
private companion object { |
|
|
|
|
const val TAG = "ComposeViewModel" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|