Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
elm
Element Android
Commits
4a46289f
Commit
4a46289f
authored
2 years ago
by
Benoit Marty
Browse files
Options
Download
Plain Diff
Merge branch 'hotfix/1.5.14' into main
parents
789746c2
576ea2df
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
15 deletions
+27
-15
CHANGES.md
CHANGES.md
+8
-0
fastlane/metadata/android/en-US/changelogs/40105140.txt
fastlane/metadata/android/en-US/changelogs/40105140.txt
+2
-0
matrix-sdk-android/build.gradle
matrix-sdk-android/build.gradle
+1
-1
vector-app/build.gradle
vector-app/build.gradle
+1
-1
vector/src/main/java/im/vector/app/core/di/ActiveSessionHolder.kt
...rc/main/java/im/vector/app/core/di/ActiveSessionHolder.kt
+5
-11
vector/src/main/java/im/vector/app/core/pushers/VectorPushHandler.kt
...main/java/im/vector/app/core/pushers/VectorPushHandler.kt
+1
-1
vector/src/main/java/im/vector/app/features/MainActivity.kt
vector/src/main/java/im/vector/app/features/MainActivity.kt
+8
-0
vector/src/main/java/im/vector/app/features/start/StartAppViewModel.kt
...in/java/im/vector/app/features/start/StartAppViewModel.kt
+1
-1
No files found.
CHANGES.md
View file @
4a46289f
Changes in Element v1.5.14 (2022-12-20)
=======================================
Bugfixes 🐛
----------
-
ActiveSessionHolder is not supposed to start syncing. Instead, the MainActivity does it, if necessary. Fixes a race condition when clearing cache.
Changes in Element v1.5.13 (2022-12-19)
=======================================
...
...
This diff is collapsed.
Click to expand it.
fastlane/metadata/android/en-US/changelogs/40105140.txt
0 → 100644
View file @
4a46289f
Main changes in this version: Thread are now enabled by default.
Full changelog: https://github.com/vector-im/element-android/releases
This diff is collapsed.
Click to expand it.
matrix-sdk-android/build.gradle
View file @
4a46289f
...
...
@@ -62,7 +62,7 @@ android {
// that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments
clearPackageData:
'true'
buildConfigField
"String"
,
"SDK_VERSION"
,
"\"1.5.1
3
\""
buildConfigField
"String"
,
"SDK_VERSION"
,
"\"1.5.1
4
\""
buildConfigField
"String"
,
"GIT_SDK_REVISION"
,
"\"${gitRevision()}\""
buildConfigField
"String"
,
"GIT_SDK_REVISION_UNIX_DATE"
,
"\"${gitRevisionUnixDate()}\""
...
...
This diff is collapsed.
Click to expand it.
vector-app/build.gradle
View file @
4a46289f
...
...
@@ -37,7 +37,7 @@ ext.versionMinor = 5
// Note: even values are reserved for regular release, odd values for hotfix release.
// When creating a hotfix, you should decrease the value, since the current value
// is the value for the next regular release.
ext
.
versionPatch
=
1
3
ext
.
versionPatch
=
1
4
static
def
getGitTimestamp
()
{
def
cmd
=
'git show -s --format=%ct'
...
...
This diff is collapsed.
Click to expand it.
vector/src/main/java/im/vector/app/core/di/ActiveSessionHolder.kt
View file @
4a46289f
...
...
@@ -18,7 +18,6 @@ package im.vector.app.core.di
import
android.content.Context
import
im.vector.app.ActiveSessionDataSource
import
im.vector.app.core.extensions.startSyncing
import
im.vector.app.core.pushers.UnregisterUnifiedPushUseCase
import
im.vector.app.core.services.GuardServiceStarter
import
im.vector.app.core.session.ConfigureAndStartSessionUseCase
...
...
@@ -72,7 +71,7 @@ class ActiveSessionHolder @Inject constructor(
suspend
fun
clearActiveSession
()
{
// Do some cleanup first
getSafeActiveSession
(
startSync
=
false
)
?.
let
{
getSafeActiveSession
()
?.
let
{
Timber
.
w
(
"clearActiveSession of ${it.myUserId}"
)
it
.
callSignalingService
().
removeCallListener
(
callManager
)
it
.
removeListener
(
sessionListener
)
...
...
@@ -93,8 +92,8 @@ class ActiveSessionHolder @Inject constructor(
return
activeSessionReference
.
get
()
!=
null
||
authenticationService
.
hasAuthenticatedSessions
()
}
fun
getSafeActiveSession
(
startSync
:
Boolean
=
true
):
Session
?
{
return
runBlocking
{
getOrInitializeSession
(
startSync
=
startSync
)
}
fun
getSafeActiveSession
():
Session
?
{
return
runBlocking
{
getOrInitializeSession
()
}
}
fun
getActiveSession
():
Session
{
...
...
@@ -102,16 +101,11 @@ class ActiveSessionHolder @Inject constructor(
?:
throw
IllegalStateException
(
"You should authenticate before using this"
)
}
suspend
fun
getOrInitializeSession
(
startSync
:
Boolean
):
Session
?
{
suspend
fun
getOrInitializeSession
():
Session
?
{
return
activeSessionReference
.
get
()
?.
also
{
if
(
startSync
&&
!
it
.
syncService
().
isSyncThreadAlive
())
{
it
.
startSyncing
(
applicationContext
)
}
}
?:
sessionInitializer
.
tryInitialize
(
readCurrentSession
=
{
activeSessionReference
.
get
()
})
{
session
->
setActiveSession
(
session
)
configureAndStartSessionUseCase
.
execute
(
session
,
startSyncing
=
startSync
)
configureAndStartSessionUseCase
.
execute
(
session
,
startSyncing
=
false
)
}
}
...
...
This diff is collapsed.
Click to expand it.
vector/src/main/java/im/vector/app/core/pushers/VectorPushHandler.kt
View file @
4a46289f
...
...
@@ -118,7 +118,7 @@ class VectorPushHandler @Inject constructor(
Timber
.
tag
(
loggerTag
.
value
).
d
(
"## handleInternal()"
)
}
val
session
=
activeSessionHolder
.
getOrInitializeSession
(
startSync
=
false
)
val
session
=
activeSessionHolder
.
getOrInitializeSession
()
if
(
session
==
null
)
{
Timber
.
tag
(
loggerTag
.
value
).
w
(
"## Can't sync from push, no current session"
)
...
...
This diff is collapsed.
Click to expand it.
vector/src/main/java/im/vector/app/features/MainActivity.kt
View file @
4a46289f
...
...
@@ -174,12 +174,15 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
private
fun
handleAppStarted
()
{
if
(
intent
.
hasExtra
(
EXTRA_NEXT_INTENT
))
{
// Start the next Activity
startSyncing
()
val
nextIntent
=
intent
.
getParcelableExtraCompat
<
Intent
>(
EXTRA_NEXT_INTENT
)
startIntentAndFinish
(
nextIntent
)
}
else
if
(
intent
.
hasExtra
(
EXTRA_INIT_SESSION
))
{
startSyncing
()
setResult
(
RESULT_OK
)
finish
()
}
else
if
(
intent
.
action
==
ACTION_ROOM_DETAILS_FROM_SHORTCUT
)
{
startSyncing
()
val
roomId
=
intent
.
getStringExtra
(
EXTRA_ROOM_ID
)
if
(
roomId
?.
isNotEmpty
()
==
true
)
{
navigator
.
openRoom
(
this
,
roomId
,
trigger
=
ViewRoom
.
Trigger
.
Shortcut
)
...
...
@@ -194,11 +197,16 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
if
(
args
.
clearCache
||
args
.
clearCredentials
)
{
doCleanUp
()
}
else
{
startSyncing
()
startNextActivityAndFinish
()
}
}
}
private
fun
startSyncing
()
{
activeSessionHolder
.
getSafeActiveSession
()
?.
startSyncing
(
this
)
}
private
fun
clearNotifications
()
{
// Dismiss all notifications
notificationDrawerManager
.
clearAllEvents
()
...
...
This diff is collapsed.
Click to expand it.
vector/src/main/java/im/vector/app/features/start/StartAppViewModel.kt
View file @
4a46289f
...
...
@@ -63,7 +63,7 @@ class StartAppViewModel @AssistedInject constructor(
}
private
suspend
fun
eagerlyInitializeSession
()
{
sessionHolder
.
getOrInitializeSession
(
startSync
=
true
)
sessionHolder
.
getOrInitializeSession
()
}
private
fun
handleLongProcessing
()
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment