mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-19 10:39:26 +01:00
Merge branch 'rizzek/fix-applock-on-landscape-issue589' into 'main'
Fix Blank LockScreen on wide screen dimensions Closes #589 See merge request famedly/fluffychat!609
This commit is contained in:
commit
8e4ca84415
@ -10,7 +10,14 @@ import 'package:fluffychat/widgets/matrix.dart';
|
||||
class OnePageCard extends StatelessWidget {
|
||||
final Widget child;
|
||||
|
||||
const OnePageCard({Key? key, required this.child}) : super(key: key);
|
||||
/// This will cause the "isLogged()" check to be skipped and force a
|
||||
/// OnePageCard without login wallpaper. This can be used in situations where
|
||||
/// "Matrix.of(context) is not yet available, e.g. in the LockScreen widget.
|
||||
final bool forceBackgroundless;
|
||||
|
||||
const OnePageCard(
|
||||
{Key? key, required this.child, this.forceBackgroundless = false})
|
||||
: super(key: key);
|
||||
|
||||
static const int alpha = 12;
|
||||
static num breakpoint = FluffyThemes.columnWidth * 2;
|
||||
@ -19,6 +26,7 @@ class OnePageCard extends StatelessWidget {
|
||||
final horizontalPadding =
|
||||
max<double>((MediaQuery.of(context).size.width - 600) / 2, 24);
|
||||
return MediaQuery.of(context).size.width <= breakpoint ||
|
||||
forceBackgroundless ||
|
||||
Matrix.of(context).client.isLogged()
|
||||
? child
|
||||
: Container(
|
||||
|
@ -30,6 +30,7 @@ class _LockScreenState extends State<LockScreen> {
|
||||
supportedLocales: L10n.supportedLocales,
|
||||
home: Builder(
|
||||
builder: (context) => OnePageCard(
|
||||
forceBackgroundless: true,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
|
Loading…
Reference in New Issue
Block a user