-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.7.3 - New tab showing played games history (#146)
* progress on play history page * progress on grouping and UI of the play history page * updating UI of the play history item * fixing an issue with null reference when removing bgg games * ensuring that play history updates when playthroughs updated * adding empty state to the play history page
- Loading branch information
Showing
56 changed files
with
2,238 additions
and
425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,16 @@ class AppText { | |
|
||
static const goBack = 'Go Back'; | ||
|
||
static const today = 'today'; | ||
static const yesteday = 'yesterday'; | ||
static const dayBeforeYesteday = 'day before yesterday'; | ||
static const daysAgoFormat = '%s days ago'; | ||
|
||
static const homePageGamesTabTitle = 'Games'; | ||
static const homePageSearchTabTitle = 'Search'; | ||
static const homePageGamesHistoryTabTitle = 'Play History'; | ||
static const homePageGamesPlayersTabTitle = 'Players'; | ||
|
||
static const aboutPageAuthorSectionTitle = 'Author'; | ||
static const aboutPageDesignAndArtSectionTitle = 'Design & Art'; | ||
static const aboutPageContentAndDataSectionTitle = 'Content & Data'; | ||
|
@@ -172,6 +182,11 @@ class AppText { | |
static const settingsPageRestoreFailedMessage = | ||
'Unfortunately we ran into a problem with restoring your data. Please try again or contact support at [email protected]'; | ||
|
||
static const playHistoryPageEmptyTitle = "You haven't played any games yet"; | ||
static const playHistoryPageEmptyTextPartOne = 'Nothing to worry about though! '; | ||
static const playHistoryPageEmptyTextPartTwo = | ||
'Start recording your plays in the app and this screen will automatically populate with a history of your playthroughs.'; | ||
|
||
static const gamePlaytimeFormat = '%s min'; | ||
static const gamePlayersSingularFormat = '%i players'; | ||
static const gamePlayersPluralFormat = '%i players'; | ||
|
@@ -181,6 +196,7 @@ class AppText { | |
static const collectionsPageTitle = 'Collections'; | ||
static const settingsPageTitle = 'Settings'; | ||
static const newPlayerPageTitle = 'New Player'; | ||
static const playHistoryPageTitle = 'Play History'; | ||
|
||
static const drawerVersionFormat = 'Version %s'; | ||
static const drawerReleaseNotes = 'Release notes'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
board_games_companion/lib/extensions/player_score_extensions.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import '../common/enums/game_winning_condition.dart'; | ||
import '../extensions/scores_extensions.dart'; | ||
import '../models/player_score.dart'; | ||
|
||
extension PlayerScoresExtesions on List<PlayerScore> { | ||
List<PlayerScore> sortByScore(GameWinningCondition winningCondition) { | ||
return this | ||
..sort((PlayerScore playerScore, PlayerScore otherPlayerScore) { | ||
return compareScores(playerScore.score, otherPlayerScore.score, winningCondition); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.