diff --git a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/util/ViewExtensions.kt b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/util/ViewExtensions.kt index c1313c2355..077759904a 100644 --- a/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/util/ViewExtensions.kt +++ b/android/ui/mobile/src/main/kotlin/com/oztechan/ccc/android/ui/mobile/util/ViewExtensions.kt @@ -19,9 +19,6 @@ import androidx.core.content.ContextCompat import androidx.core.view.children import androidx.core.view.isGone import androidx.core.view.isVisible -import androidx.fragment.app.Fragment -import androidx.navigation.fragment.findNavController -import co.touchlab.kermit.Logger import com.github.submob.scopemob.castTo import com.oztechan.ccc.android.core.ad.AdManager import com.oztechan.ccc.android.core.ad.BannerAdView @@ -73,32 +70,6 @@ fun View.animateHeight(startHeight: Int, endHeight: Int) { startAnimation(animation) } -fun Fragment.getNavigationResult( - key: String, - destinationId: Int -) = try { - findNavController() - .currentBackStackEntry - ?.savedStateHandle - ?.getLiveData(key) -} catch (e: IllegalArgumentException) { - Logger.e(e) { "$destinationId is not found in the backstack when getting navigation result for key $key" } - null -} - -fun Fragment.setNavigationResult( - destinationId: Int, - result: T, - key: String -) = try { - findNavController() - .previousBackStackEntry - ?.savedStateHandle - ?.set(key, result) -} catch (e: IllegalArgumentException) { - Logger.e(e) { "$destinationId is not found in the backstack when setting navigation result for key $key" } -} - fun View?.visibleIf(visible: Boolean, bringFront: Boolean = false) = this?.apply { if (visible) { isVisible = true