Skip to content

Commit

Permalink
Added refresh button
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolONEOfficial committed Jan 27, 2019
1 parent 251314d commit 1d753ed
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 4 deletions.
7 changes: 6 additions & 1 deletion lib/l10n/intl_messages.arb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@@last_modified": "2019-01-23T00:16:40.239734",
"@@last_modified": "2019-01-27T22:02:54.164138",
"title": "RANEPA (Timetable)",
"@title": {
"type": "text",
Expand Down Expand Up @@ -50,6 +50,11 @@
"type": "text",
"placeholders": {}
},
"refreshTip": "Refresh shedule",
"@refreshTip": {
"type": "text",
"placeholders": {}
},
"alarmTip": "Add to alarm clock",
"@alarmTip": {
"type": "text",
Expand Down
5 changes: 5 additions & 0 deletions lib/l10n/intl_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
"type": "text",
"placeholders": {}
},
"refreshTip": "Обновить расписание",
"@refreshTip": {
"type": "text",
"placeholders": {}
},
"alarmTip": "Добавить в будильник",
"@alarmTip": {
"type": "text",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/messages_messages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class MessageLookup extends MessageLookupByLibrary {
"prefs" : MessageLookupByLibrary.simpleMessage("Preferences"),
"projectDevelopment" : MessageLookupByLibrary.simpleMessage("Project Development"),
"receptionExamination" : MessageLookupByLibrary.simpleMessage("Reception examination"),
"refreshTip" : MessageLookupByLibrary.simpleMessage("Refresh shedule"),
"roomLocationAcademy" : MessageLookupByLibrary.simpleMessage("Academy"),
"roomLocationHotel" : MessageLookupByLibrary.simpleMessage("Hotel (St. Pushkin, 8)"),
"roomLocationStudyHostel" : MessageLookupByLibrary.simpleMessage("Study hostel"),
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/messages_ru.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class MessageLookup extends MessageLookupByLibrary {
"prefs" : MessageLookupByLibrary.simpleMessage("Настройки"),
"projectDevelopment" : MessageLookupByLibrary.simpleMessage("Проектная разработка"),
"receptionExamination" : MessageLookupByLibrary.simpleMessage("Прием защиты"),
"refreshTip" : MessageLookupByLibrary.simpleMessage("Обновить расписание"),
"roomLocationAcademy" : MessageLookupByLibrary.simpleMessage("Академия"),
"roomLocationHotel" : MessageLookupByLibrary.simpleMessage("Гостиница (ул. Пушкина, 8)"),
"roomLocationStudyHostel" : MessageLookupByLibrary.simpleMessage("Студенческое общежитие"),
Expand Down
9 changes: 8 additions & 1 deletion lib/localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class AppLocalizations {
);
}

// Search strings
// Toolbar tips

String get searchTip {
return Intl.message(
Expand All @@ -105,6 +105,13 @@ class AppLocalizations {
);
}

String get refreshTip {
return Intl.message(
'Refresh shedule',
name: 'refreshTip',
);
}

String get alarmTip {
return Intl.message(
'Add to alarm clock',
Expand Down
12 changes: 10 additions & 2 deletions lib/timetable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,15 @@ class Timetable extends StatelessWidget {
)
]
: List<Widget>())
..add(
..addAll(<Widget>[
IconButton(
tooltip: AppLocalizations.of(context).refreshTip,
icon: const Icon(Icons.refresh),
onPressed: () async {
await PlatformChannels.deleteDb();
timetableIdBloc.add(ssSearchItem.data);
},
),
IconButton(
tooltip: AppLocalizations.of(context).searchTip,
icon: const Icon(Icons.search),
Expand All @@ -491,7 +499,7 @@ class Timetable extends StatelessWidget {
primary: false,
),
),
),
]),
bottom: TabBar(
tabs: tabs,
),
Expand Down

0 comments on commit 1d753ed

Please sign in to comment.