mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 13:08:42 +00:00
fix #87
This commit is contained in:
parent
f485366719
commit
6abfecb4f3
5 changed files with 248 additions and 217 deletions
|
|
@ -107,10 +107,13 @@ class UserCheckbox extends StatelessWidget {
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 0),
|
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 0),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
color: Theme.of(context).colorScheme.outline.withAlpha(50),
|
||||||
color: Theme.of(context).colorScheme.outline,
|
boxShadow: [
|
||||||
width: 1.0,
|
BoxShadow(
|
||||||
|
blurRadius: 10.9,
|
||||||
|
color: Color.fromRGBO(0, 0, 0, 0.1),
|
||||||
),
|
),
|
||||||
|
],
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|
@ -157,6 +160,15 @@ class UserCheckbox extends StatelessWidget {
|
||||||
Expanded(child: Container()),
|
Expanded(child: Container()),
|
||||||
Checkbox(
|
Checkbox(
|
||||||
value: isChecked,
|
value: isChecked,
|
||||||
|
side: WidgetStateBorderSide.resolveWith(
|
||||||
|
(Set states) {
|
||||||
|
if (states.contains(WidgetState.selected)) {
|
||||||
|
return BorderSide(width: 0);
|
||||||
|
}
|
||||||
|
return BorderSide(
|
||||||
|
width: 1, color: Theme.of(context).colorScheme.outline);
|
||||||
|
},
|
||||||
|
),
|
||||||
onChanged: (bool? value) {
|
onChanged: (bool? value) {
|
||||||
onChanged(user.userId, value ?? false);
|
onChanged(user.userId, value ?? false);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,9 @@ class _ShareImageView extends State<ShareImageView> {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(context.lang.shareImageTitle),
|
title: Text(context.lang.shareImageTitle),
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: SafeArea(
|
||||||
padding: EdgeInsets.only(bottom: 20, left: 10, top: 20, right: 10),
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(bottom: 40, left: 10, top: 20, right: 10),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
|
|
@ -198,6 +199,7 @@ class _ShareImageView extends State<ShareImageView> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
floatingActionButton: SizedBox(
|
floatingActionButton: SizedBox(
|
||||||
height: 120,
|
height: 120,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
@ -274,8 +276,8 @@ class UserList extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// Step 1: Sort the users alphabetically
|
// Step 1: Sort the users alphabetically
|
||||||
users.sort(
|
users
|
||||||
(a, b) => getContactDisplayName(a).compareTo(getContactDisplayName(b)));
|
.sort((a, b) => a.lastMessageExchange.compareTo(b.lastMessageExchange));
|
||||||
|
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
restorationId: 'new_message_users_list',
|
restorationId: 'new_message_users_list',
|
||||||
|
|
@ -309,6 +311,15 @@ class UserList extends StatelessWidget {
|
||||||
),
|
),
|
||||||
trailing: Checkbox(
|
trailing: Checkbox(
|
||||||
value: selectedUserIds.contains(user.userId),
|
value: selectedUserIds.contains(user.userId),
|
||||||
|
side: WidgetStateBorderSide.resolveWith(
|
||||||
|
(Set states) {
|
||||||
|
if (states.contains(WidgetState.selected)) {
|
||||||
|
return BorderSide(width: 0);
|
||||||
|
}
|
||||||
|
return BorderSide(
|
||||||
|
width: 1, color: Theme.of(context).colorScheme.outline);
|
||||||
|
},
|
||||||
|
),
|
||||||
onChanged: (bool? value) {
|
onChanged: (bool? value) {
|
||||||
if (value == null) return;
|
if (value == null) return;
|
||||||
updateStatus(user.userId, value);
|
updateStatus(user.userId, value);
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,8 @@ class _ChatItemDetailsViewState extends State<ChatItemDetailsView> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: Column(
|
body: SafeArea(
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
|
|
@ -275,8 +276,8 @@ class _ChatItemDetailsViewState extends State<ChatItemDetailsView> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsets.only(
|
||||||
const EdgeInsets.only(bottom: 30, left: 20, right: 20, top: 10),
|
bottom: 30, left: 20, right: 20, top: 10),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|
@ -310,7 +311,8 @@ class _ChatItemDetailsViewState extends State<ChatItemDetailsView> {
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
20.0), // Same radius for enabled border
|
20.0), // Same radius for enabled border
|
||||||
borderSide: BorderSide(color: Colors.grey, width: 2.0),
|
borderSide:
|
||||||
|
BorderSide(color: Colors.grey, width: 2.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -330,7 +332,8 @@ class _ChatItemDetailsViewState extends State<ChatItemDetailsView> {
|
||||||
.read<SendNextMediaTo>()
|
.read<SendNextMediaTo>()
|
||||||
.updateSendNextMediaTo(widget.userid);
|
.updateSendNextMediaTo(widget.userid);
|
||||||
globalUpdateOfHomeViewPageIndex(0);
|
globalUpdateOfHomeViewPageIndex(0);
|
||||||
Navigator.popUntil(context, (route) => route.isFirst);
|
Navigator.popUntil(
|
||||||
|
context, (route) => route.isFirst);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
@ -338,6 +341,7 @@ class _ChatItemDetailsViewState extends State<ChatItemDetailsView> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,8 @@ class _SearchUsernameView extends State<SearchUsernameView> {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(context.lang.searchUsernameTitle),
|
title: Text(context.lang.searchUsernameTitle),
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: SafeArea(
|
||||||
|
child: Padding(
|
||||||
padding: EdgeInsets.only(bottom: 20, left: 10, top: 20, right: 10),
|
padding: EdgeInsets.only(bottom: 20, left: 10, top: 20, right: 10),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -151,6 +152,7 @@ class _SearchUsernameView extends State<SearchUsernameView> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
floatingActionButton: Padding(
|
floatingActionButton: Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 30.0),
|
padding: const EdgeInsets.only(bottom: 30.0),
|
||||||
child: FloatingActionButton(
|
child: FloatingActionButton(
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@ class DiagnosticsView extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return FutureBuilder<String>(
|
return SafeArea(
|
||||||
|
child: FutureBuilder<String>(
|
||||||
future: _loadLogFile(),
|
future: _loadLogFile(),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||||
|
|
@ -70,6 +71,7 @@ class DiagnosticsView extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue