Skip to content

Commit

Permalink
albums: make sort persistent
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Patil <radialapps@gmail.com>
  • Loading branch information
pulsejet committed Mar 23, 2024
1 parent 250bd3f commit f5aeee2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/Controller/OtherController.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public function getUserConfig(): Http\Response
// album settings
'sort_album_month' => 'true' === $getAppConfig('sortAlbumMonth', 'true'),
'show_hidden_albums' => 'true' === $getAppConfig('showHiddenAlbums', false),
'album_list_sort' => $getAppConfig('album_list_sort', 3),
], Http::STATUS_OK);
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/UserConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { IConfig } from '@typings';

const eventName: keyof utils.BusEvent = 'memories:user-config-changed';

const localSettings: (keyof IConfig)[] = ['square_thumbs', 'high_res_cond', 'show_face_rect', 'album_list_sort'];
const localSettings: (keyof IConfig)[] = ['square_thumbs', 'high_res_cond', 'show_face_rect'];

export default defineComponent({
name: 'UserConfig',
Expand Down
2 changes: 1 addition & 1 deletion src/services/static-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ class StaticConfig {
// album settings
sort_album_month: true,
show_hidden_albums: false,
album_list_sort: ALBUM_SORT_FLAGS.CREATED | ALBUM_SORT_FLAGS.DESCENDING, // also in OtherController.php

// local settings
square_thumbs: false,
high_res_cond: null,
show_face_rect: false,
album_list_sort: ALBUM_SORT_FLAGS.CREATED | ALBUM_SORT_FLAGS.DESCENDING,
};

const set = <K extends keyof IConfig, V extends IConfig[K]>(key: K, value: string | null) => {
Expand Down

0 comments on commit f5aeee2

Please sign in to comment.