Skip to content
This repository was archived by the owner on Apr 12, 2022. It is now read-only.

Commit 21405e4

Browse files
committed
Merge branch 'release/tchap_v1.0.46'
2 parents 2666bb4 + 5f66b77 commit 21405e4

22 files changed

+184
-136
lines changed

TCHAP_CHANGES.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
Changes in Tchap 1.0.46 (2020-09-26)
2+
===================================================
3+
4+
Improvements:
5+
* Update matrix-sdk.aar libs - Revision: 3d3c42c5a55bcc4e80d268a6eace93eb1dfc0247 [3d3c42c5a]
6+
Note: targetSdkVersion has been updated in matrix-sdk to Android 10 (API 29).
7+
* Simplify the notifications handling #605
8+
9+
Bug Fixes:
10+
* LoginActivity: block the UI when the loading wheel is running
11+
* java.lang.NullPointerException (RoomViewHolder.java:197) #611
12+
* matrix-sdk: Tchap crashes when it checks user presence #603
13+
* matrix-sdk: Fix a crash on the crypto code (potentially a race condition)
14+
115
Changes in Tchap 1.0.45 (2020-08-14)
216
===================================================
317

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ buildscript {
2323

2424
// global properties used in sub modules
2525
ext {
26-
versionCodeProp = 69
27-
versionNameProp = "1.0.45"
26+
versionCodeProp = 71
27+
versionNameProp = "1.0.46"
2828
versionBuild = System.getenv("BUILD_NUMBER") as Integer ?: 0
2929
buildNumberProp = "${versionBuild}"
3030
}

vector/libs/matrix-sdk-core.aar

1 Byte
Binary file not shown.

vector/libs/matrix-sdk-crypto.aar

-548 Bytes
Binary file not shown.

vector/libs/matrix-sdk.aar

50 Bytes
Binary file not shown.

vector/src/app/java/im/vector/push/fcm/NotificationTroubleshootTestManagerFactory.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ class NotificationTroubleshootTestManagerFactory {
3232
mgr.addTest(TestAccountSettings(fragment, session))
3333
}
3434
mgr.addTest(TestDeviceSettings(fragment))
35-
if (session != null) {
36-
mgr.addTest(TestBingRulesSettings(fragment, session))
37-
}
35+
// Tchap: comment the test on the bing rules, because we remove the advanced settings
36+
// screen on Android app.
37+
// if (session != null) {
38+
// mgr.addTest(TestBingRulesSettings(fragment, session))
39+
// }
3840
mgr.addTest(TestPlayServices(fragment))
3941
mgr.addTest(TestFirebaseToken(fragment))
4042
mgr.addTest(TestTokenRegistration(fragment))

vector/src/main/java/im/vector/activity/VectorRoomActivity.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3661,13 +3661,6 @@ void onStartCallClick() {
36613661
.setIcon(android.R.drawable.ic_dialog_alert)
36623662
.setPositiveButton(R.string.ok, null)
36633663
.show();
3664-
} else if (WidgetManagerProvider.INSTANCE.getWidgetManager(this) == null) {
3665-
// display the dialog with the info text
3666-
new AlertDialog.Builder(this)
3667-
.setMessage(R.string.integration_manager_not_configured)
3668-
.setIcon(android.R.drawable.ic_dialog_alert)
3669-
.setPositiveButton(R.string.ok, null)
3670-
.show();
36713664
} else if (isUserAllowedToStartConfCall()) {
36723665
if (mRoom.getNumberOfMembers() > 2) {
36733666
new AlertDialog.Builder(this)
@@ -3678,7 +3671,17 @@ void onStartCallClick() {
36783671
@Override
36793672
public void onClick(DialogInterface dialog, int which) {
36803673
if (PreferencesManager.useJitsiConfCall(VectorRoomActivity.this)) {
3681-
startJitsiCall(true);
3674+
if (WidgetManagerProvider.INSTANCE.getWidgetManager(VectorRoomActivity.this) == null) {
3675+
//if (Matrix.getWidgetManager(VectorRoomActivity.this) == null) {
3676+
// display the dialog with the info text
3677+
new AlertDialog.Builder(VectorRoomActivity.this)
3678+
.setMessage(R.string.integration_manager_not_configured)
3679+
.setIcon(android.R.drawable.ic_dialog_alert)
3680+
.setPositiveButton(R.string.ok, null)
3681+
.show();
3682+
} else {
3683+
startJitsiCall(true);
3684+
}
36823685
} else {
36833686
displayVideoCallIpDialog();
36843687
}

vector/src/main/java/im/vector/activity/VectorSettingsActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ class VectorSettingsActivity : MXCActionBarActivity(),
100100
val oFragment = when (pref.key) {
101101
PreferencesManager.SETTINGS_NOTIFICATION_TROUBLESHOOT_PREFERENCE_KEY ->
102102
VectorSettingsNotificationsTroubleshootFragment.newInstance(session.myUserId)
103-
PreferencesManager.SETTINGS_NOTIFICATION_ADVANCED_PREFERENCE_KEY ->
104-
VectorSettingsAdvancedNotificationPreferenceFragment.newInstance(session.myUserId)
103+
// PreferencesManager.SETTINGS_NOTIFICATION_ADVANCED_PREFERENCE_KEY ->
104+
// VectorSettingsAdvancedNotificationPreferenceFragment.newInstance(session.myUserId)
105105
// PreferencesManager.SETTINGS_DISCOVERY_PREFERENCE_KEY,
106106
// PreferencesManager.SETTINGS_IDENTITY_SERVER_PREFERENCE_KEY ->
107107
// VectorSettingsDiscoveryFragment.newInstance(session.myUserId)

vector/src/main/java/im/vector/adapters/RoomViewHolder.java

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
import org.matrix.androidsdk.data.RoomTag;
3737
import org.matrix.androidsdk.data.store.IMXStore;
3838
import org.matrix.androidsdk.core.BingRulesManager;
39+
import org.matrix.androidsdk.rest.model.User;
40+
3941
import java.util.Set;
4042

4143
import butterknife.BindView;
@@ -193,8 +195,14 @@ public void populateViews(final Context context,
193195
}
194196

195197
if (null != vSenderDisplayName && null != roomSummary.getLatestReceivedEvent()) {
196-
String senderName = session.getDataHandler().getUser(roomSummary.getLatestReceivedEvent().getSender()).displayname;
197-
String userNameWithoutDomain = DinsicUtils.getNameFromDisplayName(senderName);
198+
String userNameWithoutDomain;
199+
String senderId = roomSummary.getLatestReceivedEvent().getSender();
200+
User sender = session.getDataHandler().getUser(senderId);
201+
if (null != sender && null != sender.displayname) {
202+
userNameWithoutDomain = DinsicUtils.getNameFromDisplayName(sender.displayname);
203+
} else {
204+
userNameWithoutDomain = DinsicUtils.computeDisplayNameFromUserId(senderId);
205+
}
198206
vSenderDisplayName.setText(userNameWithoutDomain);
199207
vSenderDisplayName.setVisibility(View.VISIBLE);
200208
}
@@ -280,11 +288,24 @@ public void onClick(View v) {
280288
}
281289

282290
BingRulesManager.RoomNotificationState roomNotificationState = session.getDataHandler().getBingRulesManager().getRoomNotificationState(room.getRoomId());
283-
if (null != vRoomNotificationMute) {
284-
if (roomNotificationState.equals(BingRulesManager.RoomNotificationState.MUTE)) {
285-
vRoomNotificationMute.setVisibility(View.VISIBLE);
286-
} else {
287-
vRoomNotificationMute.setVisibility(View.GONE);
291+
if (null != vRoomNotificationMute && null != roomNotificationState) {
292+
switch (roomNotificationState) {
293+
case ALL_MESSAGES_NOISY:
294+
case ALL_MESSAGES:
295+
vRoomNotificationMute.setVisibility(View.GONE);
296+
break;
297+
case MENTIONS_ONLY:
298+
if (room.isDirect()) {
299+
// Tchap: This mode is not suggested anymore for the direct chats
300+
// We consider people will not mention the other member in 1:1.
301+
// The room is considered mute.
302+
vRoomNotificationMute.setVisibility(View.VISIBLE);
303+
} else {
304+
vRoomNotificationMute.setVisibility(View.GONE);
305+
}
306+
break;
307+
case MUTE:
308+
vRoomNotificationMute.setVisibility(View.VISIBLE);
288309
}
289310
}
290311

vector/src/main/java/im/vector/contacts/ContactsManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ public void onSuccess(final String accountId) {
226226
public void onSuccess(User user) {
227227
Log.d(LOG_TAG, "retrieve the presence of " + mxid.mMatrixId + " :" + user);
228228
mxid.mUser = user;
229+
//user coming from API no longer contains his id. we must add it to him.
230+
mxid.mUser.user_id = mxid.mMatrixId;
229231
onContactPresenceUpdate(contact, mxid);
230232
}
231233

0 commit comments

Comments
 (0)