Skip to content

Commit 4dd9f4b

Browse files
committed
default to newest first and improve variable name
1 parent cee9dc7 commit 4dd9f4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

electron_app/src/components/History.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<template>
33
<div class="animatable_content_box ">
44
<div @click="toggle_order()" style="float:right; margin-bottom: 20px;" class="l_button">
5-
{{this.app_state.show_history_in_reverse ? "Newest" : "Oldest"}} First
5+
{{this.app_state.show_history_in_oldest_first ? "Oldest": "Newest"}} First
66
</div>
77
<div v-if="Object.values(app_state.history).length > 0">
88
<div v-for="history_box in get_history()" :key="history_box.key" style="clear: both;">
@@ -68,11 +68,11 @@ export default {
6868
6969
get_history() {
7070
let history = Object.values(this.app_state.history);
71-
return this.app_state.show_history_in_reverse ? history.reverse() : history;
71+
return this.app_state.show_history_in_oldest_first ? history : history.reverse();
7272
},
7373
7474
toggle_order() {
75-
Vue.set( this.app_state, "show_history_in_reverse", !this.app_state.show_history_in_reverse);
75+
Vue.set( this.app_state, "show_history_in_oldest_first", !this.app_state.show_history_in_oldest_first);
7676
},
7777
7878
get_box_params_str(box){

0 commit comments

Comments
 (0)