Skip to content
Merged
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
17 changes: 17 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/other.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added MessengerClone/main-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MessengerClone/message-deleted-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MessengerClone/messenger-clone.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MessengerClone/profile-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MessengerClone/reacted-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MessengerClone/reaction-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MessengerClone/search-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MessengerClone/sent-message-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MessengerClone/switch-account-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package com.mathroda.messengerclone

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
package com.mathroda.messengerclone.ui.search.util
package com.mathroda.messengerclone.common

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.TextRange
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.text.style.TextDirection
import androidx.compose.ui.unit.dp
import com.mathroda.messengerclone.R
import com.mathroda.messengerclone.ui.theme.BubbleGray
import io.getstream.chat.android.compose.ui.theme.ChatTheme

Expand All @@ -29,7 +25,9 @@ fun CustomInputField(
modifier: Modifier = Modifier,
enabled: Boolean = true,
maxLines: Int = Int.MAX_VALUE,
color: Color = ChatTheme.colors.barsBackground,
border: BorderStroke = BorderStroke(0.dp, BubbleGray),
innerPadding: PaddingValues = PaddingValues(horizontal = 16.dp, vertical = 8.dp),
decorationBox: @Composable (innerTextField: @Composable () -> Unit) -> Unit,
) {
var textFieldValueState by remember { mutableStateOf(TextFieldValue(text = value)) }
Expand All @@ -51,8 +49,8 @@ fun CustomInputField(
modifier = modifier
.border(border = border, shape = ChatTheme.shapes.inputField)
.clip(ChatTheme.shapes.inputField)
.background(ChatTheme.colors.barsBackground)
.height(56.dp),
.background(color)
.padding(innerPadding),
value = textFieldValue,
onValueChange = {
textFieldValueState = it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,25 @@ import androidx.compose.animation.core.AnimationConstants
import androidx.compose.animation.core.tween
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.Scaffold
import androidx.compose.runtime.*
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
import androidx.compose.ui.input.nestedscroll.NestedScrollSource
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.dp
import com.mathroda.messengerclone.MessengerApp
import com.mathroda.messengerclone.R
import com.mathroda.messengerclone.ui.BaseConnectedActivity
import com.mathroda.messengerclone.ui.channels.components.*
import com.mathroda.messengerclone.ui.login.UserLoginActivity
import com.mathroda.messengerclone.ui.channels.components.MessengerCloneBottomBar
import com.mathroda.messengerclone.ui.channels.components.MessengerCloneChannelList
import com.mathroda.messengerclone.ui.channels.components.MessengerCloneListHeader
import com.mathroda.messengerclone.ui.messages.MessagesActivity
import com.mathroda.messengerclone.ui.profile.ProfileActivity
import com.mathroda.messengerclone.ui.search.SearchActivity
Expand All @@ -39,12 +38,10 @@ import io.getstream.chat.android.client.api.models.querysort.QuerySortByField
import io.getstream.chat.android.client.models.Channel
import io.getstream.chat.android.compose.state.channels.list.*
import io.getstream.chat.android.compose.ui.channels.info.SelectedChannelMenu
import io.getstream.chat.android.compose.ui.components.SearchInput
import io.getstream.chat.android.compose.ui.components.SimpleDialog
import io.getstream.chat.android.compose.ui.theme.ChatTheme
import io.getstream.chat.android.compose.viewmodel.channels.ChannelListViewModel
import io.getstream.chat.android.compose.viewmodel.channels.ChannelViewModelFactory
import kotlin.math.roundToInt

@ExperimentalMaterialApi
@ExperimentalFoundationApi
Expand Down Expand Up @@ -85,9 +82,6 @@ class ChannelsActivity: BaseConnectedActivity() {
fun MessengerCloneChannelsScreen(
title: String = "Chats",
isShowingHeader: Boolean = true,
channelLimit: Int = 30,
memberLimit: Int = 1,
messageLimit: Int = 30,
onHeaderActionClick: () -> Unit = {},
onHeaderAvatarClick: () -> Unit = {},
onItemClick: (Channel) -> Unit = {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
Expand Down
Loading