File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
src/main/kotlin/com/zoffcc/applications/trifa Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -145,12 +145,10 @@ class TrifaToxService
145
145
catch (_: Exception )
146
146
{
147
147
}
148
- Log .i(TAG , " XXXXX:checkpoint:001=" + OrmaDatabase .run_query_for_single_result(" PRAGMA wal_checkpoint(TRUNCATE);" ))
149
148
clear_friends()
150
149
load_friends()
151
150
clear_groups()
152
151
load_groups()
153
- Log .i(TAG , " XXXXX:checkpoint:001=" + OrmaDatabase .run_query_for_single_result(" PRAGMA wal_checkpoint(TRUNCATE);" ))
154
152
// --------------- bootstrap ---------------
155
153
// --------------- bootstrap ---------------
156
154
// --------------- bootstrap ---------------
@@ -419,6 +417,20 @@ class TrifaToxService
419
417
(ToxServiceThread as Thread ).start()
420
418
}
421
419
420
+ fun wal_checkpoint ()
421
+ {
422
+ OrmaDatabase .orma_global_writeLock.lock()
423
+ try
424
+ {
425
+ Thread .sleep(10 )
426
+ Log .i(TAG , " XXXXX:checkpoint:001=" + OrmaDatabase .run_query_for_single_result(" PRAGMA wal_checkpoint(TRUNCATE);" ))
427
+ }
428
+ finally
429
+ {
430
+ OrmaDatabase .orma_global_writeLock.unlock()
431
+ }
432
+ }
433
+
422
434
fun tox_audio_play_thread_start ()
423
435
{
424
436
var sw_t = - 1L
@@ -1351,7 +1363,6 @@ class TrifaToxService
1351
1363
{
1352
1364
tox_self_get_friend_list()?.forEach {
1353
1365
// Log.i(TAG, "friend:" + it)
1354
-
1355
1366
var f: FriendList ? = null
1356
1367
val f_pubkey = tox_friend_get_public_key(it)
1357
1368
var fl: MutableList <FriendList >? = null
You can’t perform that action at this time.
0 commit comments