diff --git a/build.gradle b/build.gradle
index 557d7c49c2..c5de213c4c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -192,7 +192,7 @@ dependencies {
testImplementation 'org.robolectric:shadows-multidex:4.2'
}
-def canonicalVersionCode = 116
+def canonicalVersionCode = 118
def canonicalVersionName = "1.6.3"
def postFixSize = 10
diff --git a/res/layout-sw400dp/fragment_enter_public_key.xml b/res/layout-sw400dp/fragment_enter_public_key.xml
index e09aae2521..9defb4fd35 100644
--- a/res/layout-sw400dp/fragment_enter_public_key.xml
+++ b/res/layout-sw400dp/fragment_enter_public_key.xml
@@ -14,7 +14,7 @@
android:background="?android:dividerHorizontal"
android:elevation="1dp" />
-
+
+
+
+
- emojiDrawerStub;
protected HidingLinearLayout quickAttachmentToggle;
@@ -2579,6 +2581,10 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
audioRecorder.startRecording();
+
+ audioHandler = new Handler();
+ stopRecordingTask = () -> inputPanel.onRecordReleased();
+ audioHandler.postDelayed(stopRecordingTask, 60000);
}
@Override
@@ -2588,6 +2594,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
public void onRecorderFinished() {
+ if (audioHandler != null && stopRecordingTask != null) {
+ audioHandler.removeCallbacks(stopRecordingTask);
+ }
updateToggleButtonState();
Vibrator vibrator = ServiceUtil.getVibrator(this);
vibrator.vibrate(20);
@@ -2629,6 +2638,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
@Override
public void onRecorderCanceled() {
+ if (audioHandler != null && stopRecordingTask != null) {
+ audioHandler.removeCallbacks(stopRecordingTask);
+ }
updateToggleButtonState();
Vibrator vibrator = ServiceUtil.getVibrator(this);
vibrator.vibrate(50);
diff --git a/src/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt b/src/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt
index 7e84023c17..7365827d12 100644
--- a/src/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt
+++ b/src/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt
@@ -96,6 +96,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
notificationsButton.setOnClickListener { showNotificationSettings() }
chatsButton.setOnClickListener { showChatSettings() }
// linkedDevicesButton.setOnClickListener { showLinkedDevices() }
+ sendInvitationButton.setOnClickListener { sendInvitation() }
seedButton.setOnClickListener { showSeed() }
clearAllDataButton.setOnClickListener { clearAllData() }
versionTextView.text = String.format(getString(R.string.version_s), "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})")
@@ -292,6 +293,15 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
push(intent)
}
+ private fun sendInvitation() {
+ val intent = Intent()
+ intent.action = Intent.ACTION_SEND
+ val invitation = "Hey, I've been using Session to chat with complete privacy and security. Come join me! Download it at https://getsession.org/. My Session ID is $hexEncodedPublicKey!"
+ intent.putExtra(Intent.EXTRA_TEXT, invitation)
+ intent.type = "text/plain"
+ startActivity(intent)
+ }
+
private fun showSeed() {
SeedDialog().show(supportFragmentManager, "Recovery Phrase Dialog")
}
diff --git a/src/org/thoughtcrime/securesms/loki/views/UserView.kt b/src/org/thoughtcrime/securesms/loki/views/UserView.kt
index dcce57f610..14614f512c 100644
--- a/src/org/thoughtcrime/securesms/loki/views/UserView.kt
+++ b/src/org/thoughtcrime/securesms/loki/views/UserView.kt
@@ -66,33 +66,9 @@ class UserView : LinearLayout {
val threadID = DatabaseFactory.getThreadDatabase(context).getThreadIdFor(user)
MentionManagerUtilities.populateUserPublicKeyCacheIfNeeded(threadID, context) // FIXME: This is a bad place to do this
val address = user.address.serialize()
- if (user.isGroupRecipient) {
- if ("Session Public Chat" == user.name || user.address.isRSSFeed) {
- profilePictureView.publicKey = ""
- profilePictureView.displayName = null
- profilePictureView.additionalPublicKey = null
- profilePictureView.isRSSFeed = true
- } else {
- val threadID = GroupManager.getThreadIDFromGroupID(address, context)
- val users = MentionsManager.shared.userPublicKeyCache[threadID]?.toList() ?: listOf()
- val randomUsers = users.sorted() // Sort to provide a level of stability
- val pk = randomUsers.getOrNull(0) ?: ""
- profilePictureView.publicKey = pk
- profilePictureView.displayName = getUserDisplayName(pk)
- val apk = randomUsers.getOrNull(1) ?: ""
- profilePictureView.additionalPublicKey = apk
- profilePictureView.additionalDisplayName = getUserDisplayName(apk)
- profilePictureView.isRSSFeed = false
- }
- } else {
- profilePictureView.publicKey = address
- profilePictureView.displayName = getUserDisplayName(address)
- profilePictureView.additionalPublicKey = null
- profilePictureView.isRSSFeed = false
- }
- actionIndicatorImageView.setImageResource(R.drawable.ic_baseline_edit_24)
profilePictureView.glide = glide
- profilePictureView.update()
+ profilePictureView.update(user, threadID)
+ actionIndicatorImageView.setImageResource(R.drawable.ic_baseline_edit_24)
nameTextView.text = if (user.isGroupRecipient) user.name else getUserDisplayName(address)
when (actionIndicator) {
ActionIndicator.None -> {