-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
News aggregator module #345
base: null_safety
Are you sure you want to change the base?
Conversation
…ion. In testing on compatibility with the quarry.
# Conflicts: # pubspec.lock
…ion. In testing on compatibility with the quarry.
# Conflicts: # pubspec.lock
# Conflicts: # lib/authentication/service/auth_provider.dart # lib/pages/home/home_page.dart # pubspec.lock
# Conflicts: # lib/authentication/service/auth_provider.dart # lib/pages/faq/service/question_provider.dart # lib/pages/home/home_page.dart # lib/pages/people/service/person_provider.dart # lib/pages/portal/service/website_provider.dart # pubspec.lock
# Conflicts: # lib/pages/people/model/person.dart
return true; | ||
} | ||
//computes the intersection between the item's relevance and the user's classes | ||
//if the intersection is empty, the item is not relevant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a space between "//" and the actual comment |
return _currentUser.bookmarkedNews.contains(newsItemGuid); | ||
} | ||
|
||
void _errorHandler(final dynamic e, {bool showToast = true}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer final for parameter declarations if they are not reassigned |
'title': postTitleController.text, | ||
'body': postBodyController.text, | ||
'relevance': relevanceController.customRelevance ?? | ||
[], //relevance is either specific, or by default for anyone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a space between "//" and the actual comment |
fitContent: false, | ||
onTapLink: (final text, final link, final title) => | ||
Utils.launchURL(link), | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use block comments |
@@ -0,0 +1,183 @@ | |||
import 'package:flutter/material.dart'; | |||
import 'package:googleapis/servicecontrol/v2.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: 'package:googleapis/servicecontrol/v2.dart' |
@@ -6,64 +6,106 @@ import '../../../generated/l10n.dart'; | |||
import '../../../widgets/scaffold.dart'; | |||
import '../../../widgets/toast.dart'; | |||
import '../service/admin_provider.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: '../service/admin_provider.dart' |
import 'request_card.dart'; | ||
import 'admin_page_admin_requests.dart'; | ||
import 'admin_page_roles_requests.dart'; | ||
import 'admin_request_card.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: 'admin_request_card.dart' |
|
||
/* | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use block comments |
@@ -0,0 +1,195 @@ | |||
import 'package:flutter/material.dart'; | |||
import 'package:flutter/services.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import of 'package:flutter/services.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart' |
@@ -0,0 +1,195 @@ | |||
import 'package:flutter/material.dart'; | |||
import 'package:flutter/services.dart'; | |||
import 'package:googleapis/servicecontrol/v2.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: 'package:googleapis/servicecontrol/v2.dart' |
import '../../../authentication/model/user.dart'; | ||
import '../../../authentication/service/auth_provider.dart'; | ||
import '../../../generated/l10n.dart'; | ||
import '../../../resources/utils.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: '../../../resources/utils.dart' |
import '../../../widgets/dialog.dart'; | ||
import '../../../widgets/scaffold.dart'; | ||
import '../../../widgets/toast.dart'; | ||
import '../../filter/view/filter_dropdown.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: '../../filter/view/filter_dropdown.dart' |
} | ||
} | ||
|
||
AppDialog _requestAlreadyExistsDialog(final BuildContext context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The declaration '_requestAlreadyExistsDialog' isn't referenced |
@@ -48,10 +48,18 @@ class Utils { | |||
static const String corsProxyUrl = 'https://cors-anywhere.herokuapp.com'; | |||
|
|||
static Future<void> launchURL(final String url) async { | |||
if (await canLaunch(url)) { | |||
/* if (await canLaunch(url)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use block comments |
@@ -1,64 +1,256 @@ | |||
import 'package:flutter/material.dart'; | |||
import 'package:flutter_markdown/flutter_markdown.dart'; | |||
import 'package:intl/intl.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: 'package:intl/intl.dart' |
import 'package:cloud_firestore/cloud_firestore.dart'; | ||
|
||
import '../../../generated/l10n.dart'; | ||
import '../../../resources/utils.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: '../../../resources/utils.dart' |
If this is a trivial change that doesn't warrant a test or changelog entry, you can mark it as #trivial in the PR title. Generated by 🚫 Danger |
|
||
import '../../../widgets/error_page.dart'; | ||
import '../service/admin_provider.dart'; | ||
import 'admin_request_card.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: 'admin_request_card.dart' |
fitContent: false, | ||
onTapLink: (final text, final link, final title) => | ||
Utils.launchURL(link), | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use block comments |
fitContent: false, | ||
onTapLink: (final text, final link, final title) => | ||
Utils.launchURL(link), | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use block comments |
@@ -0,0 +1,143 @@ | |||
import 'package:flutter/material.dart'; | |||
import 'package:oktoast/oktoast.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: 'package:oktoast/oktoast.dart' |
@@ -0,0 +1,247 @@ | |||
import 'package:flutter/material.dart'; | |||
import 'package:googleapis/servicecontrol/v2.dart'; | |||
import 'package:oktoast/oktoast.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import: 'package:oktoast/oktoast.dart' |
with TickerProviderStateMixin { | ||
int currentEditorTab = 0; | ||
int currentUserTab = 0; | ||
//List<Widget> tabs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a space between "//" and the actual comment |
]; | ||
} | ||
|
||
Widget getAnonymousTab(final NewsProvider newsProvider) => NewsFeedPage( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter 'newsFeedCategory' is required |
if (mounted) { | ||
final authProvider = | ||
Provider.of<AuthProvider>(context, listen: false); | ||
bool queryResult = await requestProvider.makeRequest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer final for variable declarations if they are not reassigned |
No description provided.