Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-android
Commits
38df26f3
Commit
38df26f3
authored
6 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
history: catch loading issues
Change-Id: I2cf5b6cb1ecaecf1b1598a719bb5d076273c0549
parent
c6a0747a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ring-android/libringclient/src/main/java/cx/ring/services/HistoryService.java
+6
-3
6 additions, 3 deletions
...client/src/main/java/cx/ring/services/HistoryService.java
with
6 additions
and
3 deletions
ring-android/libringclient/src/main/java/cx/ring/services/HistoryService.java
+
6
−
3
View file @
38df26f3
...
...
@@ -95,7 +95,8 @@ public abstract class HistoryService {
queryBuilder
.
where
().
eq
(
HistoryCall
.
COLUMN_ACCOUNT_ID_NAME
,
accountId
);
queryBuilder
.
orderBy
(
HistoryCall
.
COLUMN_TIMESTAMP_START_NAME
,
false
);
return
(
List
<
ConversationElement
>)(
List
<?>)
getCallHistoryDao
().
query
(
queryBuilder
.
prepare
());
});
}).
doOnError
(
e
->
Log
.
e
(
TAG
,
"Can't load calls"
,
e
))
.
onErrorReturn
(
e
->
new
ArrayList
<>());
}
public
Single
<
List
<
ConversationElement
>>
getMessagesSingle
(
final
String
accountId
)
{
...
...
@@ -109,7 +110,8 @@ public abstract class HistoryService {
for
(
HistoryText
t
:
l
)
ret
.
add
(
new
TextMessage
(
t
));
return
ret
;
});
}).
doOnError
(
e
->
Log
.
e
(
TAG
,
"Can't load messages"
,
e
))
.
onErrorReturn
(
e
->
new
ArrayList
<>());
}
public
Single
<
List
<
ConversationElement
>>
getTransfersSingle
(
final
String
accountId
)
{
...
...
@@ -118,7 +120,8 @@ public abstract class HistoryService {
queryBuilder
.
where
().
eq
(
DataTransfer
.
COLUMN_ACCOUNT_ID_NAME
,
accountId
);
queryBuilder
.
orderBy
(
DataTransfer
.
COLUMN_TIMESTAMP_NAME
,
false
);
return
(
List
<
ConversationElement
>)(
List
<?>)
getDataHistoryDao
().
query
(
queryBuilder
.
prepare
());
});
}).
doOnError
(
e
->
Log
.
e
(
TAG
,
"Can't load data transfers"
,
e
))
.
onErrorReturn
(
e
->
new
ArrayList
<>());
}
public
Completable
clearHistory
(
final
String
contactId
,
final
String
accountId
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment