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