mirror of
https://github.com/gsantner/dandelion
synced 2025-09-10 10:49:42 +02:00
Add flavor dandelior*, move flavor specific to folder instead gradle generated
This commit is contained in:
parent
957573ea83
commit
918adcf358
57 changed files with 101 additions and 33 deletions
|
@ -35,6 +35,7 @@ import com.github.dfa.diaspora_android.util.AppSettings;
|
|||
import com.github.dfa.diaspora_android.util.DiasporaUrlHelper;
|
||||
|
||||
import net.gsantner.opoc.util.AdBlock;
|
||||
import net.gsantner.opoc.util.ContextUtils;
|
||||
|
||||
public class App extends Application {
|
||||
private volatile static App app;
|
||||
|
@ -54,6 +55,13 @@ public class App extends Application {
|
|||
final Context c = getApplicationContext();
|
||||
appSettings = AppSettings.get();
|
||||
|
||||
String a = new ContextUtils(this).bcstr("FLAVOR", "");
|
||||
a += "__";
|
||||
|
||||
if (appSettings.isAppFirstStart() && "flavorDandelior".equals(new ContextUtils(this).bcstr("FLAVOR", ""))){
|
||||
appSettings.setAmoledColorMode(true);
|
||||
}
|
||||
|
||||
// Init app log
|
||||
AppLog.setLoggingEnabled(appSettings.isLoggingEnabled());
|
||||
AppLog.setLoggingSpamEnabled(appSettings.isLoggingSpamEnabled());
|
||||
|
|
|
@ -431,8 +431,6 @@ public class MainActivity extends ThemedActivity
|
|||
app.getAvatarImageLoader().startImageDownload(navheaderImage, avatarUrl);
|
||||
}
|
||||
}
|
||||
} else if (BuildConfig.IS_TEST_BUILD) {
|
||||
navheaderImage.setImageResource(R.drawable.ic_launcher_test);
|
||||
}
|
||||
updateNavigationViewEntryVisibilities();
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ public class PodSelectionFragment extends ThemedFragment implements SearchView.O
|
|||
rootView.setBackgroundColor(appSettings.isAmoledColorMode() ? Color.BLACK : Color.WHITE);
|
||||
listViewPod.setDivider(new ColorDrawable(Color.GRAY));
|
||||
listViewPod.setDividerHeight(dividerHeight);
|
||||
int bgcolor = appSettings.isAmoledColorMode() ? Color.BLACK : appSettings.getAccentColor();
|
||||
int bgcolor = appSettings.isAmoledColorMode() ? Color.DKGRAY : appSettings.getAccentColor();
|
||||
buttonUseCustomPod.setBackgroundColor(bgcolor);
|
||||
buttonUseCustomPod.setTextColor(_cu.shouldColorOnTopBeLight(bgcolor) ? Color.WHITE : Color.BLACK);
|
||||
|
||||
|
|
|
@ -443,6 +443,9 @@ public class AppSettings extends SharedPreferencesPropertyBackend {
|
|||
public boolean isAmoledColorMode() {
|
||||
return getBool(R.string.pref_key__primary_color__amoled_mode, false);
|
||||
}
|
||||
public void setAmoledColorMode(boolean enable) {
|
||||
setBool(R.string.pref_key__primary_color__amoled_mode, enable);
|
||||
}
|
||||
|
||||
public boolean isAdBlockEnabled() {
|
||||
return getBool(R.string.pref_key__adblock_enable, true);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Maintained by Gregor Santner, 2017-
|
||||
* https://gsantner.net/
|
||||
*
|
||||
* License: Apache 2.0
|
||||
* License: Apache 2.0 / Commercial
|
||||
* https://github.com/gsantner/opoc/#licensing
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*#######################################################
|
||||
*
|
||||
* Maintained by Gregor Santner, 2016-
|
||||
* Maintained by Gregor Santner, 2018-
|
||||
* https://gsantner.net/
|
||||
*
|
||||
* License: Apache 2.0
|
||||
* License: Apache 2.0 / Commercial
|
||||
* https://github.com/gsantner/opoc/#licensing
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
@ -124,6 +124,12 @@ public class SimpleMarkdownParser {
|
|||
return text;
|
||||
}
|
||||
};
|
||||
public final static SmpFilter FILTER_NONE = new SmpFilter() {
|
||||
@Override
|
||||
public String filter(String text) {
|
||||
return text;
|
||||
}
|
||||
};
|
||||
|
||||
//########################
|
||||
//## Singleton
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Maintained by Gregor Santner, 2018-
|
||||
* https://gsantner.net/
|
||||
*
|
||||
* License: Apache 2.0
|
||||
* License: Apache 2.0 / Commercial
|
||||
* https://github.com/gsantner/opoc/#licensing
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Maintained by Gregor Santner, 2016-
|
||||
* https://gsantner.net/
|
||||
*
|
||||
* License: Apache 2.0
|
||||
* License: Apache 2.0 / Commercial
|
||||
* https://github.com/gsantner/opoc/#licensing
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
@ -209,7 +209,7 @@ public class SharedPreferencesPropertyBackend implements PropertyBackend<String,
|
|||
String value = pref
|
||||
.getString(key, ARRAY_SEPARATOR)
|
||||
.replace(ARRAY_SEPARATOR_SUBSTITUTE, ARRAY_SEPARATOR);
|
||||
if (value.equals(ARRAY_SEPARATOR)) {
|
||||
if (value.equals(ARRAY_SEPARATOR) || TextUtils.isEmpty(value)) {
|
||||
return ret;
|
||||
}
|
||||
ret.addAll(Arrays.asList(value.split(ARRAY_SEPARATOR)));
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Maintained by Gregor Santner, 2016-
|
||||
* https://gsantner.net/
|
||||
*
|
||||
* License: Apache 2.0
|
||||
* License: Apache 2.0 / Commercial
|
||||
* https://github.com/gsantner/opoc/#licensing
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Maintained by Gregor Santner, 2018-
|
||||
* https://gsantner.net/
|
||||
*
|
||||
* License: Apache 2.0
|
||||
* License: Apache 2.0 / Commercial
|
||||
* https://github.com/gsantner/opoc/#licensing
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Maintained by Gregor Santner, 2016-
|
||||
* https://gsantner.net/
|
||||
*
|
||||
* License: Apache 2.0
|
||||
* License: Apache 2.0 / Commercial
|
||||
* https://github.com/gsantner/opoc/#licensing
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Maintained by Gregor Santner, 2017-
|
||||
* https://gsantner.net/
|
||||
*
|
||||
* License: Apache 2.0
|
||||
* License: Apache 2.0 / Commercial
|
||||
* https://github.com/gsantner/opoc/#licensing
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Maintained by Gregor Santner, 2017-
|
||||
* https://gsantner.net/
|
||||
*
|
||||
* License: Apache 2.0
|
||||
* License: Apache 2.0 / Commercial
|
||||
* https://github.com/gsantner/opoc/#licensing
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Maintained by Gregor Santner, 2017-
|
||||
* https://gsantner.net/
|
||||
*
|
||||
* License: Apache 2.0
|
||||
* License: Apache 2.0 / Commercial
|
||||
* https://github.com/gsantner/opoc/#licensing
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Maintained by Gregor Santner, 2017-
|
||||
* https://gsantner.net/
|
||||
*
|
||||
* License: Apache 2.0
|
||||
* License: Apache 2.0 / Commercial
|
||||
* https://github.com/gsantner/opoc/#licensing
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue