Merge branch 'main' of git.kittycat.homes:zoe/loris

This commit is contained in:
zoe 2022-09-05 23:32:02 +02:00
commit 1f557d5734
2 changed files with 27 additions and 2 deletions

View File

@ -204,7 +204,10 @@ class _ProfileViewState extends State<ProfileView> {
if (index == 0) {
return profileViewDisplay;
} else if (index > 0 && index <= threads.length) {
return Thread(model: threads[index - 1]);
return Thread(
model: threads[index - 1],
constrained: false,
);
}
return const LoadingBox();

View File

@ -5,8 +5,13 @@ import '../business_logic/timeline/timeline.dart' as logic;
import '../global.dart' as global;
class Thread extends StatefulWidget {
const Thread({required this.model, Key? key}) : super(key: key);
const Thread({
required this.model,
Key? key,
this.constrained = true,
}) : super(key: key);
final logic.ThreadModel model;
final bool constrained;
@override
State<Thread> createState() => _ThreadState();
@ -72,6 +77,23 @@ class _ThreadState extends State<Thread> {
);
}
if (!widget.constrained) {
return Padding(
padding: const EdgeInsets.all(4),
child: Container(
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
border: Border.all(color: Theme.of(context).colorScheme.secondary),
borderRadius: BorderRadius.circular(8),
),
child: Column(
children: c,
),
),
);
}
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [