Browse Source

neon: Remove broken check for app support

pull/49/head
jld3103 2 years ago
parent
commit
6d7f509d65
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 54
      packages/neon/lib/src/pages/home/home.dart

54
packages/neon/lib/src/pages/home/home.dart

@ -508,38 +508,36 @@ class _HomePageState extends State<HomePage> with tray.TrayListener, WindowListe
), ),
if (appsData != null) ...[ if (appsData != null) ...[
for (final appImplementation in appsData) ...[ for (final appImplementation in appsData) ...[
if (appsData.map((final a) => a.id).contains(appImplementation.id)) ...[ ListTile(
ListTile( key: Key('app-${appImplementation.id}'),
key: Key('app-${appImplementation.id}'), title: StreamBuilder<int>(
title: StreamBuilder<int>( stream: appImplementation.getUnreadCounter(_appsBloc) ??
stream: appImplementation.getUnreadCounter(_appsBloc) ?? BehaviorSubject<int>.seeded(0),
BehaviorSubject<int>.seeded(0), builder: (final context, final unreadCounterSnapshot) => Row(
builder: (final context, final unreadCounterSnapshot) => Row( mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
children: [ Text(appImplementation.name(context)),
Text(appImplementation.name(context)), if (unreadCounterSnapshot.hasData &&
if (unreadCounterSnapshot.hasData && unreadCounterSnapshot.data! > 0) ...[
unreadCounterSnapshot.data! > 0) ...[ Text(
Text( unreadCounterSnapshot.data!.toString(),
unreadCounterSnapshot.data!.toString(), style: TextStyle(
style: TextStyle( color: Theme.of(context).colorScheme.primary,
color: Theme.of(context).colorScheme.primary, fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, fontSize: 14,
fontSize: 14,
),
), ),
], ),
], ],
), ],
), ),
leading: appImplementation.buildIcon(context),
minLeadingWidth: 0,
onTap: () {
_appsBloc.setActiveApp(appImplementation.id);
Navigator.of(context).pop();
},
), ),
], leading: appImplementation.buildIcon(context),
minLeadingWidth: 0,
onTap: () {
_appsBloc.setActiveApp(appImplementation.id);
Navigator.of(context).pop();
},
),
], ],
], ],
], ],

Loading…
Cancel
Save