1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-10 04:52:38 +01:00

Merge pull request #1622 from AllanWang/remove-synthetics

Remove synthetics
This commit is contained in:
Allan Wang 2020-01-19 22:11:34 -08:00 committed by GitHub
commit 1d3a93c545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 52 additions and 29 deletions

View File

@ -183,6 +183,7 @@ android {
androidExtensions {
experimental = true
features = ["parcelize"]
}
}

View File

@ -21,30 +21,41 @@ import android.view.View
import ca.allanwang.kau.utils.scaleXY
import com.pitchedapps.frost.R
import com.pitchedapps.frost.activities.IntroActivity
import com.pitchedapps.frost.databinding.IntroThemeBinding
import com.pitchedapps.frost.enums.Theme
import com.pitchedapps.frost.utils.Prefs
import kotlinx.android.synthetic.main.intro_theme.*
/**
* Created by Allan Wang on 2017-07-28.
*/
class IntroFragmentTheme : BaseIntroFragment(R.layout.intro_theme) {
val themeList
get() = listOf(intro_theme_light, intro_theme_dark, intro_theme_amoled, intro_theme_glass)
private lateinit var binding: IntroThemeBinding
override fun viewArray(): Array<Array<out View>> = arrayOf(
val themeList
get() = with(binding) {
listOf(introThemeLight, introThemeDark, introThemeAmoled, introThemeGlass)
}
override fun viewArray(): Array<Array<out View>> = with(binding) {
arrayOf(
arrayOf(title),
arrayOf(intro_theme_light, intro_theme_dark),
arrayOf(intro_theme_amoled, intro_theme_glass)
arrayOf(introThemeLight, introThemeDark),
arrayOf(introThemeAmoled, introThemeGlass)
)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
intro_theme_light.setThemeClick(Theme.LIGHT)
intro_theme_dark.setThemeClick(Theme.DARK)
intro_theme_amoled.setThemeClick(Theme.AMOLED)
intro_theme_glass.setThemeClick(Theme.GLASS)
binding = IntroThemeBinding.bind(view)
binding.init()
}
private fun IntroThemeBinding.init() {
introThemeLight.setThemeClick(Theme.LIGHT)
introThemeDark.setThemeClick(Theme.DARK)
introThemeAmoled.setThemeClick(Theme.AMOLED)
introThemeGlass.setThemeClick(Theme.GLASS)
val currentTheme = Prefs.theme - 1
if (currentTheme in 0..3)
themeList.forEachIndexed { index, v ->

View File

@ -35,9 +35,9 @@ import ca.allanwang.kau.utils.setOnSingleTapListener
import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial
import com.pitchedapps.frost.R
import com.pitchedapps.frost.activities.IntroActivity
import com.pitchedapps.frost.databinding.IntroAnalyticsBinding
import com.pitchedapps.frost.utils.Prefs
import kotlin.math.abs
import kotlinx.android.synthetic.main.intro_analytics.*
/**
* Created by Allan Wang on 2017-07-28.
@ -142,10 +142,14 @@ class IntroFragmentAnalytics : BaseIntroFragment(R.layout.intro_analytics) {
val container: ConstraintLayout by bindViewResettable(R.id.intro_analytics_container)
override fun viewArray(): Array<Array<out View>> = arrayOf(
private lateinit var binding: IntroAnalyticsBinding
override fun viewArray(): Array<Array<out View>> = with(binding) {
arrayOf(
arrayOf(title), arrayOf(image),
arrayOf(intro_switch), arrayOf(desc)
arrayOf(introSwitch), arrayOf(desc)
)
}
override fun themeFragmentImpl() {
super.themeFragmentImpl()
@ -155,9 +159,14 @@ class IntroFragmentAnalytics : BaseIntroFragment(R.layout.intro_analytics) {
@SuppressLint("ClickableViewAccessibility")
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding = IntroAnalyticsBinding.bind(view)
binding.init()
}
private fun IntroAnalyticsBinding.init() {
image.setIcon(GoogleMaterial.Icon.gmd_bug_report, 120)
intro_switch.isSelected = Prefs.analytics
intro_switch.setOnCheckedChangeListener { _, isChecked ->
introSwitch.isSelected = Prefs.analytics
introSwitch.setOnCheckedChangeListener { _, isChecked ->
Prefs.analytics = isChecked
}
}

View File

@ -1,10 +1,3 @@
v2.4.2
v2.4.3
* Fix townhall loading
* Fix search suggestions
* Redesign navigation layout
* Update theme
* Open formatted urls from context menu
* Allow copying text with emojis
* Theme webview js dialogs
* Fix create post FAB
* Fix Android theme

View File

@ -6,6 +6,13 @@
<item text="" />
-->
<version title="v2.4.3" />
<item text="Fix Android theme" />
<item text="" />
<item text="" />
<item text="" />
<item text="" />
<version title="v2.4.2" />
<item text="Fix townhall loading" />
<item text="Fix search suggestions" />
@ -15,7 +22,6 @@
<item text="Allow copying text with emojis" />
<item text="Theme webview js dialogs" />
<item text="Fix create post FAB" />
<item text="" />
<version title="v2.4.1" />
<item text="Add better support for mobile url conversions" />

View File

@ -1,5 +1,8 @@
# Changelog
## v2.4.3
* Fix Android theme
## v2.4.2
* Fix townhall loading
* Fix search suggestions