mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Rename object to nameable
This commit is contained in:
@@ -108,7 +108,7 @@ class BlogControllerImpl extends BaseControllerImpl
|
||||
BlogInvitationResponseReceivedEvent b =
|
||||
(BlogInvitationResponseReceivedEvent) e;
|
||||
PrivateResponse<Blog> r = b.getMessageHeader();
|
||||
if (r.getObject().getId().equals(groupId) && r.wasAccepted()) {
|
||||
if (r.getNameable().getId().equals(groupId) && r.wasAccepted()) {
|
||||
LOG.info("Blog invitation accepted");
|
||||
onBlogInvitationAccepted(b.getContactId());
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ abstract class ConversationItem {
|
||||
return new ConversationRequestItem(ir.getId(),
|
||||
ir.getGroupId(), type, ir.getSessionId(), text,
|
||||
ir.getMessage(), ir.getTimestamp(), ir.isRead(),
|
||||
((Shareable) ir.getObject()).getId(), !ir.wasAnswered(),
|
||||
((Shareable) ir.getNameable()).getId(), !ir.wasAnswered(),
|
||||
ir.doesExist());
|
||||
}
|
||||
}
|
||||
@@ -163,14 +163,14 @@ abstract class ConversationItem {
|
||||
if (ir.wasAccepted()) {
|
||||
text = ctx.getString(
|
||||
R.string.introduction_response_accepted_sent,
|
||||
ir.getObject().getName());
|
||||
ir.getNameable().getName());
|
||||
text += "\n\n" + ctx.getString(
|
||||
R.string.introduction_response_accepted_sent_info,
|
||||
ir.getObject().getName());
|
||||
ir.getNameable().getName());
|
||||
} else {
|
||||
text = ctx.getString(
|
||||
R.string.introduction_response_declined_sent,
|
||||
ir.getObject().getName());
|
||||
ir.getNameable().getName());
|
||||
}
|
||||
return new ConversationNoticeOutItem(ir.getId(), ir.getGroupId(),
|
||||
text, null, ir.getTimestamp(), ir.isSent(), ir.isSeen());
|
||||
@@ -179,7 +179,7 @@ abstract class ConversationItem {
|
||||
if (ir.wasAccepted()) {
|
||||
res = R.string.introduction_response_accepted_received;
|
||||
} else {
|
||||
if (ir.getObject().isIntroducer()) {
|
||||
if (ir.getNameable().isIntroducer()) {
|
||||
res = R.string.introduction_response_declined_received;
|
||||
} else {
|
||||
res =
|
||||
@@ -187,7 +187,7 @@ abstract class ConversationItem {
|
||||
}
|
||||
}
|
||||
String text =
|
||||
ctx.getString(res, contactName, ir.getObject().getName());
|
||||
ctx.getString(res, contactName, ir.getNameable().getName());
|
||||
return new ConversationNoticeInItem(ir.getId(), ir.getGroupId(),
|
||||
text, null, ir.getTimestamp(), ir.isRead());
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class ForumControllerImpl extends
|
||||
ForumInvitationResponseReceivedEvent f =
|
||||
(ForumInvitationResponseReceivedEvent) e;
|
||||
ForumInvitationResponse r = f.getMessageHeader();
|
||||
if (r.getObject().getId().equals(getGroupId()) && r.wasAccepted()) {
|
||||
if (r.getNameable().getId().equals(getGroupId()) && r.wasAccepted()) {
|
||||
LOG.info("Forum invitation was accepted");
|
||||
onForumInvitationAccepted(f.getContactId());
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ class GroupControllerImpl extends
|
||||
GroupInvitationResponseReceivedEvent g =
|
||||
(GroupInvitationResponseReceivedEvent) e;
|
||||
GroupInvitationResponse r = g.getMessageHeader();
|
||||
if (getGroupId().equals(r.getObject().getId()) && r.wasAccepted()) {
|
||||
if (getGroupId().equals(r.getNameable().getId()) && r.wasAccepted()) {
|
||||
listener.runOnUiThreadUnlessDestroyed(
|
||||
() -> listener.onInvitationAccepted(g.getContactId()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user