Skip to content
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

Open
wants to merge 141 commits into
base: null_safety
Choose a base branch
from
Open

Conversation

stefanp0pa
Copy link
Contributor

No description provided.

IoanaAlexandru and others added 30 commits December 20, 2020 14:01
…ion. In testing on compatibility with the quarry.
…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
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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}) {
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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),
/*
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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';
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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';
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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';
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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'


/*
/*
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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';
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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';
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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';
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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';
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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) {
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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)) {
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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';
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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';
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 22, 2022

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'

@acs-upb-mobile-bot
Copy link
Member

acs-upb-mobile-bot commented Jun 22, 2022

7 Warnings
⚠️ Big PR
⚠️ Please provide a summary in the Pull Request description
⚠️ No test changes detected. You should usually add at least one test for any new functionality.
⚠️ lib/pages/home/news_feed_card.dart#L6 - Unused import: '../../resources/utils.dart'
⚠️ lib/pages/settings/service/request_provider.dart#L6 - Unused import: '../../../resources/utils.dart'
⚠️ lib/pages/settings/view/admin_page.dart#L3 - Unused import: 'package:provider/provider.dart'
⚠️ lib/pages/settings/view/request_permissions.dart#L35 - The declaration '_requestAlreadyExistsDialog' isn't referenced

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';
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jun 24, 2022

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),
/*
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Jul 2, 2022

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),
/*
Copy link
Member

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';
Copy link
Member

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';
Copy link
Member

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;
Copy link
Member

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(
Copy link
Member

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(
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants