mirror of
https://codeberg.org/gitnex/GitNex
synced 2024-12-23 00:48:57 +01:00
Use only one statement for new theme.
This commit is contained in:
parent
61f953d70d
commit
900b060c31
@ -17,10 +17,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
|
||||
final TinyDB tinyDb = new TinyDB(getApplicationContext());
|
||||
|
||||
if(tinyDb.getInt("themeId") == 0) {
|
||||
setTheme(R.style.AppTheme);
|
||||
}
|
||||
else if(tinyDb.getInt("themeId") == 1) {
|
||||
if(tinyDb.getInt("themeId") == 1) {
|
||||
setTheme(R.style.AppThemeLight);
|
||||
}
|
||||
else {
|
||||
|
@ -114,13 +114,10 @@ public class RepoStargazersAdapter extends BaseAdapter {
|
||||
viewHolder.memberName.setTypeface(myTypeface);
|
||||
}
|
||||
|
||||
if(tinyDb.getInt("themeId") == 0) { // dark
|
||||
viewHolder.memberName.setTextColor(mCtx.getResources().getColor(R.color.white));
|
||||
}
|
||||
else if(tinyDb.getInt("themeId") == 1) { //light
|
||||
if(tinyDb.getInt("themeId") == 1) { //light
|
||||
viewHolder.memberName.setTextColor(mCtx.getResources().getColor(R.color.lightThemeTextColor));
|
||||
}
|
||||
else {
|
||||
else { // dark
|
||||
viewHolder.memberName.setTextColor(mCtx.getResources().getColor(R.color.white));
|
||||
}
|
||||
|
||||
|
@ -114,13 +114,10 @@ public class RepoWatchersAdapter extends BaseAdapter {
|
||||
viewHolder.memberName.setTypeface(myTypeface);
|
||||
}
|
||||
|
||||
if(tinyDb.getInt("themeId") == 0) { // dark
|
||||
viewHolder.memberName.setTextColor(mCtx.getResources().getColor(R.color.white));
|
||||
}
|
||||
else if(tinyDb.getInt("themeId") == 1) { //light
|
||||
if(tinyDb.getInt("themeId") == 1) { //light
|
||||
viewHolder.memberName.setTextColor(mCtx.getResources().getColor(R.color.lightThemeTextColor));
|
||||
}
|
||||
else {
|
||||
else { // dark
|
||||
viewHolder.memberName.setTextColor(mCtx.getResources().getColor(R.color.white));
|
||||
}
|
||||
|
||||
|
@ -115,13 +115,10 @@ public class TeamMembersByOrgAdapter extends BaseAdapter {
|
||||
viewHolder.memberName.setTypeface(myTypeface);
|
||||
}
|
||||
|
||||
if(tinyDb.getInt("themeId") == 0) { // dark
|
||||
viewHolder.memberName.setTextColor(mCtx.getResources().getColor(R.color.white));
|
||||
}
|
||||
else if(tinyDb.getInt("themeId") == 1) { //light
|
||||
if(tinyDb.getInt("themeId") == 1) { //light
|
||||
viewHolder.memberName.setTextColor(mCtx.getResources().getColor(R.color.lightThemeTextColor));
|
||||
}
|
||||
else {
|
||||
else { // dark
|
||||
viewHolder.memberName.setTextColor(mCtx.getResources().getColor(R.color.white));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user