mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Forum Sharing Client backend
This commit replaces the old ForumSharingManagerImpl with a new one which is based on state machines and the ProtocolEngine. There is a SharerEngine and a InviteeEngine that take care of state transitions, messages, events and trigger actions to be carried out by the ForumSharingManagerImpl. This is all very similar to the Introduction Client. The general sharing paradigm has been changed from sharing as a state to sharing as an action. Now the UI can allow users to invite contacts to forums. The contacts can accept or decline the invitiation. Also, the Forum Sharing Manger is notified when users leave a forum. Closes #322
This commit is contained in:
@@ -69,7 +69,7 @@ public abstract class ConversationItem {
|
||||
ir.getName());
|
||||
}
|
||||
return new ConversationNoticeOutItem(ir.getMessageId(), text,
|
||||
ir.getTime(), ir.isSent(), ir.isSeen());
|
||||
ir.getTimestamp(), ir.isSent(), ir.isSeen());
|
||||
} else {
|
||||
String text;
|
||||
if (ir.wasAccepted()) {
|
||||
@@ -88,7 +88,7 @@ public abstract class ConversationItem {
|
||||
}
|
||||
}
|
||||
return new ConversationNoticeInItem(ir.getMessageId(), text,
|
||||
ir.getTime(), ir.isRead());
|
||||
ir.getTimestamp(), ir.isRead());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,9 +98,9 @@ public abstract class ConversationItem {
|
||||
public static ConversationItem from(IntroductionMessage im) {
|
||||
if (im.isLocal())
|
||||
return new ConversationNoticeOutItem(im.getMessageId(), "",
|
||||
im.getTime(), false, false);
|
||||
return new ConversationNoticeInItem(im.getMessageId(), "", im.getTime(),
|
||||
im.isRead());
|
||||
im.getTimestamp(), false, false);
|
||||
return new ConversationNoticeInItem(im.getMessageId(), "",
|
||||
im.getTimestamp(), im.isRead());
|
||||
}
|
||||
|
||||
protected interface OutgoingItem {
|
||||
|
||||
Reference in New Issue
Block a user