Skip to content

MediaSend update 1 : Moved fragment UI to compose#4

Merged
jbsession merged 20 commits intoimprovements/mediasend-composefrom
ui/mediasend
Feb 3, 2026
Merged

MediaSend update 1 : Moved fragment UI to compose#4
jbsession merged 20 commits intoimprovements/mediasend-composefrom
ui/mediasend

Conversation

@jbsession
Copy link
Owner

@jbsession jbsession commented Dec 19, 2025

Moved the old Fragment XMLs to Compose.

New ComposeFragments are created to replace the old fragments for the MediaSendActivity.

Part 2 in progress : MediaSendFragment UI to compose.

@jbsession jbsession self-assigned this Dec 19, 2025
) {

// span logic: screenWidth / media_picker_folder_width
val folderWidth = dimensionResource(R.dimen.media_picker_folder_width)

This comment was marked as resolved.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the dp value in this file to keep our Dimension.kt values generic.

modifier = Modifier
.align(Alignment.BottomCenter)
.fillMaxWidth()
.height(50.dp)

This comment was marked as resolved.

import java.util.ArrayList;
import java.util.List;

@Deprecated

This comment was marked as resolved.

.clickable(onClick = onClick)
) {
Box(modifier = Modifier.aspectRatio(1f)) {
GlideImage(

This comment was marked as resolved.

modifier = Modifier.fillMaxSize(),
contentScale = ContentScale.Crop
)
// Bottom shade overlay
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it could be achieved more easily with the innerShadow modifier?

selected.indexOfFirst { it.uri == media.uri }
}

// Matches adapter rules:

This comment was marked as resolved.

.padding(end = 2.dp, bottom = 2.dp)
.aspectRatio(1f)
.combinedClickable(
onClick = {

This comment was marked as resolved.


Box(
modifier = modifier
.padding(end = 2.dp, bottom = 2.dp)

This comment was marked as resolved.

)

// Border overlay (replaces @drawable/mediapicker_item_border_dark View)
Box(

This comment was marked as resolved.

painter = painterResource(R.drawable.triangle_right),
contentDescription = null,
modifier = Modifier
.size(width = 15.dp, height = 18.dp)

This comment was marked as resolved.


val context = LocalContext.current
val activity = context as? FragmentActivity
val showManage = remember(activity) {

This comment was marked as resolved.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved a few functions into the VM and added the flag to the UiState as an initial change. Maybe we can separate permission checking from the AttachmentManager. I copied some of the permission checks into the VM for now but I can do the separate file if we find that suitable for the modern structure.

.fillMaxSize()
.background(LocalColors.current.background)
) {
items(folders) { folder ->

This comment was marked as resolved.

val mediaItemGridSpacing : Dp = 2.dp,
val mediaPlayOverlay : Dp = 36.dp,

val smallRadius : Dp = 26.dp

This comment was marked as resolved.

.padding(LocalDimensions.current.xxsSpacing),
contentAlignment = Alignment.Center
) {
IndicatorOn(size = LocalDimensions.current.smallRadius)

This comment was marked as resolved.

import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import com.bumptech.glide.integration.compose.ExperimentalGlideComposeApi
import com.bumptech.glide.integration.compose.GlideImage

This comment was marked as resolved.

.aspectRatio(1f)
.border(
width = LocalDimensions.current.borderStroke,
color = Color.White.copy(alpha = 0.20f)

This comment was marked as resolved.

This comment was marked as resolved.

jbsession and others added 6 commits February 2, 2026 17:54
* removed portrait lock for most activities, retained for WebRtcCallActivity

* Initial landscape, compact, and flip compatibility

* Landing screen initial landscape compat with flip, tablet and phone

* QR code activity landscape

* Initial layout for Start Conversation sheet

* Added Adaptive layout helper

* Revert "Initial landscape, compact, and flip compatibility"

This reverts commit 20a5fa9.

* Use adaptive layout

* made sholdUseTwoPane private

* removed padding for back button

* GiphyActivity initial compose

* GiphyFragment compose

* GiphyFragment initial kotlin

* cleanup

* GiphyFragment to kotlin

* Cleanup

* Converted async task to coroutine

* Giphy fragment and sticket to kotlin

* Separate compose fun

* Start conversation cleanup

* cleanup

* Cleanup

* notif landscape fix

* Revert "notif landscape fix"

This reverts commit 3cc3ec0.

* initial scaling for QR in recovery password

* Updated usage of twopane into landscape check only.

* Share component for qrPanel

* Fixed overlap for 3 button navigation

* camera inset in conversation

* apply safe inset camera inset

* remove portrait mode for webrtccall

* cleanup

* Media preview insets

* Use state for giph loading

* Use state for giphyLoading

* themed content for tabs

* Removed two pane

* GiphyActivity converted to kotlin, updated compose usage

* Cleanup

* A bit of optimization for session netowork's node image

* inset for settings screen

* token page and conversation settings

* App bar search bar insets

* WebRtc rotation fix, Landscape xml

* contactAvatar webRtc adaptive

* refactor adaptiveInfo name

* State list drawable landscape

* rtc call landscape update

* Added insets and updated overlay stub

* Serializable data for bottom sheet. Fixed crashes

* Fixed landscape scroll for conversation bottomsheet

* insets for cameraXfragment

* Initial workaround for giphytabs

* cleanup

* Let activity handle the orientation change

* Fixed how web rtc looks on landscape

* allow recreation of layout for fragment. Add saveInstance check to prevent duplicate framgnet

* Simplified logic

* Added to LocalDimensions

* cleanups

* Filter thread record instead of db call

* Cleanup

* Removed auto scroll flag from setDeviceOrientation function

* Search contact action bottomsheet landscape state expanded

* convert calculation into anchor

* Narrow width use anchor, helper function to get anchor

* Safe insets for start conversation sheet

* Dynamic insets if sheet does not fill the width

* Update minimum size, fixed box constraints

* cleanup

* draw on image fix layout

* spacing fixes for editing images

* fixed constraints for color slider

* initial configuration change handling

* Revert "initial configuration change handling"

This reverts commit 8c9891d.

* Made some QR areas scrollable but fit area

* conversationv2 landscape layout

* Remove landscape hiding the rail

* Refactored dimen name

* added comments

* Fixed rotation value

* Removed landscape layout, added rotation to back arrow

* Handle onConfigureChanged for WebrtcActivity

* Cleanups

* Updated inset margine helper to fix home FAB

* Initial orientation handling for CameraXFragment

* Added CameraXActivity to replace old fragment

* Fixed insets for CameraXActivity

* Added tiny helper for bottom margin insets

* Fixed missing dimen

* SDK 36 bump

* Updated back handling for activity with fragment

* Updated back handling

* Video camera landscape adjustment

* Updated avatar sizes for portrait and landscape

* Navigator to survive config changes, collapsible footer inset

* replaced vm with retain

* Used retain for navigations, updated insets for debug and pro screens

* Fixed leftoever condition

* Updated landscape screen for manage group stuff

* ManageMembersScreen cleanup and improvements

* More cleanups

* Updated some remembers to retain

* Minor cleanup

---------

Co-authored-by: ThomasSession <thomas.r@getsession.org>
…n-foundation#1825)

Bumps androidx.activity:activity-compose from 1.10.1 to 1.12.2.

---
updated-dependencies:
- dependency-name: androidx.activity:activity-compose
  dependency-version: 1.12.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Send control message before exception

* Add sorting by accountId when showing new dialogs

* cleanup

* cleanup for readability

* Cleanups
* Initial proguard and minify

* Initial proguard rules, App doesnt crash on start

* Conversation and emoji

* Some JNI rules

* cleanup

* Kryo proguard

* Cleanup

* more rules

* added to proguard

* added rules to proguard

* proguard file cleanup

* gradle and proguard cleanup

* Cleanup

* Gradle cleanup

* Huawei warnings

* Compile only for huawei

* HMS analytics

* Fix build error

* Updated rules

* Added rules, cleanups

* Removed misplaced flag

* Some rules cleanup

* gradle update
@jbsession jbsession merged commit 82ae2ff into improvements/mediasend-compose Feb 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants