From b84b67268be3f54155fd5cbb23d6df4e8569cd85 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 17 May 2014 09:43:47 +0200 Subject: fixed #113 --- src/eu/siacs/conversations/ui/ConversationFragment.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index 708c7f68..97360335 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -583,8 +583,7 @@ public class ConversationFragment extends Fragment { ConversationActivity activity = (ConversationActivity) getActivity(); if (this.conversation != null) { for (Message message : this.conversation.getMessages()) { - if ((message.getEncryption() == Message.ENCRYPTION_PGP) - && (message.getStatus() == Message.STATUS_RECIEVED)) { + if (message.getEncryption() == Message.ENCRYPTION_PGP) { decryptMessage(message); break; } -- cgit v1.2.3 From 8bf0945f2fd95c7bff19d02bcc8939348158905e Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 17 May 2014 10:03:15 +0200 Subject: permanent notification disapears now when account is being deleted + code clean up --- .../conversations/services/XmppConnectionService.java | 10 ++++++++-- src/eu/siacs/conversations/ui/ConversationFragment.java | 1 - src/eu/siacs/conversations/utils/UIHelper.java | 14 +------------- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 5a7a44b1..624dd219 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -1156,8 +1156,11 @@ public class XmppConnectionService extends Service { this.statusListener.onStatusChanged(account); databaseBackend.updateAccount(account); reconnectAccount(account, false); - if (accountChangedListener != null) + if (accountChangedListener != null) { accountChangedListener.onAccountListChangedListener(); + } + UIHelper.showErrorNotification(getApplicationContext(), + getAccounts()); } public void deleteAccount(Account account) { @@ -1166,8 +1169,11 @@ public class XmppConnectionService extends Service { } databaseBackend.deleteAccount(account); this.accounts.remove(account); - if (accountChangedListener != null) + if (accountChangedListener != null) { accountChangedListener.onAccountListChangedListener(); + } + UIHelper.showErrorNotification(getApplicationContext(), + getAccounts()); } public void setOnConversationListChangedListener( diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index 97360335..5336b793 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -757,7 +757,6 @@ public class ConversationFragment extends Fragment { private class BitmapCache { private HashMap bitmaps = new HashMap(); - private Bitmap error = null; public Bitmap get(String name, Contact contact, Context context) { if (bitmaps.containsKey(name)) { diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java index 8baa3c25..ef291c2b 100644 --- a/src/eu/siacs/conversations/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -12,7 +12,6 @@ import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.Conversation; import eu.siacs.conversations.entities.Message; -import eu.siacs.conversations.entities.MucOptions; import eu.siacs.conversations.entities.MucOptions.User; import eu.siacs.conversations.ui.ConversationActivity; import eu.siacs.conversations.ui.ManageAccountActivity; @@ -27,7 +26,6 @@ import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.content.SharedPreferences; -import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; @@ -38,11 +36,9 @@ import android.net.Uri; import android.preference.PreferenceManager; import android.provider.ContactsContract.Contacts; import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationCompat.InboxStyle; import android.support.v4.app.TaskStackBuilder; import android.text.Html; import android.util.DisplayMetrics; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; @@ -234,11 +230,7 @@ public class UIHelper { } return bitmap; } - - private static Bitmap getUnknownContactPicture(String[] names, int size) { - return getUnknownContactPicture(names, size, UIHelper.BG_COLOR, UIHelper.FG_COLOR); - } - + private static Bitmap getMucContactPicture(Conversation conversation, int size, int bgColor, int fgColor) { List members = conversation.getMucOptions().getUsers(); if (members.size() == 0) { @@ -273,10 +265,6 @@ public class UIHelper { } public static Bitmap getContactPicture(Contact contact, int dpSize, Context context, boolean notification) { - int fgColor = UIHelper.FG_COLOR, - bgColor = (notification) ? - UIHelper.BG_COLOR : UIHelper.TRANSPARENT; - String uri = contact.getProfilePhoto(); if (uri==null) { return getContactPicture(contact.getDisplayName(), dpSize, -- cgit v1.2.3 From 84a462064969b2066f90e3559ef6a410c2e781e9 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 17 May 2014 10:04:57 +0200 Subject: version bump to 0.2.2 --- AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 3d1d6a4f..4806ac32 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="13" + android:versionName="0.2.2" > Date: Sat, 17 May 2014 10:50:29 +0200 Subject: added translators to readme --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 07b15d4e..93885688 100644 --- a/README.md +++ b/README.md @@ -42,11 +42,14 @@ These XEPs are - as of now: (In order of appearance) ###Code -* Rene Treffer @rtreffer -* Andreas Straub @strb +* [Rene Treffer](https://github.com/rtreffer) +* [Andreas Straub](https://github.com/strb) ###Translations -* @beriain (Spanish and Basque) +* [Sergio Cárdenas](https://github.com/kruks23) (Spanish) +* [Benoit Bouvarel](https://github.com/BenoitBouvarel) (French) +* [Daniel Gultsch](https://github.com/iNPUTmice) (German) + ##FAQ ###General -- cgit v1.2.3 From bab69ffcf90a2bb0390957daef3d186df309957b Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 17 May 2014 11:08:32 +0200 Subject: fixed #108 --- src/eu/siacs/conversations/ui/ContactsActivity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/eu/siacs/conversations/ui/ContactsActivity.java b/src/eu/siacs/conversations/ui/ContactsActivity.java index e403450a..6e15b678 100644 --- a/src/eu/siacs/conversations/ui/ContactsActivity.java +++ b/src/eu/siacs/conversations/ui/ContactsActivity.java @@ -515,9 +515,10 @@ public class ContactsActivity extends XmppActivity { getActionBar().setHomeButtonEnabled(false); } this.rosterContacts.clear(); - for (int i = 0; i < accounts.size(); ++i) { - rosterContacts.addAll(xmppConnectionService.getRoster(accounts - .get(i))); + for(Account account : accounts) { + if (account.getStatus() != Account.STATUS_DISABLED) { + rosterContacts.addAll(xmppConnectionService.getRoster(account)); + } } updateAggregatedContacts(); } -- cgit v1.2.3 From cab9b10e356636944075b14f80210e9219b12f9f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 17 May 2014 12:02:14 +0200 Subject: spelling --- res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 221e747d..c3320b11 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -4,7 +4,7 @@ Conversations Einstellungen Neue Unterhaltung - Kontos verwalten + Konten verwalten Kontaktliste neu laden Unterhaltung beenden Kontaktdetails -- cgit v1.2.3 From a32d95cdd39a62af35df31a2907c3761e1657ef3 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 17 May 2014 12:10:58 +0200 Subject: fixed #66 --- res/layout/dialog_verify_otr.xml | 3 --- res/layout/edit_account_dialog.xml | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/res/layout/dialog_verify_otr.xml b/res/layout/dialog_verify_otr.xml index 41ce3b07..6dfe149d 100644 --- a/res/layout/dialog_verify_otr.xml +++ b/res/layout/dialog_verify_otr.xml @@ -20,7 +20,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="8dp" - android:text="julia@jabber.example.com" android:textSize="14sp" /> diff --git a/res/layout/edit_account_dialog.xml b/res/layout/edit_account_dialog.xml index 0a86039d..a5733cfe 100644 --- a/res/layout/edit_account_dialog.xml +++ b/res/layout/edit_account_dialog.xml @@ -19,7 +19,7 @@ android:layout_height="wrap_content" android:ems="10" android:inputType="textEmailAddress" - android:hint="username@jabber.example.com"> + android:hint="username@example.com"> -- cgit v1.2.3 From e34fddd7e1aa26da75b5ad61a4af7504c1db497c Mon Sep 17 00:00:00 2001 From: the-username Date: Thu, 15 May 2014 20:43:10 +0200 Subject: Update Validator.java --- src/eu/siacs/conversations/utils/Validator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eu/siacs/conversations/utils/Validator.java b/src/eu/siacs/conversations/utils/Validator.java index fce953ae..51d8b25c 100644 --- a/src/eu/siacs/conversations/utils/Validator.java +++ b/src/eu/siacs/conversations/utils/Validator.java @@ -5,7 +5,7 @@ import java.util.regex.Pattern; public class Validator { public static final Pattern VALID_JID = - Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); + Pattern.compile("\\b^[A-Z0-9._%+-]+@([A-Z0-9.-]+\\.)?\\d{1,3}[.]\\d{1,3}[.]\\d{1,3}[.]\\d{1,3}\\b$|^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE); public static boolean isValidJid(String jid) { Matcher matcher = VALID_JID.matcher(jid); -- cgit v1.2.3