use of im.actor.core.api.ApiGroupFull in project actor-platform by actorapp.
the class Group method editMemberChangedAdmin.
public Group editMemberChangedAdmin(int uid, Boolean isAdmin) {
if (getWrappedExt() != null) {
ApiGroupFull e = getWrappedExt();
ArrayList<ApiMember> nMembers = new ArrayList<>(e.getMembers());
for (int i = 0; i < nMembers.size(); i++) {
ApiMember m = nMembers.get(i);
if (m.getUid() == uid) {
nMembers.remove(m);
nMembers.add(i, new ApiMember(m.getUid(), m.getInviterUid(), m.getDate(), isAdmin));
break;
}
}
ApiGroupFull fullExt = new ApiGroupFull(e.getId(), e.getCreateDate(), e.getOwnerUid(), nMembers, e.getTheme(), e.getAbout(), e.getExt(), e.isAsyncMembers(), e.isSharedHistory(), e.getShortName(), e.getPermissions());
fullExt.setUnmappedObjects(e.getUnmappedObjects());
return new Group(getWrapped(), fullExt);
} else {
return this;
}
}
use of im.actor.core.api.ApiGroupFull in project actor-platform by actorapp.
the class Group method editShortName.
public Group editShortName(String shortName) {
if (getWrappedExt() != null) {
ApiGroupFull e = getWrappedExt();
ApiGroupFull fullExt = new ApiGroupFull(e.getId(), e.getCreateDate(), e.getOwnerUid(), e.getMembers(), e.getTheme(), e.getAbout(), e.getExt(), e.isAsyncMembers(), e.isSharedHistory(), shortName, e.getPermissions());
fullExt.setUnmappedObjects(e.getUnmappedObjects());
return new Group(getWrapped(), fullExt);
} else {
return this;
}
}
use of im.actor.core.api.ApiGroupFull in project actor-platform by actorapp.
the class Group method editOwner.
public Group editOwner(int uid) {
if (getWrappedExt() != null) {
ApiGroupFull e = getWrappedExt();
ApiGroupFull fullExt = new ApiGroupFull(e.getId(), e.getCreateDate(), uid, e.getMembers(), e.getTheme(), e.getAbout(), e.getExt(), e.isAsyncMembers(), e.isSharedHistory(), e.getShortName(), e.getPermissions());
fullExt.setUnmappedObjects(e.getUnmappedObjects());
return new Group(getWrapped(), fullExt);
} else {
return this;
}
}
use of im.actor.core.api.ApiGroupFull in project actor-platform by actorapp.
the class Group method editFullExt.
public Group editFullExt(ApiMapValue ext) {
if (getWrappedExt() != null) {
ApiGroupFull e = getWrappedExt();
ApiGroupFull fullExt = new ApiGroupFull(e.getId(), e.getCreateDate(), e.getOwnerUid(), e.getMembers(), e.getTheme(), e.getAbout(), ext, e.isAsyncMembers(), e.isSharedHistory(), e.getShortName(), e.getPermissions());
fullExt.setUnmappedObjects(e.getUnmappedObjects());
return new Group(getWrapped(), fullExt);
} else {
return this;
}
}
use of im.actor.core.api.ApiGroupFull in project actor-platform by actorapp.
the class Group method editTopic.
//
// Editing Ext
//
public Group editTopic(String topic) {
if (getWrappedExt() != null) {
ApiGroupFull e = getWrappedExt();
ApiGroupFull fullExt = new ApiGroupFull(e.getId(), e.getCreateDate(), e.getOwnerUid(), e.getMembers(), topic, e.getAbout(), e.getExt(), e.isAsyncMembers(), e.isSharedHistory(), e.getShortName(), e.getPermissions());
fullExt.setUnmappedObjects(e.getUnmappedObjects());
return new Group(getWrapped(), fullExt);
} else {
return this;
}
}
Aggregations