Changed implementation to use initialstate
This commit is contained in:
parent
9e6a3fd21c
commit
ab7a8e2582
1 changed files with 9 additions and 4 deletions
|
|
@ -84,6 +84,15 @@ class NewSpaceController extends State<NewSpace> {
|
|||
),
|
||||
);
|
||||
|
||||
if (avatar != null) {
|
||||
events.add(
|
||||
StateEvent(
|
||||
type: sdk.EventTypes.RoomAvatar,
|
||||
content: {'url': avatarUrl.toString()},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// commenting out pangea room rules in spaces for now
|
||||
// if (rulesEditorKey.currentState?.rules != null) {
|
||||
// events.add(rulesEditorKey.currentState!.rules.toStateEvent);
|
||||
|
|
@ -198,10 +207,6 @@ class NewSpaceController extends State<NewSpace> {
|
|||
space.updateRoomCapacity(capacity);
|
||||
}
|
||||
|
||||
if (avatar != null && space != null) {
|
||||
space.setAvatar(MatrixFile(bytes: avatar, name: 'Avatar'));
|
||||
}
|
||||
|
||||
final Room? room = Matrix.of(context).client.getRoomById(spaceId);
|
||||
if (room == null) {
|
||||
ErrorHandler.logError(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue