From f038ed790f74d496098575d4e9112f958d9cd6c9 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 7 Mar 2019 18:29:24 -0500 Subject: Fix tab customizer activity --- .../com/pitchedapps/frost/activities/TabCustomizerActivity.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt index a5dceb3a..7781e190 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt @@ -40,6 +40,7 @@ import com.pitchedapps.frost.db.save import com.pitchedapps.frost.db.selectAll import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.iitems.TabIItem +import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.Prefs import com.pitchedapps.frost.utils.setFrostColors import kotlinx.android.synthetic.main.activity_tab_customizer.* @@ -74,15 +75,17 @@ class TabCustomizerActivity : BaseActivity() { launch { val tabs = tabDao.selectAll().toMutableList() + L.d { "Tabs $tabs" } val remaining = FbItem.values().filter { it.name[0] != '_' }.toMutableList() remaining.removeAll(tabs) tabs.addAll(remaining) - adapter.add(tabs.map(::TabIItem)) - } + adapter.set(tabs.map(::TabIItem)) + + bindSwapper(adapter, tab_recycler) - bindSwapper(adapter, tab_recycler) + adapter.withOnClickListener { view, _, _, _ -> view!!.wobble(); true } - adapter.withOnClickListener { view, _, _, _ -> view!!.wobble(); true } + } setResult(Activity.RESULT_CANCELED) -- cgit v1.2.3