Skip to content
Snippets Groups Projects
Commit 872088a1 authored by Kamal Bramwell's avatar Kamal Bramwell
Browse files

Merge branch 'internal_build' into development

parents dd7d8c1f fed8199f
No related branches found
No related tags found
2 merge requests!84Version 2.92 build 629,!77v2.9 b627
...@@ -35,8 +35,8 @@ android { ...@@ -35,8 +35,8 @@ android {
defaultConfig { defaultConfig {
applicationId = "io.xxlabs.messenger" applicationId = "io.xxlabs.messenger"
versionCode = 602 versionCode = 626
versionName = "2.7" versionName = "2.9"
minSdk = 26 minSdk = 26
targetSdk = 31 targetSdk = 31
testInstrumentationRunner = "io.xxlabs.messenger.CustomTestRunner" testInstrumentationRunner = "io.xxlabs.messenger.CustomTestRunner"
......
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "io.xxlabs.messenger",
"variantName": "mainNet",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 609,
"versionName": "2.8",
"outputFile": "io.xxlabs.messenger-v2.8-build-609-mainNet.apk"
}
],
"elementType": "File"
}
\ No newline at end of file
...@@ -141,6 +141,7 @@ class BindingsRestoreHandler( ...@@ -141,6 +141,7 @@ class BindingsRestoreHandler(
val jsonBytes = Bindings.newClientFromBackup( val jsonBytes = Bindings.newClientFromBackup(
ndf, appDirectory, sessionPassword, backupPassword, account.data ndf, appDirectory, sessionPassword, backupPassword, account.data
) )
log("Successfully decrypted.")
BackupReport.unmarshall(jsonBytes, backupReportPath) BackupReport.unmarshall(jsonBytes, backupReportPath)
} }
} }
...@@ -148,6 +149,7 @@ class BindingsRestoreHandler( ...@@ -148,6 +149,7 @@ class BindingsRestoreHandler(
private suspend fun initializeClient(restoreParams: RestoreParams, backupReport: BackupReport) = private suspend fun initializeClient(restoreParams: RestoreParams, backupReport: BackupReport) =
withContext(scope.coroutineContext) { withContext(scope.coroutineContext) {
with (ClientRepository.Companion) { with (ClientRepository.Companion) {
log("Logging in...")
client = Bindings.login( client = Bindings.login(
restoreParams.appDirectory, restoreParams.appDirectory,
restoreParams.sessionPassword, restoreParams.sessionPassword,
......
...@@ -84,6 +84,7 @@ class MainViewModel @Inject constructor( ...@@ -84,6 +84,7 @@ class MainViewModel @Inject constructor(
Timber.e("[LOGIN] is logged in: $isLoggingIn") Timber.e("[LOGIN] is logged in: $isLoggingIn")
wasLoggedIn = isLoggingIn wasLoggedIn = isLoggingIn
loginStatus.value = (DataRequestState.Success(isLoggingIn)) loginStatus.value = (DataRequestState.Success(isLoggingIn))
_areComponentsInitialized.value = isLoggingIn
}.subscribe() }.subscribe()
) )
} }
......
...@@ -313,7 +313,15 @@ class PrivateMessagesFragment : ...@@ -313,7 +313,15 @@ class PrivateMessagesFragment :
} }
override fun onMicrophonePermissionGranted() { override fun onMicrophonePermissionGranted() {
try {
recordAudio() recordAudio()
} catch (e: Exception) {
Timber.e("Exception occured during audio recording: $e")
requireContext().toast("Failed to start audio recording")
FirebaseCrashlytics.getInstance().recordException(e)
cancelRecording()
releaseMediaRecorder()
}
} }
private fun recordAudio() { private fun recordAudio() {
...@@ -355,6 +363,11 @@ class PrivateMessagesFragment : ...@@ -355,6 +363,11 @@ class PrivateMessagesFragment :
} }
} }
private fun cancelRecording() {
latestAudioFile = null
chatViewModel.onCancelRecording()
}
private fun initPreviewPlayer() { private fun initPreviewPlayer() {
latestAudioFile?.let { recording -> latestAudioFile?.let { recording ->
audioPreviewPlayer.audioUri = FileProvider.getUriForFile( audioPreviewPlayer.audioUri = FileProvider.getUriForFile(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment