Skip to content

Commit

Permalink
newer emails should appear at the top of the screen
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderEpolite committed Dec 28, 2022
1 parent a06ee18 commit a66b084
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion screens/EmailAddressScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export default function EmailScreen() {
}}/>
</View>
<Text style={styles.hidden}>
{CoolStorage.emailRefresh + "a"}
{CoolStorage.emailRefresh}
</Text>
<View style={styles.ad}>
<AdMobBanner
Expand Down
5 changes: 4 additions & 1 deletion screens/EmailScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,14 @@ export default function EmailScreen() {

const local = CoolStorage.language;

//reverse the emails so that the newest emails are at the top
const displayEmails = emails.reverse();

return (
<View style={styles.container}>
<StatusBar style="light" />
<Text style={styles.tapHelper}>{local.email_screen.prompt}</Text>
<FlatList data={emails} renderItem={({item, index}) => {
<FlatList data={displayEmails} renderItem={({item, index}) => {
return createEmailElement(item, index % 2 === 0);
}}/>
<View style={styles.ad}>
Expand Down

0 comments on commit a66b084

Please sign in to comment.