Fix issue in light mode + removing timeline in settings
This commit is contained in:
parent
7ac2c3984d
commit
b7eec4948d
|
@ -114,6 +114,7 @@ import fr.gouv.etalab.mastodon.sqlite.TempMuteDAO;
|
||||||
import static fr.gouv.etalab.mastodon.activities.MainActivity.currentLocale;
|
import static fr.gouv.etalab.mastodon.activities.MainActivity.currentLocale;
|
||||||
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_BLACK;
|
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_BLACK;
|
||||||
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_DARK;
|
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_DARK;
|
||||||
|
import static fr.gouv.etalab.mastodon.helper.Helper.THEME_LIGHT;
|
||||||
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
|
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
|
||||||
import static fr.gouv.etalab.mastodon.helper.Helper.getLiveInstance;
|
import static fr.gouv.etalab.mastodon.helper.Helper.getLiveInstance;
|
||||||
|
|
||||||
|
@ -409,10 +410,6 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
status.setBookmarked(true);
|
status.setBookmarked(true);
|
||||||
else
|
else
|
||||||
status.setBookmarked(false);
|
status.setBookmarked(false);
|
||||||
if( status.isBookmarked())
|
|
||||||
holder.status_bookmark.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.ic_bookmark));
|
|
||||||
else
|
|
||||||
holder.status_bookmark.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.ic_bookmark_border));
|
|
||||||
|
|
||||||
if( status.isNew())
|
if( status.isNew())
|
||||||
holder.new_element.setVisibility(View.VISIBLE);
|
holder.new_element.setVisibility(View.VISIBLE);
|
||||||
|
@ -500,8 +497,9 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
changeDrawableColor(context, R.drawable.ic_pin_drop, R.color.black);
|
changeDrawableColor(context, R.drawable.ic_pin_drop, R.color.black);
|
||||||
changeDrawableColor(context, R.drawable.ic_photo,R.color.mastodonC4);
|
changeDrawableColor(context, R.drawable.ic_photo,R.color.mastodonC4);
|
||||||
changeDrawableColor(context, R.drawable.ic_remove_red_eye,R.color.mastodonC4);
|
changeDrawableColor(context, R.drawable.ic_remove_red_eye,R.color.mastodonC4);
|
||||||
changeDrawableColor(context, R.drawable.ic_translate,R.color.white);
|
changeDrawableColor(context, R.drawable.ic_translate,R.color.black);
|
||||||
|
changeDrawableColor(context, R.drawable.ic_bookmark,R.color.black);
|
||||||
|
changeDrawableColor(context, R.drawable.ic_bookmark_border,R.color.black);
|
||||||
holder.status_favorite_count.setTextColor(ContextCompat.getColor(context, R.color.black));
|
holder.status_favorite_count.setTextColor(ContextCompat.getColor(context, R.color.black));
|
||||||
holder.status_reblog_count.setTextColor(ContextCompat.getColor(context, R.color.black));
|
holder.status_reblog_count.setTextColor(ContextCompat.getColor(context, R.color.black));
|
||||||
holder.status_toot_date.setTextColor(ContextCompat.getColor(context, R.color.black));
|
holder.status_toot_date.setTextColor(ContextCompat.getColor(context, R.color.black));
|
||||||
|
@ -509,6 +507,12 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
holder.status_account_displayname.setTextColor(ContextCompat.getColor(context, R.color.black));
|
holder.status_account_displayname.setTextColor(ContextCompat.getColor(context, R.color.black));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( status.isBookmarked())
|
||||||
|
holder.status_bookmark.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.ic_bookmark));
|
||||||
|
else
|
||||||
|
holder.status_bookmark.setImageDrawable(ContextCompat.getDrawable(context, R.drawable.ic_bookmark_border));
|
||||||
|
|
||||||
|
|
||||||
//Redraws top icons (boost/reply)
|
//Redraws top icons (boost/reply)
|
||||||
final float scale = context.getResources().getDisplayMetrics().density;
|
final float scale = context.getResources().getDisplayMetrics().density;
|
||||||
if( status.getReblog() != null){
|
if( status.getReblog() != null){
|
||||||
|
|
|
@ -284,7 +284,6 @@ public class SettingsFragment extends Fragment {
|
||||||
if( getActivity() != null)
|
if( getActivity() != null)
|
||||||
getActivity().recreate();
|
getActivity().recreate();
|
||||||
Intent intent = new Intent(context, MainActivity.class);
|
Intent intent = new Intent(context, MainActivity.class);
|
||||||
intent.putExtra(INTENT_ACTION, CHANGE_THEME_INTENT);
|
|
||||||
if(getActivity() != null)
|
if(getActivity() != null)
|
||||||
getActivity().finish();
|
getActivity().finish();
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
@ -304,7 +303,6 @@ public class SettingsFragment extends Fragment {
|
||||||
if( getActivity() != null)
|
if( getActivity() != null)
|
||||||
getActivity().recreate();
|
getActivity().recreate();
|
||||||
Intent intent = new Intent(context, MainActivity.class);
|
Intent intent = new Intent(context, MainActivity.class);
|
||||||
intent.putExtra(INTENT_ACTION, CHANGE_THEME_INTENT);
|
|
||||||
if(getActivity() != null)
|
if(getActivity() != null)
|
||||||
getActivity().finish();
|
getActivity().finish();
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|
|
@ -84,7 +84,6 @@
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/status_translate"
|
android:id="@+id/status_translate"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:tint="@android:color/white"
|
|
||||||
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
Loading…
Reference in New Issue