diff options
author | Allan Wang <me@allanwang.ca> | 2019-01-01 17:21:26 -0500 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-01-01 17:21:26 -0500 |
commit | 8245f835b6e5711b3363851ef70e156ae001bda3 (patch) | |
tree | 587ce07744b2d0549156ba1c2e894f9e2c3eeb0c | |
parent | 91de05ef93c592cd3da9311a60e14751eef27750 (diff) | |
download | frost-8245f835b6e5711b3363851ef70e156ae001bda3.tar.gz frost-8245f835b6e5711b3363851ef70e156ae001bda3.tar.bz2 frost-8245f835b6e5711b3363851ef70e156ae001bda3.zip |
Close channels after destroy, resolves #1292
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt | 4 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt | 6 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt | 2 | ||||
-rw-r--r-- | docs/Privacy.md | 4 |
5 files changed, 11 insertions, 7 deletions
@@ -11,7 +11,7 @@ [Join the Slack Workspace](https://frost-slack.allanwang.ca) **Note** Some keystores are public for the sake of automatic builds and consistent signing across devices. -This means that others can build apps with the same signature. The only valid download sources are through my github releases. +This means that others can build apps with the same signature. The only valid download sources are through my github releases and F-Droid. Frost is a third party Facebook wrapper geared towards design and functionality. It contains many features, including: diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt index 13253bcf..0f3a1e52 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt @@ -485,10 +485,10 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, } override fun onDestroy() { - fragmentChannel.close() - headerBadgeChannel.close() controlWebview?.destroy() super.onDestroy() + fragmentChannel.close() + headerBadgeChannel.close() } override fun collapseAppBar() { diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt index 9a0c6270..230c1a55 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt @@ -66,7 +66,11 @@ class MainActivity : BaseMainActivity() { } } }) - viewPager.post { fragmentChannel.offer(0); lastPosition = 0 } //trigger hook so title is set + viewPager.post { + if (!fragmentChannel.isClosedForSend) + fragmentChannel.offer(0) + lastPosition = 0 + } //trigger hook so title is set } private fun setupTabs() { diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt index ea549026..0000195c 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt @@ -209,11 +209,11 @@ abstract class BaseFragment : Fragment(), CoroutineScope, FragmentContract, Dyna } override fun onDestroyView() { + super.onDestroyView() L.i { "Fragment on destroy $position ${hashCode()}" } content?.destroy() content = null detachMainObservable() - super.onDestroyView() } override fun onDestroy() { diff --git a/docs/Privacy.md b/docs/Privacy.md index 9a407cc4..1772eb4b 100644 --- a/docs/Privacy.md +++ b/docs/Privacy.md @@ -4,5 +4,5 @@ Each user is assigned a random id when they install the app, which is used when If you wish, you may disable automatic bug reports in the app settings. Note that Frost still depends on Facebook's mobile site, so you may want to review Facebook's privacy policy before continuing. -Locally, Frost will store your cookie in an app specific folder, which allows for features like multi user accounts. -This is never shared beyond the app itself,
\ No newline at end of file +Locally, Frost will store your cookie in an app specific folder, as well as your Facebook user id, which allows for features like multi user accounts. +This is never shared beyond the app itself.
\ No newline at end of file |