Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Briar Desktop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
Briar Desktop
Commits
844d70a3
Commit
844d70a3
authored
Sep 21, 2021
by
Sebastian
Committed by
Sebastian
Sep 22, 2021
Browse files
Options
Downloads
Patches
Plain Diff
Make some statements more compact
parent
b6c267db
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!7
Import upstream updates to UI
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/kotlin/org/briarproject/briar/desktop/paul/views/PrivateMessageView.kt
+94
-155
94 additions, 155 deletions
...iarproject/briar/desktop/paul/views/PrivateMessageView.kt
with
94 additions
and
155 deletions
src/main/kotlin/org/briarproject/briar/desktop/paul/views/PrivateMessageView.kt
+
94
−
155
View file @
844d70a3
...
@@ -37,7 +37,7 @@ import androidx.compose.material.Scaffold
...
@@ -37,7 +37,7 @@ import androidx.compose.material.Scaffold
import
androidx.compose.material.Text
import
androidx.compose.material.Text
import
androidx.compose.material.TextButton
import
androidx.compose.material.TextButton
import
androidx.compose.material.TextField
import
androidx.compose.material.TextField
import
androidx.compose.material.icons.Icons
import
androidx.compose.material.icons.Icons
.Filled
import
androidx.compose.material.icons.filled.Add
import
androidx.compose.material.icons.filled.Add
import
androidx.compose.material.icons.filled.ArrowBack
import
androidx.compose.material.icons.filled.ArrowBack
import
androidx.compose.material.icons.filled.ArrowRight
import
androidx.compose.material.icons.filled.ArrowRight
...
@@ -133,11 +133,11 @@ fun PrivateMessageView(
...
@@ -133,11 +133,11 @@ fun PrivateMessageView(
@Composable
@Composable
fun
AddContactDialog
(
isVisible
:
Boolean
,
onCancel
:
(
Boolean
)
->
Unit
)
{
fun
AddContactDialog
(
isVisible
:
Boolean
,
onCancel
:
(
Boolean
)
->
Unit
)
{
if
(
isVisible
)
{
if
(!
isVisible
)
{
return
}
AlertDialog
(
AlertDialog
(
onDismissRequest
=
{
onDismissRequest
=
{
onCancel
(
false
)
},
onCancel
(
false
)
},
text
=
{
text
=
{
Column
(
modifier
=
Modifier
.
fillMaxWidth
())
{
Column
(
modifier
=
Modifier
.
fillMaxWidth
())
{
Row
(
Modifier
.
fillMaxWidth
().
padding
(
vertical
=
16
.
dp
))
{
Row
(
Modifier
.
fillMaxWidth
().
padding
(
vertical
=
16
.
dp
))
{
...
@@ -181,20 +181,14 @@ fun AddContactDialog(isVisible: Boolean, onCancel: (Boolean) -> Unit) {
...
@@ -181,20 +181,14 @@ fun AddContactDialog(isVisible: Boolean, onCancel: (Boolean) -> Unit) {
},
},
confirmButton
=
{
confirmButton
=
{
TextButton
(
TextButton
(
onClick
=
{
onClick
=
{
onCancel
(
false
)
},
modifier
=
Modifier
.
background
(
briarGreen
)
onCancel
(
false
)
},
modifier
=
Modifier
.
background
(
briarGreen
)
)
{
)
{
Text
(
"Add"
)
Text
(
"Add"
)
}
}
},
},
dismissButton
=
{
dismissButton
=
{
TextButton
(
TextButton
(
onClick
=
{
onClick
=
{
onCancel
(
false
)
},
modifier
=
Modifier
.
background
(
briarBlack
)
onCancel
(
false
)
},
modifier
=
Modifier
.
background
(
briarBlack
)
)
{
)
{
Text
(
"Cancel"
)
Text
(
"Cancel"
)
}
}
...
@@ -206,7 +200,6 @@ fun AddContactDialog(isVisible: Boolean, onCancel: (Boolean) -> Unit) {
...
@@ -206,7 +200,6 @@ fun AddContactDialog(isVisible: Boolean, onCancel: (Boolean) -> Unit) {
properties
=
DialogProperties
(
resizable
=
false
,
undecorated
=
true
,
size
=
IntSize
(
600
,
300
))
properties
=
DialogProperties
(
resizable
=
false
,
undecorated
=
true
,
size
=
IntSize
(
600
,
300
))
)
)
}
}
}
@Composable
@Composable
fun
SearchTextField
(
searchValue
:
String
,
onValueChange
:
(
String
)
->
Unit
,
onContactAdd
:
(
Boolean
)
->
Unit
)
{
fun
SearchTextField
(
searchValue
:
String
,
onValueChange
:
(
String
)
->
Unit
,
onContactAdd
:
(
Boolean
)
->
Unit
)
{
...
@@ -218,12 +211,8 @@ fun SearchTextField(searchValue: String, onValueChange: (String) -> Unit, onCont
...
@@ -218,12 +211,8 @@ fun SearchTextField(searchValue: String, onValueChange: (String) -> Unit, onCont
textStyle
=
TextStyle
(
color
=
Color
.
White
,
fontSize
=
16
.
sp
),
textStyle
=
TextStyle
(
color
=
Color
.
White
,
fontSize
=
16
.
sp
),
placeholder
=
{
Text
(
"Contacts"
,
color
=
Color
.
Gray
)
},
placeholder
=
{
Text
(
"Contacts"
,
color
=
Color
.
Gray
)
},
leadingIcon
=
{
leadingIcon
=
{
Icon
(
val
padding
=
Modifier
.
padding
(
top
=
8
.
dp
,
bottom
=
8
.
dp
,
start
=
16
.
dp
)
Icons
.
Filled
.
Search
,
Icon
(
Filled
.
Search
,
"search contacts"
,
padding
,
Color
.
White
)
"search contacts"
,
tint
=
Color
.
White
,
modifier
=
Modifier
.
padding
(
top
=
8
.
dp
,
bottom
=
8
.
dp
,
start
=
16
.
dp
)
)
},
},
trailingIcon
=
{
trailingIcon
=
{
IconButton
(
IconButton
(
...
@@ -232,7 +221,7 @@ fun SearchTextField(searchValue: String, onValueChange: (String) -> Unit, onCont
...
@@ -232,7 +221,7 @@ fun SearchTextField(searchValue: String, onValueChange: (String) -> Unit, onCont
briarBlueMsg
,
CircleShape
briarBlueMsg
,
CircleShape
)
)
)
{
)
{
Icon
(
Icons
.
Filled
.
PersonAdd
,
"add contact"
,
tint
=
Color
.
White
,
modifier
=
Modifier
.
size
(
20
.
dp
))
Icon
(
Filled
.
PersonAdd
,
"add contact"
,
tint
=
Color
.
White
,
modifier
=
Modifier
.
size
(
20
.
dp
))
}
}
}
}
)
)
...
@@ -272,14 +261,8 @@ fun ContactCard(
...
@@ -272,14 +261,8 @@ fun ContactCard(
onDraw
=
{
onDraw
=
{
val
size
=
10
.
dp
.
toPx
()
val
size
=
10
.
dp
.
toPx
()
withTransform
({
translate
(
left
=
-
6f
,
top
=
-
12f
)
})
{
withTransform
({
translate
(
left
=
-
6f
,
top
=
-
12f
)
})
{
drawCircle
(
drawCircle
(
color
=
Color
.
White
,
radius
=
(
size
+
2
.
dp
.
toPx
())
/
2f
)
color
=
Color
.
White
,
drawCircle
(
color
=
briarBlueMsg
,
radius
=
size
/
2f
)
radius
=
(
size
+
2
.
dp
.
toPx
())
/
2f
,
)
drawCircle
(
color
=
briarBlueMsg
,
radius
=
size
/
2f
,
)
}
}
}
}
)
)
...
@@ -304,21 +287,12 @@ fun ContactCard(
...
@@ -304,21 +287,12 @@ fun ContactCard(
modifier
=
Modifier
.
padding
(
start
=
32
.
dp
,
end
=
18
.
dp
).
size
(
22
.
dp
).
align
(
Alignment
.
CenterVertically
),
modifier
=
Modifier
.
padding
(
start
=
32
.
dp
,
end
=
18
.
dp
).
size
(
22
.
dp
).
align
(
Alignment
.
CenterVertically
),
onDraw
=
{
onDraw
=
{
val
size
=
16
.
dp
.
toPx
()
val
size
=
16
.
dp
.
toPx
()
drawCircle
(
drawCircle
(
color
=
Color
.
White
,
radius
=
size
/
2f
)
color
=
Color
.
White
,
radius
=
size
/
2f
)
// TODO check if contact online
// TODO check if contact online
if
(
true
)
{
if
(
true
)
{
drawCircle
(
drawCircle
(
color
=
briarGreen
,
radius
=
14
.
dp
.
toPx
()
/
2f
)
color
=
briarGreen
,
radius
=
14
.
dp
.
toPx
()
/
2f
)
}
else
{
}
else
{
drawCircle
(
drawCircle
(
color
=
briarBlack
,
radius
=
14
.
dp
.
toPx
()
/
2f
)
color
=
briarBlack
,
radius
=
14
.
dp
.
toPx
()
/
2f
)
}
}
}
}
)
)
...
@@ -334,14 +308,12 @@ fun ContactList(
...
@@ -334,14 +308,12 @@ fun ContactList(
onContactAdd
:
(
Boolean
)
->
Unit
onContactAdd
:
(
Boolean
)
->
Unit
)
{
)
{
var
searchValue
by
remember
{
mutableStateOf
(
""
)
}
var
searchValue
by
remember
{
mutableStateOf
(
""
)
}
var
filteredContacts
=
ArrayList
<
Contact
>()
val
filteredContacts
=
if
(
searchValue
.
isEmpty
())
{
filteredContacts
=
if
(
searchValue
.
isEmpty
())
{
ArrayList
(
contacts
)
ArrayList
(
contacts
)
}
else
{
}
else
{
val
resultList
=
ArrayList
<
Contact
>()
val
resultList
=
ArrayList
<
Contact
>()
for
(
c
in
contacts
)
{
for
(
c
in
contacts
)
{
if
(
c
.
author
.
name
.
lowercase
().
contains
(
searchValue
.
lowercase
())
if
(
c
.
author
.
name
.
lowercase
().
contains
(
searchValue
.
lowercase
()))
{
)
{
resultList
.
add
(
c
)
resultList
.
add
(
c
)
}
}
}
}
...
@@ -393,19 +365,11 @@ fun TextBubble(m: SimpleMessage, alignment: Alignment.Horizontal, color: Color)
...
@@ -393,19 +365,11 @@ fun TextBubble(m: SimpleMessage, alignment: Alignment.Horizontal, color: Color)
Row
(
modifier
=
Modifier
.
padding
(
top
=
4
.
dp
))
{
Row
(
modifier
=
Modifier
.
padding
(
top
=
4
.
dp
))
{
Text
(
m
.
time
,
Modifier
.
padding
(
end
=
4
.
dp
),
fontSize
=
10
.
sp
,
color
=
Color
.
LightGray
)
Text
(
m
.
time
,
Modifier
.
padding
(
end
=
4
.
dp
),
fontSize
=
10
.
sp
,
color
=
Color
.
LightGray
)
if
(
m
.
delivered
)
{
if
(
m
.
delivered
)
{
Icon
(
val
modifier
=
Modifier
.
size
(
12
.
dp
).
align
(
Alignment
.
CenterVertically
)
Icons
.
Filled
.
DoneAll
,
Icon
(
Filled
.
DoneAll
,
"sent"
,
modifier
,
Color
.
LightGray
)
"sent"
,
tint
=
Color
.
LightGray
,
modifier
=
Modifier
.
size
(
12
.
dp
).
align
(
Alignment
.
CenterVertically
)
)
}
else
{
}
else
{
Icon
(
val
modifier
=
Modifier
.
size
(
12
.
dp
).
align
(
Alignment
.
CenterVertically
)
Icons
.
Filled
.
Schedule
,
Icon
(
Filled
.
Schedule
,
"sending"
,
modifier
,
Color
.
LightGray
)
"sending"
,
tint
=
Color
.
LightGray
,
modifier
=
Modifier
.
size
(
12
.
dp
).
align
(
Alignment
.
CenterVertically
)
)
}
}
}
}
}
}
...
@@ -424,9 +388,7 @@ fun DrawTextBubbles(chat: UiState<Chat>) {
...
@@ -424,9 +388,7 @@ fun DrawTextBubbles(chat: UiState<Chat>) {
reverseLayout
=
true
,
reverseLayout
=
true
,
contentPadding
=
PaddingValues
(
top
=
8
.
dp
,
start
=
8
.
dp
,
end
=
8
.
dp
)
contentPadding
=
PaddingValues
(
top
=
8
.
dp
,
start
=
8
.
dp
,
end
=
8
.
dp
)
)
{
)
{
items
(
chat
.
data
.
messages
)
{
m
->
items
(
chat
.
data
.
messages
)
{
m
->
TextBubble
(
m
)
}
TextBubble
(
m
)
}
}
}
}
}
}
}
...
@@ -466,13 +428,13 @@ fun ContactDropDown(
...
@@ -466,13 +428,13 @@ fun ContactDropDown(
DropdownMenuItem
(
onClick
=
{
connectionMode
=
true
;
isExpanded
(
false
)
})
{
DropdownMenuItem
(
onClick
=
{
connectionMode
=
true
;
isExpanded
(
false
)
})
{
Row
(
Modifier
.
fillMaxWidth
(),
horizontalArrangement
=
Arrangement
.
SpaceBetween
)
{
Row
(
Modifier
.
fillMaxWidth
(),
horizontalArrangement
=
Arrangement
.
SpaceBetween
)
{
Text
(
"Connections"
,
fontSize
=
14
.
sp
,
modifier
=
Modifier
.
align
(
Alignment
.
CenterVertically
))
Text
(
"Connections"
,
fontSize
=
14
.
sp
,
modifier
=
Modifier
.
align
(
Alignment
.
CenterVertically
))
Icon
(
Icons
.
Filled
.
ArrowRight
,
"connections"
,
modifier
=
Modifier
.
align
(
Alignment
.
CenterVertically
))
Icon
(
Filled
.
ArrowRight
,
"connections"
,
modifier
=
Modifier
.
align
(
Alignment
.
CenterVertically
))
}
}
}
}
DropdownMenuItem
(
onClick
=
{
contactMode
=
true
;
isExpanded
(
false
)
})
{
DropdownMenuItem
(
onClick
=
{
contactMode
=
true
;
isExpanded
(
false
)
})
{
Row
(
Modifier
.
fillMaxWidth
(),
horizontalArrangement
=
Arrangement
.
SpaceBetween
)
{
Row
(
Modifier
.
fillMaxWidth
(),
horizontalArrangement
=
Arrangement
.
SpaceBetween
)
{
Text
(
"Contact"
,
fontSize
=
14
.
sp
,
modifier
=
Modifier
.
align
(
Alignment
.
CenterVertically
))
Text
(
"Contact"
,
fontSize
=
14
.
sp
,
modifier
=
Modifier
.
align
(
Alignment
.
CenterVertically
))
Icon
(
Icons
.
Filled
.
ArrowRight
,
"connections"
,
modifier
=
Modifier
.
align
(
Alignment
.
CenterVertically
))
Icon
(
Filled
.
ArrowRight
,
"connections"
,
modifier
=
Modifier
.
align
(
Alignment
.
CenterVertically
))
}
}
}
}
}
}
...
@@ -529,14 +491,8 @@ fun MsgColumnHeader(
...
@@ -529,14 +491,8 @@ fun MsgColumnHeader(
// TODO hook up online indicator logic
// TODO hook up online indicator logic
val
onlineColor
=
if
(
true
)
briarGreen
else
briarBlack
val
onlineColor
=
if
(
true
)
briarGreen
else
briarBlack
withTransform
({
translate
(
left
=
-
6f
,
top
=
12f
)
})
{
withTransform
({
translate
(
left
=
-
6f
,
top
=
12f
)
})
{
drawCircle
(
drawCircle
(
color
=
Color
.
White
,
radius
=
(
size
+
2
.
dp
.
toPx
())
/
2f
)
color
=
Color
.
White
,
drawCircle
(
color
=
onlineColor
,
radius
=
size
/
2f
)
radius
=
(
size
+
2
.
dp
.
toPx
())
/
2f
,
)
drawCircle
(
color
=
onlineColor
,
radius
=
size
/
2f
,
)
}
}
}
}
)
)
...
@@ -551,7 +507,7 @@ fun MsgColumnHeader(
...
@@ -551,7 +507,7 @@ fun MsgColumnHeader(
onClick
=
{
isExpanded
(!
expanded
)
},
onClick
=
{
isExpanded
(!
expanded
)
},
modifier
=
Modifier
.
align
(
Alignment
.
CenterEnd
).
padding
(
end
=
16
.
dp
)
modifier
=
Modifier
.
align
(
Alignment
.
CenterEnd
).
padding
(
end
=
16
.
dp
)
)
{
)
{
Icon
(
Icons
.
Filled
.
MoreVert
,
"contact info"
,
tint
=
Color
.
White
,
modifier
=
Modifier
.
size
(
24
.
dp
))
Icon
(
Filled
.
MoreVert
,
"contact info"
,
tint
=
Color
.
White
,
modifier
=
Modifier
.
size
(
24
.
dp
))
ContactDropDown
(
expanded
,
isExpanded
,
setInfoDrawer
)
ContactDropDown
(
expanded
,
isExpanded
,
setInfoDrawer
)
}
}
Divider
(
color
=
divider
,
thickness
=
1
.
dp
,
modifier
=
Modifier
.
fillMaxWidth
().
align
(
Alignment
.
BottomCenter
))
Divider
(
color
=
divider
,
thickness
=
1
.
dp
,
modifier
=
Modifier
.
fillMaxWidth
().
align
(
Alignment
.
BottomCenter
))
...
@@ -578,19 +534,14 @@ fun MsgInput(contact: Contact) {
...
@@ -578,19 +534,14 @@ fun MsgInput(contact: Contact) {
Modifier
.
padding
(
4
.
dp
).
size
(
32
.
dp
)
Modifier
.
padding
(
4
.
dp
).
size
(
32
.
dp
)
.
background
(
briarBlueMsg
,
CircleShape
),
.
background
(
briarBlueMsg
,
CircleShape
),
)
{
)
{
Icon
(
Icon
(
Filled
.
Add
,
"add attachment"
,
Modifier
.
size
(
24
.
dp
),
Color
.
White
)
Icons
.
Filled
.
Add
,
"add attachment"
,
tint
=
Color
.
White
,
modifier
=
Modifier
.
size
(
24
.
dp
),
)
}
}
},
},
trailingIcon
=
{
trailingIcon
=
{
IconButton
(
IconButton
(
onClick
=
{
},
modifier
=
Modifier
.
padding
(
4
.
dp
).
size
(
32
.
dp
),
onClick
=
{
},
modifier
=
Modifier
.
padding
(
4
.
dp
).
size
(
32
.
dp
),
)
{
)
{
Icon
(
Icons
.
Filled
.
Send
,
"send message"
,
tint
=
briarGreen
,
modifier
=
Modifier
.
size
(
24
.
dp
))
Icon
(
Filled
.
Send
,
"send message"
,
tint
=
briarGreen
,
modifier
=
Modifier
.
size
(
24
.
dp
))
}
}
}
}
)
)
...
@@ -602,13 +553,13 @@ fun ContactDrawerMakeIntro(contact: Contact, contacts: List<Contact>, setInfoDra
...
@@ -602,13 +553,13 @@ fun ContactDrawerMakeIntro(contact: Contact, contacts: List<Contact>, setInfoDra
var
introNextPg
by
remember
{
mutableStateOf
(
false
)
}
var
introNextPg
by
remember
{
mutableStateOf
(
false
)
}
val
(
introContact
,
onCancelSel
)
=
remember
{
mutableStateOf
(
contact
)
}
val
(
introContact
,
onCancelSel
)
=
remember
{
mutableStateOf
(
contact
)
}
if
(!
introNextPg
)
{
if
(!
introNextPg
)
{
Column
()
{
Column
{
Row
(
Modifier
.
fillMaxWidth
().
height
(
HEADER_SIZE
))
{
Row
(
Modifier
.
fillMaxWidth
().
height
(
HEADER_SIZE
))
{
IconButton
(
IconButton
(
onClick
=
{
setInfoDrawer
(
false
)
},
onClick
=
{
setInfoDrawer
(
false
)
},
Modifier
.
padding
(
horizontal
=
11
.
dp
).
size
(
32
.
dp
).
align
(
Alignment
.
CenterVertically
)
Modifier
.
padding
(
horizontal
=
11
.
dp
).
size
(
32
.
dp
).
align
(
Alignment
.
CenterVertically
)
)
{
)
{
Icon
(
Icons
.
Filled
.
Close
,
"close make intro screen"
,
tint
=
Color
.
White
)
Icon
(
Filled
.
Close
,
"close make intro screen"
,
tint
=
Color
.
White
)
}
}
Text
(
Text
(
text
=
"Introduce "
+
contact
.
author
.
name
+
" to:"
,
text
=
"Introduce "
+
contact
.
author
.
name
+
" to:"
,
...
@@ -627,13 +578,13 @@ fun ContactDrawerMakeIntro(contact: Contact, contacts: List<Contact>, setInfoDra
...
@@ -627,13 +578,13 @@ fun ContactDrawerMakeIntro(contact: Contact, contacts: List<Contact>, setInfoDra
}
}
}
}
}
else
{
}
else
{
Column
()
{
Column
{
Row
(
Modifier
.
fillMaxWidth
().
height
(
HEADER_SIZE
))
{
Row
(
Modifier
.
fillMaxWidth
().
height
(
HEADER_SIZE
))
{
IconButton
(
IconButton
(
onClick
=
{
introNextPg
=
false
},
onClick
=
{
introNextPg
=
false
},
Modifier
.
padding
(
horizontal
=
11
.
dp
).
size
(
32
.
dp
).
align
(
Alignment
.
CenterVertically
)
Modifier
.
padding
(
horizontal
=
11
.
dp
).
size
(
32
.
dp
).
align
(
Alignment
.
CenterVertically
)
)
{
)
{
Icon
(
Icons
.
Filled
.
ArrowBack
,
"go back to make intro contact screen"
,
tint
=
Color
.
White
)
Icon
(
Filled
.
ArrowBack
,
"go back to make intro contact screen"
,
tint
=
Color
.
White
)
}
}
Text
(
Text
(
text
=
"Introduce Contacts"
,
text
=
"Introduce Contacts"
,
...
@@ -646,23 +597,13 @@ fun ContactDrawerMakeIntro(contact: Contact, contacts: List<Contact>, setInfoDra
...
@@ -646,23 +597,13 @@ fun ContactDrawerMakeIntro(contact: Contact, contacts: List<Contact>, setInfoDra
Row
(
Modifier
.
fillMaxWidth
().
padding
(
12
.
dp
),
horizontalArrangement
=
Arrangement
.
SpaceAround
)
{
Row
(
Modifier
.
fillMaxWidth
().
padding
(
12
.
dp
),
horizontalArrangement
=
Arrangement
.
SpaceAround
)
{
Column
(
Modifier
.
align
(
Alignment
.
CenterVertically
))
{
Column
(
Modifier
.
align
(
Alignment
.
CenterVertically
))
{
ProfileCircle
(
imageFromResource
(
"images/profile_images/p0.png"
),
40
.
dp
)
ProfileCircle
(
imageFromResource
(
"images/profile_images/p0.png"
),
40
.
dp
)
Text
(
Text
(
contact
.
author
.
name
,
Modifier
.
padding
(
top
=
4
.
dp
),
Color
.
White
,
16
.
sp
)
contact
.
author
.
name
,
color
=
Color
.
White
,
fontSize
=
16
.
sp
,
modifier
=
Modifier
.
padding
(
top
=
4
.
dp
)
)
}
}
Icon
(
Icons
.
Filled
.
SwapHoriz
,
"swap"
,
tint
=
Color
.
White
,
modifier
=
Modifier
.
size
(
48
.
dp
))
Icon
(
Filled
.
SwapHoriz
,
"swap"
,
tint
=
Color
.
White
,
modifier
=
Modifier
.
size
(
48
.
dp
))
Column
(
Modifier
.
align
(
Alignment
.
CenterVertically
))
{
Column
(
Modifier
.
align
(
Alignment
.
CenterVertically
))
{
// TODO Profile pic again
// TODO Profile pic again
ProfileCircle
(
imageFromResource
(
"images/profile_images/p0.png"
),
40
.
dp
)
ProfileCircle
(
imageFromResource
(
"images/profile_images/p0.png"
),
40
.
dp
)
Text
(
Text
(
introContact
.
author
.
name
,
Modifier
.
padding
(
top
=
4
.
dp
),
Color
.
White
,
16
.
sp
)
introContact
.
author
.
name
,
color
=
Color
.
White
,
fontSize
=
16
.
sp
,
modifier
=
Modifier
.
padding
(
top
=
4
.
dp
)
)
}
}
}
}
var
introText
by
remember
{
mutableStateOf
(
TextFieldValue
(
""
))
}
var
introText
by
remember
{
mutableStateOf
(
TextFieldValue
(
""
))
}
...
@@ -693,12 +634,10 @@ fun ContactInfoDrawer(
...
@@ -693,12 +634,10 @@ fun ContactInfoDrawer(
setInfoDrawer
:
(
Boolean
)
->
Unit
,
setInfoDrawer
:
(
Boolean
)
->
Unit
,
drawerState
:
ContactInfoDrawerState
drawerState
:
ContactInfoDrawerState
)
{
)
{
Row
()
{
when
(
drawerState
)
{
when
(
drawerState
)
{
ContactInfoDrawerState
.
MakeIntro
->
ContactDrawerMakeIntro
(
contact
,
contacts
,
setInfoDrawer
)
ContactInfoDrawerState
.
MakeIntro
->
ContactDrawerMakeIntro
(
contact
,
contacts
,
setInfoDrawer
)
}
}
}
}
}
@Composable
@Composable
fun
DrawMessageRow
(
fun
DrawMessageRow
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment