|
|
@@ -2054,63 +2054,49 @@ export struct LocalMusic {
|
|
|
content: "按艺术家升序"
|
|
|
})
|
|
|
.onClick(async () => {
|
|
|
- this.doSortType(0)
|
|
|
- PreferencesUtil.put(SettingPage.SORT_TYPE, 0)
|
|
|
- this.updateListData(this.videoLocalList, true)
|
|
|
+ await this.doSortType(0)
|
|
|
})
|
|
|
MenuItem({
|
|
|
symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.text_and_arrow_down')),
|
|
|
content: "按艺术家降序"
|
|
|
})
|
|
|
.onClick(async () => {
|
|
|
- this.doSortType(1)
|
|
|
- PreferencesUtil.put(SettingPage.SORT_TYPE, 1)
|
|
|
- this.updateListData(this.videoLocalList, true)
|
|
|
+ await this.doSortType(1)
|
|
|
})
|
|
|
MenuItem({
|
|
|
symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.textformat_size_square')),
|
|
|
content: "按专辑升序"
|
|
|
})
|
|
|
.onClick(async () => {
|
|
|
- this.doSortType(2)
|
|
|
- PreferencesUtil.put(SettingPage.SORT_TYPE, 2)
|
|
|
- this.updateListData(this.videoLocalList, true)
|
|
|
+ await this.doSortType(2)
|
|
|
})
|
|
|
MenuItem({
|
|
|
symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.character_arrow_clockwise')),
|
|
|
content: "按专辑降序"
|
|
|
})
|
|
|
.onClick(async () => {
|
|
|
- this.doSortType(3)
|
|
|
- PreferencesUtil.put(SettingPage.SORT_TYPE, 3)
|
|
|
- this.updateListData(this.videoLocalList, true)
|
|
|
+ await this.doSortType(3)
|
|
|
})
|
|
|
MenuItem({
|
|
|
symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.text_and_arrow_up')),
|
|
|
content: $r('app.string.sort_by_name')
|
|
|
})
|
|
|
.onClick(async () => {
|
|
|
- this.doSortType(4)
|
|
|
- PreferencesUtil.put(SettingPage.SORT_TYPE, 4)
|
|
|
- this.updateListData(this.videoLocalList, true)
|
|
|
+ await this.doSortType(4)
|
|
|
})
|
|
|
MenuItem({
|
|
|
symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.text_and_arrow_down')),
|
|
|
content: '按名称降序'
|
|
|
})
|
|
|
.onClick(async () => {
|
|
|
- this.doSortType(5)
|
|
|
- PreferencesUtil.put(SettingPage.SORT_TYPE, 5)
|
|
|
- this.updateListData(this.videoLocalList, true)
|
|
|
+ await this.doSortType(5)
|
|
|
})
|
|
|
MenuItem({
|
|
|
symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.clock')),
|
|
|
content: $r('app.string.sort_by_time')
|
|
|
})
|
|
|
.onClick(async () => {
|
|
|
- this.doSortType(6)
|
|
|
- PreferencesUtil.put(SettingPage.SORT_TYPE, 6)
|
|
|
- this.updateListData(this.videoLocalList, true)
|
|
|
+ await this.doSortType(6)
|
|
|
})
|
|
|
|
|
|
MenuItem({
|
|
|
@@ -2118,9 +2104,7 @@ export struct LocalMusic {
|
|
|
content: '按添加时间降序'
|
|
|
})
|
|
|
.onClick(async () => {
|
|
|
- this.doSortType(7)
|
|
|
- PreferencesUtil.put(SettingPage.SORT_TYPE, 7)
|
|
|
- this.updateListData(this.videoLocalList, true)
|
|
|
+ await this.doSortType(7)
|
|
|
})
|
|
|
}.attributeModifier(new MenuModifier())
|
|
|
}
|
|
|
@@ -2134,25 +2118,21 @@ export struct LocalMusic {
|
|
|
content: $r('app.string.sort_by_name')
|
|
|
})
|
|
|
.onClick(async () => {
|
|
|
- this.doSortType(4)
|
|
|
- // PreferencesUtil.put(SettingPage.SORT_TYPE, 2)
|
|
|
- this.updateListData(this.videoLocalList, true)
|
|
|
+ await this.doSortType(4)
|
|
|
})
|
|
|
MenuItem({
|
|
|
symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.text_and_arrow_down')),
|
|
|
content: '按名称降序'
|
|
|
})
|
|
|
.onClick(async () => {
|
|
|
- this.doSortType(5)
|
|
|
- this.updateListData(this.videoLocalList, true)
|
|
|
+ await this.doSortType(5)
|
|
|
})
|
|
|
MenuItem({
|
|
|
symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.clock')),
|
|
|
content: '按数量升序'
|
|
|
})
|
|
|
.onClick(async () => {
|
|
|
- this.doSortType(8)
|
|
|
- this.updateListData(this.videoLocalList, true)
|
|
|
+ await this.doSortType(8)
|
|
|
})
|
|
|
|
|
|
MenuItem({
|
|
|
@@ -2160,8 +2140,7 @@ export struct LocalMusic {
|
|
|
content: '按数量降序'
|
|
|
})
|
|
|
.onClick(async () => {
|
|
|
- this.doSortType(9)
|
|
|
- this.updateListData(this.videoLocalList, true)
|
|
|
+ await this.doSortType(9)
|
|
|
})
|
|
|
}.attributeModifier(new MenuModifier())
|
|
|
}
|