Skip to content

Commit

Permalink
#135 - temp change news section to faq previews - pr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolaj-jalocha committed Aug 9, 2024
1 parent 180360a commit 9c568a7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 33 deletions.
6 changes: 3 additions & 3 deletions lib/config/ttl_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ part "ttl_config.g.dart";
enum TtlKey {
/// We need unique key for every data source for its ttl tracking
academicCalendarRepository,
newsRepository,
scienceClubsRepository,
scienceClubDetailsRepository,
tagsRepository,
departmentsRepository,
departmentDetailsRepository,
aboutUsRepository,
buildingsRepository,
guideDetailsRepository
guideDetailsRepository,
guideViewRepository
// ... add a new key here if you create a new repository
}

Expand All @@ -27,7 +27,6 @@ abstract class TtlStrategy {

static const _ttlDurations = UnmodifiableTtlKeyMap(
// TODO(simon-the-shark): specific values are yet ment to be accordingly adjusted.
newsRepository: day,
academicCalendarRepository: day,
scienceClubDetailsRepository: thirtyDays,
scienceClubsRepository: thirtyDays,
Expand All @@ -37,6 +36,7 @@ abstract class TtlStrategy {
aboutUsRepository: thirtyDays,
departmentDetailsRepository: thirtyDays,
guideDetailsRepository: thirtyDays,
guideViewRepository: thirtyDays,
);

static Duration get(TtlKey key) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Stream<List<GuidePosts?>?> guidePostsRepository(
) async* {
final stream = ref.watchQueryWithCache(
_GetGuidePosts(eagerlyFetchResults: true),
TtlKey.guideDetailsRepository,
TtlKey.guideViewRepository,
);
yield* stream.map((event) => event?.FAQ_Types);
}
10 changes: 0 additions & 10 deletions lib/features/home_view/repositories/news/getNews.graphql

This file was deleted.

18 changes: 0 additions & 18 deletions lib/features/home_view/repositories/news/news_repository.dart

This file was deleted.

2 changes: 1 addition & 1 deletion lib/features/offline_messages/messages_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import "../../utils/context_extensions.dart";
extension GqlOfflineMessageX on BuildContext {
UnmodifiableTtlKeyMap<String> _offlineMessagesLocalized() =>
UnmodifiableTtlKeyMap(
newsRepository: localize.offline_news,
academicCalendarRepository: localize.offline_academic_calendar,
scienceClubDetailsRepository: localize.offline_sci_clubs,
scienceClubsRepository: localize.offline_sci_clubs,
Expand All @@ -16,6 +15,7 @@ extension GqlOfflineMessageX on BuildContext {
aboutUsRepository: localize.offline_about_us,
departmentDetailsRepository: localize.offline_department_details,
guideDetailsRepository: localize.offline_guide_details,
guideViewRepository: localize.offline_guide_posts,
);

String gqlOfflineMessageLocalized(TtlKey key) {
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/app_pl.arb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"offline_about_us":"o nas",
"offline_department_details":"wydziału",
"offline_guide_details":"wpisu z przewodnika",
"offline_guide_posts":"wpisów z przewodnika",
"guide": "Przewodnik",
"deans_office" : "Dziekanat",
"fields_of_study" : "Kierunki"
Expand Down

0 comments on commit 9c568a7

Please sign in to comment.