From eda5bc50e6c8d45b2d720846b88824ba3e0616a7 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 14 Aug 2024 10:45:57 -0400 Subject: [PATCH] Adds a destroy method to FollowList state for consistency --- .../com/vitorpamplona/amethyst/ui/screen/FollowListState.kt | 5 +++++ .../amethyst/ui/screen/loggedIn/AccountFeedContentStates.kt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/FollowListState.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/FollowListState.kt index bbbd29cae..4dae43fc6 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/FollowListState.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/FollowListState.kt @@ -21,6 +21,7 @@ package com.vitorpamplona.amethyst.ui.screen import android.content.Context +import android.util.Log import androidx.compose.runtime.Immutable import androidx.compose.runtime.Stable import com.vitorpamplona.amethyst.R @@ -186,6 +187,10 @@ class FollowListState( livePeopleListsFlow.emit(getPeopleLists()) } + + fun destroy() { + Log.d("Init", "OnCleared: ${this.javaClass.simpleName}") + } } enum class CodeNameType { diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountFeedContentStates.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountFeedContentStates.kt index df007692d..91f25c276 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountFeedContentStates.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/AccountFeedContentStates.kt @@ -104,6 +104,6 @@ class AccountFeedContentStates( notifications.destroy() notificationSummary.destroy() - // feedListOptions.destroy() + feedListOptions.destroy() } }