mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Use namespaced strings for client IDs
This commit is contained in:
@@ -25,6 +25,7 @@ import javax.inject.Inject;
|
||||
|
||||
import static java.util.logging.Level.INFO;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static org.briarproject.api.blogs.BlogManager.CLIENT_ID;
|
||||
|
||||
public class FeedControllerImpl extends BaseControllerImpl
|
||||
implements FeedController {
|
||||
@@ -62,7 +63,7 @@ public class FeedControllerImpl extends BaseControllerImpl
|
||||
onBlogPostAdded(b.getHeader(), b.isLocal());
|
||||
} else if (e instanceof GroupRemovedEvent) {
|
||||
GroupRemovedEvent g = (GroupRemovedEvent) e;
|
||||
if (g.getGroup().getClientId().equals(blogManager.getClientId())) {
|
||||
if (g.getGroup().getClientId().equals(CLIENT_ID)) {
|
||||
LOG.info("Blog removed");
|
||||
onBlogRemoved();
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ import javax.inject.Inject;
|
||||
import static android.support.design.widget.Snackbar.LENGTH_INDEFINITE;
|
||||
import static java.util.logging.Level.INFO;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static org.briarproject.api.forum.ForumManager.CLIENT_ID;
|
||||
|
||||
public class ForumListFragment extends BaseEventFragment implements
|
||||
OnClickListener {
|
||||
@@ -236,13 +237,13 @@ public class ForumListFragment extends BaseEventFragment implements
|
||||
loadAvailableForums();
|
||||
} else if (e instanceof GroupAddedEvent) {
|
||||
GroupAddedEvent g = (GroupAddedEvent) e;
|
||||
if (g.getGroup().getClientId().equals(forumManager.getClientId())) {
|
||||
if (g.getGroup().getClientId().equals(CLIENT_ID)) {
|
||||
LOG.info("Forum added, reloading forums");
|
||||
loadForums();
|
||||
}
|
||||
} else if (e instanceof GroupRemovedEvent) {
|
||||
GroupRemovedEvent g = (GroupRemovedEvent) e;
|
||||
if (g.getGroup().getClientId().equals(forumManager.getClientId())) {
|
||||
if (g.getGroup().getClientId().equals(CLIENT_ID)) {
|
||||
LOG.info("Forum removed, removing from list");
|
||||
removeForum(g.getGroup().getId());
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.util.concurrent.Executor;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static org.briarproject.api.privategroup.PrivateGroupManager.CLIENT_ID;
|
||||
|
||||
public class GroupInvitationControllerImpl
|
||||
extends InvitationControllerImpl<GroupInvitationItem>
|
||||
@@ -51,7 +52,7 @@ public class GroupInvitationControllerImpl
|
||||
|
||||
@Override
|
||||
protected ClientId getShareableClientId() {
|
||||
return privateGroupManager.getClientId();
|
||||
return CLIENT_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,6 +33,7 @@ import javax.inject.Inject;
|
||||
|
||||
import static java.util.logging.Level.INFO;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static org.briarproject.api.privategroup.PrivateGroupManager.CLIENT_ID;
|
||||
|
||||
public class GroupListControllerImpl extends DbControllerImpl
|
||||
implements GroupListController, EventListener {
|
||||
@@ -92,14 +93,14 @@ public class GroupListControllerImpl extends DbControllerImpl
|
||||
} else if (e instanceof GroupAddedEvent) {
|
||||
GroupAddedEvent g = (GroupAddedEvent) e;
|
||||
ClientId id = g.getGroup().getClientId();
|
||||
if (id.equals(groupManager.getClientId())) {
|
||||
if (id.equals(CLIENT_ID)) {
|
||||
LOG.info("Private group added");
|
||||
onGroupAdded(g.getGroup().getId());
|
||||
}
|
||||
} else if (e instanceof GroupRemovedEvent) {
|
||||
GroupRemovedEvent g = (GroupRemovedEvent) e;
|
||||
ClientId id = g.getGroup().getClientId();
|
||||
if (id.equals(groupManager.getClientId())) {
|
||||
if (id.equals(CLIENT_ID)) {
|
||||
LOG.info("Private group removed");
|
||||
onGroupRemoved(g.getGroup().getId());
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.concurrent.Executor;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static org.briarproject.api.blogs.BlogManager.CLIENT_ID;
|
||||
|
||||
public class BlogInvitationControllerImpl
|
||||
extends InvitationControllerImpl<SharingInvitationItem>
|
||||
@@ -49,7 +50,7 @@ public class BlogInvitationControllerImpl
|
||||
|
||||
@Override
|
||||
protected ClientId getShareableClientId() {
|
||||
return blogManager.getClientId();
|
||||
return CLIENT_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.concurrent.Executor;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static org.briarproject.api.forum.ForumManager.CLIENT_ID;
|
||||
|
||||
public class ForumInvitationControllerImpl
|
||||
extends InvitationControllerImpl<SharingInvitationItem>
|
||||
@@ -50,7 +51,7 @@ public class ForumInvitationControllerImpl
|
||||
|
||||
@Override
|
||||
protected ClientId getShareableClientId() {
|
||||
return forumManager.getClientId();
|
||||
return CLIENT_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user