Skip to content

Commit

Permalink
fix conflicts: merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
oianmol committed Jul 20, 2022
2 parents a0fb6e7 + fac1c67 commit d27e34d
Show file tree
Hide file tree
Showing 67 changed files with 2,233 additions and 165 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ Discord Compose follows the principles of Clean Architecture with Android Archit
<td><img src = "art/discord_create_server_dark.png" width=240/></td>
<td><img src = "art/discord_friends_dark.png" width=240/></td>
</tr>
<tr>
<th>Chat</th>
</tr>
<tr>
<td><img src = "art/discord_chat_dark.png" width=240/></td>
</tr>
</table>

## 📷 Screenshots (Light theme)
Expand All @@ -113,14 +119,20 @@ Discord Compose follows the principles of Clean Architecture with Android Archit
<th>Invite</th>
<th>Password Manager Dialog</th>
<th>Create Server</th>
<th>Friends</th>
<th>Friends</th>
</tr>
<tr>
<td><img src = "art/discord_invite_light.png" width=240/></td>
<td><img src = "art/discord_password_manager_dialog_light.png" width=240/></td>
<td><img src = "art/discord_create_server_light.png" width=240/></td>
<td><img src = "art/discord_friends_light.png" width=240/></td>
</tr>
<tr>
<th>Chat</th>
</tr>
<tr>
<td><img src = "art/discord_chat_light.png" width=240/></td>
</tr>
</table>

<p align="right">[<a href="#top">Back to top</a>]</p>
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ dependencies {

/* Image Loading */
implementation(Lib.Android.COIL_COMPOSE)
implementation(Lib.Android.ACCOMPANIST_COIL)

/*DI*/
implementation(Lib.Di.hiltAndroid)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package dev.baseio.discordjetpackcompose

import android.os.Build
import android.os.Bundle
import android.view.WindowInsets
import android.view.WindowInsetsController
import android.view.WindowManager
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.runtime.LaunchedEffect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import dev.baseio.discordjetpackcompose.ui.routes.dashboard.friends.FriendsScree
import dev.baseio.discordjetpackcompose.ui.routes.dashboard.invite.InviteScreen
import dev.baseio.discordjetpackcompose.ui.routes.dashboard.main.HomeScreen
import dev.baseio.discordjetpackcompose.ui.routes.dashboard.main.dasboard.DashboardScreen
import dev.baseio.discordjetpackcompose.ui.routes.dashboard.userSettings.UserSettings

fun NavGraphBuilder.dashboardRoute(
composeNavigator: ComposeNavigator,
Expand All @@ -34,6 +35,9 @@ fun NavGraphBuilder.dashboardRoute(
composable(DiscordScreen.CreateServer.name) {
CreateServer(composeNavigator)
}
composable(DiscordScreen.UserSettings.name) {
UserSettings(composeNavigator = composeNavigator)
}
}

}
Expand Down Expand Up @@ -62,5 +66,8 @@ fun NavGraphBuilder.setupDashboardBottomNavScreens(
composable(DiscordScreen.Friends.route) {
FriendsScreen(composeNavigator = composeNavigator)
}
composable(DiscordScreen.UserSettings.name) {
UserSettings(composeNavigator = composeNavigator)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
Expand Down Expand Up @@ -139,10 +140,10 @@ fun FriendsScreen(
}

@Composable
fun Header(title: Int, size: Int) {
fun Header(title: Int, size: Int, style: TextStyle = DirectMessageListTypography.h5) {
Text(
text = stringResource(title, size),
style = DirectMessageListTypography.h5,
style = style,
color = DiscordColorProvider.colors.onSurface.copy(alpha = ContentAlpha.medium)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.offset
import androidx.compose.material.ContentAlpha
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.FractionalThreshold
import androidx.compose.material.ModalBottomSheetState
import androidx.compose.material.SwipeableState
import androidx.compose.material.rememberSwipeableState
import androidx.compose.material.swipeable
import androidx.compose.material.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.SideEffect
Expand All @@ -45,10 +39,12 @@ import dev.baseio.discordjetpackcompose.entities.ChatUserEntity
import dev.baseio.discordjetpackcompose.entities.server.ServerEntity
import dev.baseio.discordjetpackcompose.navigator.ComposeNavigator
import dev.baseio.discordjetpackcompose.navigator.DiscordScreen
import dev.baseio.discordjetpackcompose.ui.routes.dashboard.main.chatscreen.ChannelMemberScreen
import dev.baseio.discordjetpackcompose.ui.routes.dashboard.main.chatscreen.ChatScreen
import dev.baseio.discordjetpackcompose.ui.routes.dashboard.main.dasboard.getFakeChatUserList
import dev.baseio.discordjetpackcompose.ui.routes.dashboard.main.dasboard.getFakeServerList
import dev.baseio.discordjetpackcompose.ui.theme.DiscordColorProvider
import dev.baseio.discordjetpackcompose.ui.theme.channel_member_bg
import dev.baseio.discordjetpackcompose.viewmodels.DashboardScreenViewModel
import kotlinx.coroutines.CoroutineScope
import kotlin.math.roundToInt
Expand Down Expand Up @@ -131,9 +127,9 @@ fun HomeScreen(

val leftDrawerModifier by remember(drawerOnTop, isAnyItemSelectedInServers) {
mutableStateOf(
swipeableModifier
.zIndex(if (drawerOnTop == DrawerTypes.LEFT) 1f else 0f)
.alpha(if (drawerOnTop == DrawerTypes.LEFT) 1f else 0f)
swipeableModifier
.zIndex(if (drawerOnTop == DrawerTypes.LEFT) 1f else 0f)
.alpha(if (drawerOnTop == DrawerTypes.LEFT) 1f else 0f)
)
}

Expand Down Expand Up @@ -190,13 +186,16 @@ fun HomeScreen(
openServerInfoBottomSheet = { coroutineScope.launch { sheetState.show() } },
viewModel = viewModel
)
Box(
ChannelMemberScreen(
modifier = rightDrawerModifier
.fillMaxHeight()
.fillMaxWidth(0.85f)
.background(Color.Cyan)
.align(Alignment.CenterEnd)
) {}
.background(channel_member_bg)
.align(Alignment.CenterEnd),
onInviteButtonClicked = {
composeNavigator.navigate(DiscordScreen.Invite.route)
}
)

val centerScreenZIndex by remember {
derivedStateOf {
Expand Down
Loading

0 comments on commit d27e34d

Please sign in to comment.