* Update metro to v0.11.0
* Fix `@AssistedInject` usages
Now the injected variables in the factories must match the names in the constructors
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
It shouldn't be in use, since it was never properly defined:
- The `Private` values coming from the SDK are considered to be `Invite` instead.
- Remove any existing `JoinRule.Private` usages in our code.
* When the user is in a v12 room, use different UI to select the last owner when leaving
- Add `LeaveSpaceRoom.areCreatorsPrivileged` to detect when this is happening.
- Import new strings.
- Build the new UI.
- Attach it to a change member roles screen navigation.
* Don't display the `isLastOwner` UI if the user is the only joined one in the room
* Rename `LeaveSpaceState.isLastOwner` to `.needsOwnerChange`. This way, it's easier to understand the difference with the passed `LeaveSpaceRoom.isLastOwner` value
* Add a test for the new check of user not being the last joined member
* Fix paddings in `LeaveSpaceView`
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
* Add an empty state for the space screen if the user can modify its graph. It adds a new 'create room' button that allows you to open the create room screen with some preset values.
* When computing the editable spaces in `ConfigureRoomPresenter`, also set up the initial selected parent space if possible
* Use `Builder` pattern for `CreateRoomEntryPoint`
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
* Add `SpaceService.editableSpaces` and `SpaceService.addChildToSpace`
* Add `parentSpace` to `CreateRoomConfig`
* Allow setting a parent space to a room in `ConfigureRoomPresenter`, make sure the room is added to the parent space when creating it
* `ConfigureRoomPresenter`: Load the list of possible spaces a room can be added to
* Refactor `RoomVisibilityState` to internally use `JoinRuleItem`
This gets rid of `RoomAccess` and `RoomAccessItem`, and it will allow us to map the join rule items in a cleaner way to both join rules and the UI
* Implement the UI changes:
- Display the parent space.
- Allow selecting a new one.
- Import needed strings.
* Fix existing tests
* Add `@Immutable` annotation to `SpaceRoom`, since it was detected as unstable.
Maybe because of `RoomType`?
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
It seems better to handle the filtering logic there than on the view.
Besides this, hide knocking for spaces even if the knocking feature is enabled. We don't want to have knocking in spaces yet.
* Allow creating a space with `CreateRoomParameters`
* Add 'Create space' menu item in the spaces home screen. Also, imports new strings related to spaces.
* Link the 'Create space' button with the screen to create the space
* Unify room access and visibility for `ConfigureRoom`, use the updated design
* Fix `EditRoomDetails` avatar size (68dp)
* Replace `EditableAvatarView` and `UnsavedAvatar` copmonents with `AvatarPickerView`
* `AvatarDataFetcherFactory`: Make sure we use a fallback image fetcher when the URL is not an MXC one (a local one, i.e.). This removes the previous need for a separate `UnsavedAvatarView`
* Use `AvatarPickerView` in all the screens where `EditableAvatarView` was used
* Improve naming and previews
* Update strings, remove unused ones for `RoomAccessItem`
* Make `isSpace` part of the `CreateRoomConfig`
* Ensure the content fits in the screenshots for `AvatarPickerSizesPreview`
* Add `AvatarDataFetcherFactoryTest`
* Add new feature flag for creating spaces
* Fix ripple being too large for the `Pick` state
* Tweak margins and section titles a bit
* Add preview for `HomeTopBar` with the spaces case
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
* fix(deps): update kotlin to 2.3.0
* Cleanup - remove `datetime` compat version
* Fix several lint issues caused by the Kotlin compiler inference working better (checks in nullables, vars, etc.)
* Fix tests by removing mock in `File.readBytes`, it seems like it's no longer allowed. Using a tmp file works well enough.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
* Update metro to v0.6.7
* Replace `@Inject` with `@AssistedInject` where needed
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>