aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian S. <kriztan@users.noreply.github.com>2015-07-18 10:45:24 +0200
committerChristian S. <kriztan@users.noreply.github.com>2015-07-18 10:45:24 +0200
commit733d12d4964ea4e3c5267d4d7805cd385f9fd41d (patch)
tree8d8b99eec2bb8e2fe5f6e4e567dea4f6a798fd9e
parent71c40c81b0fb02c31bc13b8b4ec35ecff30747f3 (diff)
parent67005385951cd6d0c172c9056b2a99ba46c10c93 (diff)
Merge pull request #10 from kriztan/siacs-development
version 1.5.0
-rw-r--r--build.gradle6
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Message.java26
-rw-r--r--src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java4
-rw-r--r--src/main/res/values-bg/strings.xml2
-rw-r--r--src/main/res/values-cs/strings.xml2
-rw-r--r--src/main/res/values-de/strings.xml2
-rw-r--r--src/main/res/values-es/strings.xml2
-rw-r--r--src/main/res/values-eu/strings.xml4
-rw-r--r--src/main/res/values-sr/strings.xml2
-rw-r--r--src/main/res/values-sv/strings.xml2
11 files changed, 39 insertions, 15 deletions
diff --git a/build.gradle b/build.gradle
index cab13a29d..a10ba2b5b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -45,9 +45,9 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
- versionCode 77
- versionName "1.5.0-beta2"
- }
+ versionCode 78
+ versionName "1.5.0"
+}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java
index 28ef89df1..957c2a6d7 100644
--- a/src/main/java/eu/siacs/conversations/entities/Message.java
+++ b/src/main/java/eu/siacs/conversations/entities/Message.java
@@ -321,15 +321,25 @@ public class Message extends AbstractEntity {
return this.serverMsgId.equals(message.getServerMsgId());
} else if (this.body == null || this.counterpart == null) {
return false;
- } else if (message.getRemoteMsgId() != null) {
- return (message.getRemoteMsgId().equals(this.remoteMsgId) || message.getRemoteMsgId().equals(this.uuid))
- && this.counterpart.equals(message.getCounterpart())
- && this.body.equals(message.getBody());
} else {
- return this.remoteMsgId == null
- && this.counterpart.equals(message.getCounterpart())
- && this.body.equals(message.getBody())
- && Math.abs(this.getTimeSent() - message.getTimeSent()) < Config.MESSAGE_MERGE_WINDOW * 1000;
+ String body, otherBody;
+ if (this.hasFileOnRemoteHost()) {
+ body = getFileParams().url.toString();
+ otherBody = message.body == null ? null : message.body.trim();
+ } else {
+ body = this.body;
+ otherBody = message.body;
+ }
+ if (message.getRemoteMsgId() != null) {
+ return (message.getRemoteMsgId().equals(this.remoteMsgId) || message.getRemoteMsgId().equals(this.uuid))
+ && this.counterpart.equals(message.getCounterpart())
+ && body.equals(otherBody);
+ } else {
+ return this.remoteMsgId == null
+ && this.counterpart.equals(message.getCounterpart())
+ && body.equals(otherBody)
+ && Math.abs(this.getTimeSent() - message.getTimeSent()) < Config.MESSAGE_MERGE_WINDOW * 1000;
+ }
}
}
diff --git a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java
index 6fcd8c870..62fe4191d 100644
--- a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java
+++ b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java
@@ -90,7 +90,7 @@ public class HttpDownloadConnection implements Transferable {
&& this.file.getKey() == null) {
this.message.setEncryption(Message.ENCRYPTION_NONE);
}
- checkFileSize(true);
+ checkFileSize(interactive);
} catch (MalformedURLException e) {
this.cancel();
}
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java
index f78bfc5d1..c0ee779a6 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java
@@ -52,7 +52,7 @@ public class AccountAdapter extends ArrayAdapter<Account> {
break;
}
final Switch tglAccountState = (Switch) view.findViewById(R.id.tgl_account_status);
- final boolean isDisabled = (account.getStatus() == Account.State.DISABLED) ? true : false;
+ final boolean isDisabled = (account.getStatus() == Account.State.DISABLED);
tglAccountState.setOnCheckedChangeListener(null);
tglAccountState.setChecked(!isDisabled);
tglAccountState.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@@ -65,4 +65,4 @@ public class AccountAdapter extends ArrayAdapter<Account> {
});
return view;
}
-} \ No newline at end of file
+}
diff --git a/src/main/res/values-bg/strings.xml b/src/main/res/values-bg/strings.xml
index 8afd3d129..cff228f7a 100644
--- a/src/main/res/values-bg/strings.xml
+++ b/src/main/res/values-bg/strings.xml
@@ -288,6 +288,7 @@
<string name="conference_members_only">Тази беседа е само за членове</string>
<string name="conference_kicked">Бяхте изритан от тази конференция</string>
<string name="using_account">използвайки профила %s</string>
+ <string name="checking_x">Проверяване на %s на HTTP сървъра</string>
<string name="not_connected_try_again">Не сте свързани. Опитайте отново по-късно</string>
<string name="check_x_filesize">Проверете размера на %s</string>
<string name="message_options">Настройки за съобщенята</string>
@@ -449,4 +450,5 @@
<string name="recently_used">Използвани наскоро</string>
<string name="choose_quick_action">Изберете бързо действие</string>
<string name="file_not_found_on_remote_host">Файлът не е открит на отдалечения сървър</string>
+ <string name="search_for_contacts_or_groups">Търсене на контакти или групи</string>
</resources>
diff --git a/src/main/res/values-cs/strings.xml b/src/main/res/values-cs/strings.xml
index 2bc213211..190fd575c 100644
--- a/src/main/res/values-cs/strings.xml
+++ b/src/main/res/values-cs/strings.xml
@@ -288,6 +288,7 @@
<string name="conference_members_only">Tato konference je pouze pro členy</string>
<string name="conference_kicked">Vykopli tě z této konference</string>
<string name="using_account">za použití účtu %s</string>
+ <string name="checking_x">Ověřuji %s na HTTP hostiteli</string>
<string name="not_connected_try_again">Bez připojení. Zkus znovu později</string>
<string name="check_x_filesize">Ověřit %s velikost</string>
<string name="message_options">Možnosti zpráv</string>
@@ -451,4 +452,5 @@
<string name="recently_used">Naposledy použitá</string>
<string name="choose_quick_action">Vybrat rychlou akci</string>
<string name="file_not_found_on_remote_host">Soubor nenalezen na vzdáleném serveru</string>
+ <string name="search_for_contacts_or_groups">Hledat kontakty či skupiny</string>
</resources>
diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml
index c2e1a50fe..0bd4afaaa 100644
--- a/src/main/res/values-de/strings.xml
+++ b/src/main/res/values-de/strings.xml
@@ -288,6 +288,7 @@
<string name="conference_members_only">Die Konferenz ist nur für Mitglieder</string>
<string name="conference_kicked">Du wurdest aus der Konferenz geworfen</string>
<string name="using_account">Verwende Konto %s</string>
+ <string name="checking_x">%s auf HTTP-Host prüfen</string>
<string name="not_connected_try_again">Nicht verbunden, bitte später versuchen</string>
<string name="check_x_filesize">%s-Größe prüfen</string>
<string name="message_options">Nachrichtenoptionen</string>
@@ -449,4 +450,5 @@
<string name="recently_used">zuletzt verwendet</string>
<string name="choose_quick_action">wähle Schnell-Taste</string>
<string name="file_not_found_on_remote_host">Datei auf Server nicht gefunden</string>
+ <string name="search_for_contacts_or_groups">Nach Kontakten oder Konferenzen suchen</string>
</resources>
diff --git a/src/main/res/values-es/strings.xml b/src/main/res/values-es/strings.xml
index 6ab0c68f3..29938612f 100644
--- a/src/main/res/values-es/strings.xml
+++ b/src/main/res/values-es/strings.xml
@@ -288,6 +288,7 @@
<string name="conference_members_only">Esta conversación es solo para miembros</string>
<string name="conference_kicked">Has sido expulsado de esta conversación</string>
<string name="using_account">Usando cuenta %s</string>
+ <string name="checking_x">Comprobando %s en servidor HTTP</string>
<string name="not_connected_try_again">No estás conectado. Inténtalo más tarde</string>
<string name="check_x_filesize">Comprobar tamaño de %s</string>
<string name="message_options">Opciones de mensaje</string>
@@ -449,4 +450,5 @@
<string name="recently_used">Usada más recientemente</string>
<string name="choose_quick_action">Elegir acción rápida</string>
<string name="file_not_found_on_remote_host">Archivo no encontrado en servidor remoto</string>
+ <string name="search_for_contacts_or_groups">Buscar contactos o grupos</string>
</resources>
diff --git a/src/main/res/values-eu/strings.xml b/src/main/res/values-eu/strings.xml
index 7600be322..028acc532 100644
--- a/src/main/res/values-eu/strings.xml
+++ b/src/main/res/values-eu/strings.xml
@@ -288,8 +288,9 @@
<string name="conference_members_only">Konferentzia hau kideentzat da soilik</string>
<string name="conference_kicked">Konferentzia honetatik kanporatua izan zara</string>
<string name="using_account">%s kontua erabiltzen</string>
+ <string name="checking_x">%s egiaztatzen HTTP ostalarian</string>
<string name="not_connected_try_again">Ez zaude konektatuta. Saiatu beranduago berriz</string>
- <string name="check_x_filesize">Egiaztatu %s neurria</string>
+ <string name="check_x_filesize">Egiaztatu %sren neurria</string>
<string name="message_options">Mezuaren aukerak</string>
<string name="copy_text">Testua kopiatu</string>
<string name="copy_original_url">Jatorrizko URLa kopiatu</string>
@@ -449,4 +450,5 @@
<string name="recently_used">Azkenengo aldiz erabilitakoa</string>
<string name="choose_quick_action">Ekintza azkarra aukeratu</string>
<string name="file_not_found_on_remote_host">Fitxategia ez da aurkitu urruneko zerbitzarian</string>
+ <string name="search_for_contacts_or_groups">Kontaktuak edo taldeak bilatu</string>
</resources>
diff --git a/src/main/res/values-sr/strings.xml b/src/main/res/values-sr/strings.xml
index 089d2fa88..082cfa465 100644
--- a/src/main/res/values-sr/strings.xml
+++ b/src/main/res/values-sr/strings.xml
@@ -288,6 +288,7 @@
<string name="conference_members_only">Ова конференција је само за чланове</string>
<string name="conference_kicked">Шутнути сте из ове конференције</string>
<string name="using_account">преко налога %s</string>
+ <string name="checking_x">Проверавам %s на ХТТП домаћину</string>
<string name="not_connected_try_again">Нисте повезани. Покушајте поново касније</string>
<string name="check_x_filesize">Провери величину %s</string>
<string name="message_options">Опције поруке</string>
@@ -451,4 +452,5 @@
<string name="recently_used">Недавно коришћена</string>
<string name="choose_quick_action">Изаберите брзу радњу</string>
<string name="file_not_found_on_remote_host">Фајл није нађен на удаљеном серверу</string>
+ <string name="search_for_contacts_or_groups">Тражите контакте или групе</string>
</resources>
diff --git a/src/main/res/values-sv/strings.xml b/src/main/res/values-sv/strings.xml
index 6a0b262e2..98ab71105 100644
--- a/src/main/res/values-sv/strings.xml
+++ b/src/main/res/values-sv/strings.xml
@@ -288,6 +288,7 @@
<string name="conference_members_only">Medlemsskap krävs för denna konferens</string>
<string name="conference_kicked">Du har blivit utsparkad från denna konferens</string>
<string name="using_account">använder konto %s</string>
+ <string name="checking_x">Kontrollerar %s på webbserver</string>
<string name="not_connected_try_again">Du är inte ansluten. Försök igen senare</string>
<string name="check_x_filesize">Kontrollera storleken på %s</string>
<string name="message_options">Meddelandealternativ</string>
@@ -449,4 +450,5 @@
<string name="recently_used">Senast använd</string>
<string name="choose_quick_action">Välj snabbfunktion</string>
<string name="file_not_found_on_remote_host">Filen hittas ej på servern</string>
+ <string name="search_for_contacts_or_groups">Sök efter kontakter eller grupper</string>
</resources>