Add handling for Snapchat Plus purchase date property
This commit is contained in:
@@ -779,11 +779,14 @@ class FeaturesRootSection : Routes.Route() {
|
||||
DataProcessors.Type.STRING, DataProcessors.Type.INTEGER, DataProcessors.Type.FLOAT -> {
|
||||
val isMessageListProperty = property.key.name.endsWith("_messages")
|
||||
val isSleepWindowProperty = property.key.name.contains("sleep_window")
|
||||
val isSnapchatPlusPurchaseDateProperty = property.key.name == "snapchat_plus_purchase_date"
|
||||
|
||||
if (isMessageListProperty) {
|
||||
alertDialogs.MessageListPropertyDialog(property) { showDialog = false }
|
||||
} else if (isSleepWindowProperty) {
|
||||
alertDialogs.AutoOpenScheduleDialog(property as PropertyPair<String>) { showDialog = false }
|
||||
} else if (isSnapchatPlusPurchaseDateProperty) {
|
||||
alertDialogs.DatePickerPropertyDialog(property) { showDialog = false }
|
||||
} else {
|
||||
alertDialogs.KeyboardInputDialog(property) { showDialog = false }
|
||||
}
|
||||
@@ -801,6 +804,7 @@ class FeaturesRootSection : Routes.Route() {
|
||||
)
|
||||
} else {
|
||||
val isMessageListProperty = property.key.name.endsWith("_messages")
|
||||
val isSnapchatPlusPurchaseDateProperty = property.key.name == "snapchat_plus_purchase_date"
|
||||
if (isMessageListProperty) {
|
||||
val messageCount = try {
|
||||
val messageList: List<String> = gson.fromJson(propertyValue.get().toString(), listTypeToken) ?: emptyList()
|
||||
@@ -822,6 +826,11 @@ class FeaturesRootSection : Routes.Route() {
|
||||
color = Color.White
|
||||
)
|
||||
}
|
||||
} else if (isSnapchatPlusPurchaseDateProperty) {
|
||||
ValueGlowChip(
|
||||
text = propertyValue.get().toString(),
|
||||
onClick = click
|
||||
)
|
||||
} else {
|
||||
IconButton(onClick = click) {
|
||||
Icon(Icons.AutoMirrored.Filled.OpenInNew, contentDescription = null)
|
||||
|
||||
Reference in New Issue
Block a user