From cb358bf2dfcbe73e3b3d6be532ab4dff6f33fb69 Mon Sep 17 00:00:00 2001 From: embeddedc <> Date: Tue, 16 Aug 2022 17:59:06 +0200 Subject: [PATCH] Add sorting button --- .../sortingImage.imageset/Contents.json | 18 ++++++++++++++++ .../sortingImage.imageset/sortingImage@1.png | Bin 0 -> 2307 bytes .../sortingImage.imageset/sortingImage@2.png | Bin 0 -> 2649 bytes .../VLCOpenNetworkStreamTVViewController.h | 2 ++ .../VLCOpenNetworkStreamTVViewController.m | 16 ++++++++++++++ .../VLCOpenNetworkStreamTVViewController.xib | 20 +++++++++++++++--- Resources/de.lproj/Localizable.strings | 1 + Resources/en.lproj/Localizable.strings | 1 + 8 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 Apple-TV/Assets.xcassets/sortingImage.imageset/Contents.json create mode 100644 Apple-TV/Assets.xcassets/sortingImage.imageset/sortingImage@1.png create mode 100644 Apple-TV/Assets.xcassets/sortingImage.imageset/sortingImage@2.png diff --git a/Apple-TV/Assets.xcassets/sortingImage.imageset/Contents.json b/Apple-TV/Assets.xcassets/sortingImage.imageset/Contents.json new file mode 100644 index 0000000000..af6880b721 --- /dev/null +++ b/Apple-TV/Assets.xcassets/sortingImage.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "filename" : "sortingImage@1.png", + "idiom" : "tv", + "scale" : "1x" + }, + { + "filename" : "sortingImage@2.png", + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Apple-TV/Assets.xcassets/sortingImage.imageset/sortingImage@1.png b/Apple-TV/Assets.xcassets/sortingImage.imageset/sortingImage@1.png new file mode 100644 index 0000000000000000000000000000000000000000..0633bf6b0f964cb2b9d7ba0b1905f41b03dd0e29 GIT binary patch literal 2307 zcmai0dt4J&8Xa`i0!7fRNP(5f&{C=Bj3NWc{h$&gGD3rRQ3Bvl~r?m)OTG$E-0=iPSXlwh2$tbHC@E zY>SPFa&hu>0sz1z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ScVxpTC3->;tqM5n)%&pmbe}< z6n#>fHLDcE>GWM9rHuD<=VWAVcE1W#7n=nwNZKL{EYv!9VV zA2;UI23~N=bxH@YH*#x}DZR?8D|R~^2@mSr-!_7B8Uhvuabs@FY58qGP7VLjiE#g~mzPNz5VJ#Ny;@BT|x7bDI zXKSY*A#UHZ{Bl)kZ&!g$@<8n6xfg>cd=;pRJnZQv<#wrIj#X{jz5fb^ciKmK=Pz?$ z4oypZh&yz>%hfhUEAd#pVo`U4wbD9J=W}M}pBbBXNqTDceOswzR?o~!FcI_G6IP=Y zVbk@a#FqY!tMN?Th90s<@2$t>!X+)gM5frb#Zmrh05Td#PTjW~9V9La!@J$X{gW{; Yb#KCpitHjuxA~7Sz(0gl$&A 0) { self.nothingFoundView.hidden = YES; self.emptyListButton.hidden = NO; + self.reverseListSortingButton.hidden = NO; } return count; } @@ -204,6 +209,17 @@ - (void)emptyListAction:(id)sender [self presentViewController:alertController animated:YES completion:nil]; } +- (IBAction)reverseListSortingAction:(id)sender +{ + newestFirst = !newestFirst; + + if (newestFirst) { + self.reverseListSortingButton.transform = CGAffineTransformMakeRotation( M_PI ); + } else { + self.reverseListSortingButton.transform = CGAffineTransformIdentity; + } +} + #pragma mark - editing - (NSIndexPath *)indexPathToDelete diff --git a/Apple-TV/VLCOpenNetworkStreamTVViewController.xib b/Apple-TV/VLCOpenNetworkStreamTVViewController.xib index 32fa966cd1..00d73dac2a 100644 --- a/Apple-TV/VLCOpenNetworkStreamTVViewController.xib +++ b/Apple-TV/VLCOpenNetworkStreamTVViewController.xib @@ -1,22 +1,23 @@ - + - + - + + @@ -83,10 +84,21 @@ + + @@ -94,6 +106,7 @@ + @@ -105,5 +118,6 @@ + diff --git a/Resources/de.lproj/Localizable.strings b/Resources/de.lproj/Localizable.strings index 11691600dc..645847e391 100644 --- a/Resources/de.lproj/Localizable.strings +++ b/Resources/de.lproj/Localizable.strings @@ -66,6 +66,7 @@ "BUTTON_CONTINUE" = "Fortsetzen"; "BUTTON_SET" = "Einstellen"; "BUTTON_RESET" = "Zurücksetzen"; +"BUTTON_REVERSE" = "Sortierung ändern"; "BUTTON_RESCAN" = "Erneut durchsuchen"; "PRIVATE_PLAYBACK_TOGGLE" = "Private Wiedergabe"; "SCAN_SUBTITLE_TOGGLE" = "Untertitelsuche (nur HTTP)"; diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index dce46086f6..eea430dabf 100644 --- a/Resources/en.lproj/Localizable.strings +++ b/Resources/en.lproj/Localizable.strings @@ -66,6 +66,7 @@ "BUTTON_CONTINUE" = "Continue"; "BUTTON_SET" = "Set"; "BUTTON_RESET" = "Reset"; +"BUTTON_REVERSE" = "Reverse sorting order"; "BUTTON_RESCAN" = "Rescan"; "PRIVATE_PLAYBACK_TOGGLE" = "Private Playback"; "SCAN_SUBTITLE_TOGGLE" = "Scan for Subtitles (http-only)";