From: Damyan Ivanov Date: Tue, 2 Mar 2021 16:56:14 +0000 (+0200) Subject: Templates: order fallback templates at the bottom of the list X-Git-Tag: v0.17.0~55 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=75c771fe745ac8e4bb94c3830baa85144bfdd8da;p=mobile-ledger.git Templates: order fallback templates at the bottom of the list --- diff --git a/app/src/main/java/net/ktnx/mobileledger/dao/TemplateHeaderDAO.java b/app/src/main/java/net/ktnx/mobileledger/dao/TemplateHeaderDAO.java index bfc2a562..b14502c7 100644 --- a/app/src/main/java/net/ktnx/mobileledger/dao/TemplateHeaderDAO.java +++ b/app/src/main/java/net/ktnx/mobileledger/dao/TemplateHeaderDAO.java @@ -66,7 +66,7 @@ public abstract class TemplateHeaderDAO { }); } - @Query("SELECT * FROM templates ORDER BY UPPER(name)") + @Query("SELECT * FROM templates ORDER BY is_fallback, UPPER(name)") public abstract LiveData> getTemplates(); @Query("SELECT * FROM templates WHERE id = :id")