This commit is contained in:
nuclearfog 2023-06-27 20:05:51 +02:00
parent 7d56e25123
commit 89b4b0c9ec
No known key found for this signature in database
GPG Key ID: 03488A185C476379
2 changed files with 6 additions and 4 deletions

View File

@ -13,7 +13,7 @@ android {
targetSdkVersion 33 targetSdkVersion 33
versionCode 89 versionCode 89
versionName '3.2.2' versionName '3.2.2'
resConfigs 'en', 'de-rDE', 'zh-rCN' resConfigs 'en', 'es', 'de-rDE', 'zh-rCN'
} }
buildTypes { buildTypes {

View File

@ -18,7 +18,8 @@ public class FilterUpdate implements Serializable {
private String title = ""; private String title = "";
private String[] keyWordStr = {}; private String[] keyWordStr = {};
private long[] keywordIds = {}; private long[] keywordIds = {};
private int expires_at = 0, action = Filter.ACTION_WARN; private int expires_at = 0;
private int action = Filter.ACTION_WARN;
private boolean filterHome = false; private boolean filterHome = false;
private boolean filterNotification = false; private boolean filterNotification = false;
private boolean filterPublic = true; private boolean filterPublic = true;
@ -37,16 +38,17 @@ public class FilterUpdate implements Serializable {
* @param filter existing filter * @param filter existing filter
*/ */
public FilterUpdate(Filter filter) { public FilterUpdate(Filter filter) {
int expires_at = (int) (filter.getExpirationTime() - System.currentTimeMillis());
Keyword[] keywords = filter.getKeywords();
id = filter.getId(); id = filter.getId();
title = filter.getTitle(); title = filter.getTitle();
Keyword[] keywords = filter.getKeywords(); action = filter.getAction();
keyWordStr = new String[keywords.length]; keyWordStr = new String[keywords.length];
keywordIds = new long[keywords.length]; keywordIds = new long[keywords.length];
for (int i = 0 ; i < keywords.length ; i++) { for (int i = 0 ; i < keywords.length ; i++) {
keywordIds[i] = keywords[i].getId(); keywordIds[i] = keywords[i].getId();
keyWordStr[i] = keywords[i].getKeyword(); keyWordStr[i] = keywords[i].getKeyword();
} }
int expires_at = (int) (filter.getExpirationTime() - System.currentTimeMillis());
if (expires_at > 0) { if (expires_at > 0) {
this.expires_at = expires_at; this.expires_at = expires_at;
} }