diff --git a/app/lib/widgets/source/add/add_source.dart b/app/lib/widgets/source/add/add_source.dart index 4b5625d..37a222f 100644 --- a/app/lib/widgets/source/add/add_source.dart +++ b/app/lib/widgets/source/add/add_source.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:collection/collection.dart'; + import 'package:feeddeck/models/column.dart'; import 'package:feeddeck/models/source.dart'; import 'package:feeddeck/utils/constants.dart'; @@ -39,6 +41,9 @@ class AddSource extends StatefulWidget { } class _AddSourceState extends State { + final List _sourceTypeValues = FDSourceType.values + .whereNot((e) => e == FDSourceType.nitter || e == FDSourceType.none) + .toList(); FDSourceType _sourceType = FDSourceType.none; /// [_buildBody] returns a list of all supported source types when no source @@ -109,14 +114,14 @@ class _AddSourceState extends State { height: Constants.spacingMiddle, ); }, - itemCount: FDSourceType.values.length - 1, + itemCount: _sourceTypeValues.length, itemBuilder: (context, index) { return MouseRegion( cursor: SystemMouseCursors.click, child: GestureDetector( onTap: () { setState(() { - _sourceType = FDSourceType.values[index]; + _sourceType = _sourceTypeValues[index]; }); }, child: Container( @@ -126,7 +131,7 @@ class _AddSourceState extends State { /// If we decide later to use a generic color as background /// the following line can be used: /// color: Constants.secondary, - color: FDSourceType.values[index].bgColor, + color: _sourceTypeValues[index].bgColor, borderRadius: BorderRadius.circular(4), ), child: Column( @@ -134,7 +139,7 @@ class _AddSourceState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ SourceIcon( - type: FDSourceType.values[index], + type: _sourceTypeValues[index], icon: null, size: 48, ), @@ -142,7 +147,7 @@ class _AddSourceState extends State { height: Constants.spacingSmall, ), Text( - FDSourceType.values[index].toLocalizedString(), + _sourceTypeValues[index].toLocalizedString(), style: TextStyle( /// Since we are using the brand color as background /// color, we are using the same color as for the icon @@ -150,7 +155,7 @@ class _AddSourceState extends State { /// to use a generic color as background the following /// line can be used: /// color: Constants.onSecondary, - color: FDSourceType.values[index].fgColor, + color: _sourceTypeValues[index].fgColor, ), ), ], diff --git a/landing/app/page.tsx b/landing/app/page.tsx index 0d4e62a..c936559 100644 --- a/landing/app/page.tsx +++ b/landing/app/page.tsx @@ -71,7 +71,6 @@ export default function Home() { - @@ -311,24 +310,6 @@ const Medium = () => ( ); -const Nitter = () => ( -
- - - - - -
Nitter
-
-); - const Pinterest = () => (
Math.floor(new Date().getTime() / 1000) - (60 * 60 * 24)