Merge remote-tracking branch 'upstream/main'

This commit is contained in:
adbenitez
2024-12-07 14:29:12 +01:00
53 changed files with 118 additions and 41 deletions
@@ -86,7 +86,7 @@ public class DcContext {
public final static int DC_CONNECTIVITY_CONNECTED = 4000;
private static final String CONFIG_ACCOUNT_ENABLED = "ui.enabled";
private static final String CONFIG_MENTION_NOTIF_ENABLED = "ui.notify_mentions";
private static final String CONFIG_MUTE_MENTIONS_IF_MUTED = "ui.mute_mentions_if_muted";
// when using DcAccounts, use DcAccounts.addAccount() instead
public DcContext(String osName, String dbfile) {
@@ -228,11 +228,11 @@ public class DcContext {
}
public boolean isMentionsEnabled() {
return !"0".equals(getConfig(CONFIG_MENTION_NOTIF_ENABLED));
return getConfigInt(CONFIG_MUTE_MENTIONS_IF_MUTED) != 1;
}
public void setMentionsEnabled(boolean enabled) {
setConfigInt(CONFIG_MENTION_NOTIF_ENABLED, enabled? 1 : 0);
setConfigInt(CONFIG_MUTE_MENTIONS_IF_MUTED, enabled? 0 : 1);
}
public String getName() {