Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COMPOSE] Share fragment #1

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ buildscript {
lifecycleLiveData = "2.4.1"
biometricVersion="1.1.0"
androidX = '1.0.0'
compose_version = '1.1.1'

// Kotlin
kotlinVersion = "1.6.21"
kotlinVersion = "1.6.10"
coroutinesVersion = "1.6.1"

// Koin
Expand Down
19 changes: 18 additions & 1 deletion owncloudApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,19 @@ dependencies {
implementation "androidx.core:core-ktx:$ktxCoreVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$ktxViewModelVersion"
implementation "androidx.fragment:fragment-ktx:$ktxFragmentVersion"
implementation "androidx.compose.runtime:runtime-livedata:1.1.1"

// Preferences
implementation 'androidx.preference:preference-ktx:1.2.0'

// MDM feedback
implementation 'androidx.enterprise:enterprise-feedback:1.1.0'

// Jetpack Compose
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation 'androidx.activity:activity-compose:1.4.0'

// Tests
testImplementation project(':owncloudTestUtil')
testImplementation "junit:junit:$junitVersion"
Expand Down Expand Up @@ -93,7 +99,10 @@ dependencies {

debugImplementation "androidx.fragment:fragment-testing:1.4.1"
debugImplementation 'com.facebook.stetho:stetho:1.6.0'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'

// Jetpack Compose
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
}

android {
Expand All @@ -117,6 +126,14 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

buildFeatures {
compose true
}

composeOptions {
kotlinCompilerExtensionVersion compose_version
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import com.owncloud.android.presentation.providers.sharing.UsersAndGroupsSearchP
import com.owncloud.android.presentation.ui.sharing.fragments.EditPrivateShareFragment
import com.owncloud.android.presentation.ui.sharing.fragments.PublicShareDialogFragment
import com.owncloud.android.presentation.ui.sharing.fragments.SearchShareesFragment
import com.owncloud.android.presentation.ui.sharing.fragments.ShareFileComposeFragment
import com.owncloud.android.presentation.ui.sharing.fragments.ShareFileFragment
import com.owncloud.android.presentation.ui.sharing.fragments.ShareFragmentListener
import com.owncloud.android.presentation.viewmodels.sharing.OCShareViewModel
Expand Down Expand Up @@ -73,7 +74,7 @@ class ShareActivity : FileActivity(), ShareFragmentListener {
supportFragmentManager.transaction {
if (savedInstanceState == null && file != null && account != null) {
// Add Share fragment on first creation
val fragment = ShareFileFragment.newInstance(file, account!!)
val fragment = ShareFileComposeFragment.newInstance(file, account)
replace(
R.id.share_fragment_container, fragment,
TAG_SHARE_FRAGMENT
Expand Down
Loading