Use folder color for folder swipe icon color

pull/178/head
M66B 5 years ago
parent f2d5128655
commit 917453e407

@ -102,8 +102,8 @@ public interface DaoAccount {
LiveData<List<TupleAccountView>> liveAccountView();
@Query("SELECT account.id" +
", account.swipe_left, l.type AS left_type, l.name AS left_name" +
", account.swipe_right, r.type AS right_type, r.name AS right_name" +
", account.swipe_left, l.type AS left_type, l.name AS left_name, l.color AS left_color" +
", account.swipe_right, r.type AS right_type, r.name AS right_name, r.color AS right_color" +
" FROM account" +
" LEFT JOIN folder l ON l.id = account.swipe_left" +
" LEFT JOIN folder r ON r.id = account.swipe_right" +

@ -1733,6 +1733,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (dX > 0) {
// Right swipe
d.setAlpha(Math.round(255 * Math.min(dX / (2 * margin + size), 1.0f)));
if (swipes.right_color != null)
d.setTint(swipes.right_color);
int padding = (rect.height() - size);
d.setBounds(
rect.left + margin,
@ -1743,6 +1745,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
} else if (dX < 0) {
// Left swipe
d.setAlpha(Math.round(255 * Math.min(-dX / (2 * margin + size), 1.0f)));
if (swipes.left_color != null)
d.setTint(swipes.left_color);
int padding = (rect.height() - size);
d.setBounds(
rect.left + rect.width() - size - margin,

@ -24,7 +24,9 @@ public class TupleAccountSwipes {
public Long swipe_left;
public String left_type;
public String left_name;
public Integer left_color;
public Long swipe_right;
public String right_type;
public String right_name;
public Integer right_color;
}

Loading…
Cancel
Save