Ensure responses shown after requests, clarify wording, reuse transactions

When devices' clocks are out of sync, it is possible that a response is
shown before the request. This commit makes sure that the timestamp of
responses is always later than the last message in the conversation.

Some wording could be misunderstood to thing introductions were
successful even though they were not. That has been clarified.

A new database transaction was created when getting contacts and local
transport properties. This has been changed to re-use the existing
transaction.

Also addresses minor issues found in review.
This commit is contained in:
Torsten Grote
2016-04-04 12:50:43 -03:00
parent 4b7a32a5ee
commit 90d984ee52
17 changed files with 83 additions and 52 deletions

View File

@@ -180,7 +180,8 @@ public class IntroductionMessageFragment extends BaseFragment {
// actually make the introduction
try {
introductionManager.makeIntroduction(c1, c2, msg);
long timestamp = System.currentTimeMillis();
introductionManager.makeIntroduction(c1, c2, msg, timestamp);
introductionWasMade = true;
postIntroduction(false);
} catch (DbException e) {