aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-04 14:11:52 -0400
committerGitHub <noreply@github.com>2017-07-04 14:11:52 -0400
commitd6c5bcd56e293eaf281663b6c1e6b0ab7236be9f (patch)
treedec58af06d220ba80920fcf9c816b71413c61108
parent7a13673828f088c179763e8621a94e334319f226 (diff)
downloadfrost-d6c5bcd56e293eaf281663b6c1e6b0ab7236be9f.tar.gz
frost-d6c5bcd56e293eaf281663b6c1e6b0ab7236be9f.tar.bz2
frost-d6c5bcd56e293eaf281663b6c1e6b0ab7236be9f.zip
Small miscellaneous fixes
* mist * Add back experimental section * Remove update dev sh
-rw-r--r--.gitignore3
-rw-r--r--.idea/misc.xml2
-rw-r--r--app/src/main/assets/css/core/main.compact.css2
-rw-r--r--app/src/main/assets/css/core/main.scss2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt5
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Showcase.kt3
-rw-r--r--app/src/main/res/values/strings_preferences2
-rw-r--r--files/update-dev.sh10
-rw-r--r--files/update-dev.txt15
11 files changed, 32 insertions, 16 deletions
diff --git a/.gitignore b/.gitignore
index 3fa0307a..d55b28aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,5 @@
files/gplay-keys.json
files/play.keystore
files/play.properties
-files/test.keystore \ No newline at end of file
+files/test.keystore
+files/update-dev.sh
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 7319f021..085136f8 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -53,7 +53,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
diff --git a/app/src/main/assets/css/core/main.compact.css b/app/src/main/assets/css/core/main.compact.css
index 5392122a..daabdad9 100644
--- a/app/src/main/assets/css/core/main.compact.css
+++ b/app/src/main/assets/css/core/main.compact.css
@@ -10,7 +10,7 @@ body, #root, #header, [style*="background-color"], ._55wo, ._1upc, input, ._2f9r
button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._2k51, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, .acbk { background: rgba(199, 70, 70, 0.2) !important; }
-[style*="color"], body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, h1, h2, h3, h4, h5, h6 { color: #d7b0d7 !important; }
+[style*="color"], body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs, h1, h2, h3, h4, h5, h6 { color: #d7b0d7 !important; }
._15kl::before, ._5j35::after, ._2k4b, ._3to7, ._4nw8 { border-left: 1px solid rgba(215, 176, 215, 0.3) !important; }
diff --git a/app/src/main/assets/css/core/main.scss b/app/src/main/assets/css/core/main.scss
index 12c905d9..44a90801 100644
--- a/app/src/main/assets/css/core/main.scss
+++ b/app/src/main/assets/css/core/main.scss
@@ -40,7 +40,7 @@ button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._
[style*="color"], body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, ._45fu, ._18qg, ._1_ac,
textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._cv_, ._1nbx, ._2cuh, ._4ms9, ._4ms5, ._4ms6, ._31b4, ._31b5, ._5q_r, ._idb,
._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, ._559g, ._2new, .appCenterCategorySelectorButton,
-.mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8,
+.mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, .appListExplanation, ._5yt8, ._8he, ._2luw, ._5rgs,
h1, h2, h3, h4, h5, h6 {
color: $text !important;
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
index aa84edf7..85a49730 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
@@ -37,8 +37,8 @@ class FrostApp : Application() {
override fun onCreate() {
FlowManager.init(FlowConfig.Builder(this).build())
- Prefs.initialize(this, "${BuildConfig.APPLICATION_ID}.prefs")
Showcase.initialize(this, "${BuildConfig.APPLICATION_ID}.showcase")
+ Prefs.initialize(this, "${BuildConfig.APPLICATION_ID}.prefs")
// if (LeakCanary.isInAnalyzerProcess(this)) return
// refWatcher = LeakCanary.install(this)
if (BuildConfig.DEBUG) {
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt
index e0e18622..6022ee26 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Experimental.kt
@@ -5,6 +5,7 @@ import com.pitchedapps.frost.MainActivity
import com.pitchedapps.frost.R
import com.pitchedapps.frost.SettingsActivity
import com.pitchedapps.frost.utils.Prefs
+import com.pitchedapps.frost.utils.Showcase
/**
* Created by Allan Wang on 2017-06-29.
@@ -15,6 +16,10 @@ fun SettingsActivity.getExperimentalPrefs(): KPrefAdapterBuilder.() -> Unit = {
descRes = R.string.experimental_disclaimer_info
}
+ checkbox(R.string.experimental_by_default, { Showcase.experimentalDefault }, { Showcase.experimentalDefault = it }) {
+ descRes = R.string.experimental_by_default_desc
+ }
+
checkbox(R.string.search_bar, { Prefs.searchBar }, { Prefs.searchBar = it; setResult(MainActivity.REQUEST_SEARCH) }) {
descRes = R.string.search_bar_desc
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
index cf565b09..07127dd5 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Prefs.kt
@@ -97,6 +97,6 @@ object Prefs : KPref() {
var analytics: Boolean by kpref("analytics", true)
- var searchBar: Boolean by kpref("search_bar", false)
+ var searchBar: Boolean by kpref("search_bar", Showcase.experimentalDefault)
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Showcase.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Showcase.kt
index 1429dc1a..b1dbe6f1 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Showcase.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Showcase.kt
@@ -12,5 +12,8 @@ object Showcase : KPref() {
//check if this is the first time launching the web overlay; show snackbar if true
var firstWebOverlay: Boolean by kpref("first_web_overlay", true)
+
+ //not a showcase but cannot be in the same file as Prefs
+ var experimentalDefault: Boolean by kpref("experimental_by_default", false)
}
diff --git a/app/src/main/res/values/strings_preferences b/app/src/main/res/values/strings_preferences
index faaaf96c..34fe5e9b 100644
--- a/app/src/main/res/values/strings_preferences
+++ b/app/src/main/res/values/strings_preferences
@@ -50,6 +50,8 @@
<string name="experimental_desc">Enable early access to potentially unstable features</string>
<string name="experimental_disclaimer">Disclaimer</string>
<string name="experimental_disclaimer_info">Experimental features may be unstable and may never make it to production. Use at your own risk, send feedback, and feel free to disable them if they don\'t work well.</string>
+ <string name="experimental_by_default">Experimental by Default</string>
+ <string name="experimental_by_default_desc">Feeling risky or just want to help with debugging? Checking this will enable future experimental functions be default.</string>
<string name="search_bar">Search Bar</string>
<string name="search_bar_desc">Enable the search bar instead of a search overlay</string>
<string name="verbose_logging">Verbose Logging</string>
diff --git a/files/update-dev.sh b/files/update-dev.sh
deleted file mode 100644
index 8516f992..00000000
--- a/files/update-dev.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-git checkout dev
-git cmp hard rebase
-git branch -f dev-bak dev
-git checkout master
-git pull origin master
-git branch -f dev master
-git checkout dev
-git push -u -f origin dev \ No newline at end of file
diff --git a/files/update-dev.txt b/files/update-dev.txt
new file mode 100644
index 00000000..91ff4c1b
--- /dev/null
+++ b/files/update-dev.txt
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+# Script to reset dev branch to master
+# Once it is squashed and merged on github
+# Copy this to a sh file, which is gitignored
+# So there won't be save conflicts
+
+git checkout dev
+git cmp hard rebase
+git branch -f dev-bak dev
+git checkout master
+git pull -f origin master
+git branch -f dev master
+git checkout dev
+git push -u -f origin dev