Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions app-android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<activity
android:name="social.androiddev.dodo.MainActivity"
android:exported="true"
android:windowSoftInputMode="adjustResize"
android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ include(":ui:signed-in")
include(":ui:signed-out")
include(":ui:desktop-webview")

include(":ui:compose-toot")
include(":domain:timeline")
include(":domain:authentication")

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* This file is part of Dodo.
*
* Dodo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
* Dodo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Dodo.
* If not, see <https://www.gnu.org/licenses/>.
*/
package social.androiddev.common.modifiers

import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.ui.Modifier

actual fun Modifier.moveWithKeyboard(): Modifier {
return this.navigationBarsPadding().imePadding()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* This file is part of Dodo.
*
* Dodo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
* Dodo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Dodo.
* If not, see <https://www.gnu.org/licenses/>.
*/
package social.androiddev.common.modifiers

import androidx.compose.ui.Modifier

/**
*
* Use navigationBarsPadding() and imePadding() to move the composable above both the
* navigation bar, and on-screen keyboard (IME)
*/
expect fun Modifier.moveWithKeyboard(): Modifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* This file is part of Dodo.
*
* Dodo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
* Dodo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Dodo.
* If not, see <https://www.gnu.org/licenses/>.
*/
package social.androiddev.common.modifiers

import androidx.compose.ui.Modifier

/**
*
* Use navigationBarsPadding() and imePadding() to move the composable above both the
* navigation bar, and on-screen keyboard (IME)
*/
actual fun Modifier.moveWithKeyboard(): Modifier {
// no-op in desktop
return this
}
27 changes: 27 additions & 0 deletions ui/compose-toot/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
plugins {
id("social.androiddev.library.ui")
id("social.androiddev.codequality")
}

android {
namespace = "social.androiddev.ui.composetoot"
}

kotlin {

sourceSets {
val commonMain by getting {
dependencies {
implementation(projects.domain.timeline)
implementation(projects.ui.common)
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.materialIconsExtended)
implementation(libs.io.insert.koin.core)

}
}

}
}
2 changes: 2 additions & 0 deletions ui/compose-toot/src/androidMain/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* This file is part of Dodo.
*
* Dodo is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
* Dodo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Dodo.
* If not, see <https://www.gnu.org/licenses/>.
*/
package social.androidev.composetoot

import kotlinx.coroutines.flow.StateFlow

/**
* The base component describing all business logic needed for the toot screen
*/
interface ComposeTootComponent {

val state: StateFlow<ComposeTootState>
fun onCloseClicked()

fun onTootContentChange(text: String)
fun onPostClicked()
fun onActionClicked(action: Action)
}
Loading