Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-android
Commits
0b1f4d8f
Commit
0b1f4d8f
authored
Oct 12, 2021
by
Adrien Béraud
Browse files
account: log cleanup
Change-Id: I50e4ea3f55a576948a825c7be98ef5fbd5a68744
parent
6c82e4e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
ring-android/libjamiclient/src/main/kotlin/net/jami/model/Account.kt
View file @
0b1f4d8f
...
...
@@ -706,7 +706,6 @@ class Account(
}
fun
getByUri
(
uri
:
Uri
?):
Conversation
?
{
Log
.
w
(
TAG
,
"getByUri $accountId $uri"
);
if
(
uri
==
null
||
uri
.
isEmpty
)
return
null
return
if
(
uri
.
isSwarm
)
getSwarm
(
uri
.
rawRingId
)
?:
pending
[
uri
.
uri
]
else
getByKey
(
uri
.
uri
)
}
...
...
ring-android/libjamiclient/src/main/kotlin/net/jami/services/AccountService.kt
View file @
0b1f4d8f
...
...
@@ -307,24 +307,22 @@ class AccountService(
}*/
val
mode
=
if
(
"true"
==
info
[
"syncing"
])
Conversation
.
Mode
.
Syncing
else
Conversation
.
Mode
.
values
()[
info
[
"mode"
]
!!
.
toInt
()]
val
conversation
=
account
.
newSwarm
(
conversationId
,
mode
)
//if (mode != Conversation.Mode.Syncing) {
for
(
member
in
JamiService
.
getConversationMembers
(
accountId
,
conversationId
))
{
/*for (Map.Entry<String, String> i : member.entrySet()) {
Log.w(TAG, "conversation member: " + i.getKey() + " " + i.getValue());
}*/
val
uri
=
Uri
.
fromId
(
member
[
"uri"
]
!!
)
//String role = member.get("role");
val
lastDisplayed
=
member
[
"lastDisplayed"
]
var
contact
=
conversation
.
findContact
(
uri
)
if
(
contact
==
null
)
{
contact
=
account
.
getContactFromCache
(
uri
)
conversation
.
addContact
(
contact
)
}
if
(!
StringUtils
.
isEmpty
(
lastDisplayed
)
&&
contact
.
isUser
)
{
conversation
.
setLastMessageRead
(
lastDisplayed
)
}
for
(
member
in
JamiService
.
getConversationMembers
(
accountId
,
conversationId
))
{
/*for (Map.Entry<String, String> i : member.entrySet()) {
Log.w(TAG, "conversation member: " + i.getKey() + " " + i.getValue());
}*/
val
uri
=
Uri
.
fromId
(
member
[
"uri"
]
!!
)
//String role = member.get("role");
val
lastDisplayed
=
member
[
"lastDisplayed"
]
var
contact
=
conversation
.
findContact
(
uri
)
if
(
contact
==
null
)
{
contact
=
account
.
getContactFromCache
(
uri
)
conversation
.
addContact
(
contact
)
}
//}
if
(!
StringUtils
.
isEmpty
(
lastDisplayed
)
&&
contact
.
isUser
)
{
conversation
.
setLastMessageRead
(
lastDisplayed
)
}
}
conversation
.
lastElementLoaded
=
Completable
.
defer
{
loadMore
(
conversation
,
2
).
ignoreElement
()
}.
cache
()
account
.
conversationStarted
(
conversation
)
}
catch
(
e
:
Exception
)
{
...
...
@@ -1320,9 +1318,9 @@ class AccountService(
conversation
:
Conversation
,
message
:
Map
<
String
,
String
>
):
Interaction
{
for
((
key
,
value
)
in
message
)
{
/*
for ((key, value) in message) {
Log.w(TAG, "$key -> $value")
}
}
*/
val
id
=
message
[
"id"
]
!!
val
type
=
message
[
"type"
]
!!
val
author
=
message
[
"author"
]
!!
...
...
Write
Preview
Supports
Markdown
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