diff --git a/Settings.xm b/Settings.xm index b1ef891..fdb0f37 100644 --- a/Settings.xm +++ b/Settings.xm @@ -98,7 +98,7 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0], - ]; + ]; YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"VIDEO_PLAYER_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; return YES; @@ -217,8 +217,7 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0], - - ]; + ]; YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"VIDEO_CONTROLS_OVERLAY_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; return YES; @@ -297,7 +296,7 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0], - ]; + ]; YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"SHORTS_CONTROLS_OVERLAY_OPTIONS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; return YES; @@ -424,7 +423,22 @@ extern NSBundle *uYouPlusBundle(); return YES; } settingItemId:0], - ]; + ]; + + if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) { + YTSettingsSectionItem *ipadItem = [YTSettingsSectionItemClass switchItemWithTitle:LOC(@"IPHONE_LAYOUT") + titleDescription:LOC(@"IPHONE_LAYOUT_DESC") + accessibilityIdentifier:nil + switchOn:IsEnabled(@"iPhoneLayout_enabled") + switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) { + [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"iPhoneLayout_enabled"]; + return YES; + } + settingItemId:0]; + + rows = [rows arrayByAddingObject:ipadItem]; + } + YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"MISCELLANEOUS") pickerSectionTitle:nil rows:rows selectedItemIndex:NSNotFound parentResponder:[self parentResponder]]; [settingsViewController pushViewController:picker]; return YES; diff --git a/lang/uYouPlus.bundle/ar.lproj/Localizable.strings b/lang/uYouPlus.bundle/ar.lproj/Localizable.strings index 607a1b2..973d8bd 100644 --- a/lang/uYouPlus.bundle/ar.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/ar.lproj/Localizable.strings @@ -120,3 +120,6 @@ "YT_RE_EXPLORE" = "استبدال تبويب Shorts بتبويب Explore (أداة YTReExplore)"; "YT_RE_EXPLORE_DESC" = " تتطلب إغلاق التطبيق وإعادة فتحه."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/cz.lproj/Localizable.strings b/lang/uYouPlus.bundle/cz.lproj/Localizable.strings index ed88ee5..5be67e5 100644 --- a/lang/uYouPlus.bundle/cz.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/cz.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "Je potřeba restart aplikace."; "YT_RE_EXPLORE" = "Nahradit záložku Shorts tab záložkou Explore (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "Je potřeba restart aplikace."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "Je potřeba restart aplikace."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/de.lproj/Localizable.strings b/lang/uYouPlus.bundle/de.lproj/Localizable.strings index 8abc61f..663e8a4 100644 --- a/lang/uYouPlus.bundle/de.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/de.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "App-Neustart erforderlich!"; "YT_RE_EXPLORE" = "Shorts-Tab durch Entdecken-Tab ersetzen (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "App-Neustart erforderlich!"; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "App-Neustart erforderlich!"; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/el.lproj/Localizable.strings b/lang/uYouPlus.bundle/el.lproj/Localizable.strings index 85847ec..ee39853 100644 --- a/lang/uYouPlus.bundle/el.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/el.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "Απαιτείται επανεκκίνηση της εφαρμογής."; "YT_RE_EXPLORE" = "Αντικατάσταση της καρτέλας Shorts με την καρτέλα Explore (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "Απαιτείται επανεκκίνηση της εφαρμογής."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "Απαιτείται επανεκκίνηση της εφαρμογής."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/en.lproj/Localizable.strings b/lang/uYouPlus.bundle/en.lproj/Localizable.strings index 6b44662..14da76a 100644 --- a/lang/uYouPlus.bundle/en.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/en.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "App restart is required."; "YT_RE_EXPLORE" = "Replace Shorts tab with Explore tab (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "App restart is required."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "App restart is required."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/es.lproj/Localizable.strings b/lang/uYouPlus.bundle/es.lproj/Localizable.strings index e809943..41c14a7 100644 --- a/lang/uYouPlus.bundle/es.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/es.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "Requiere reiniciar la app."; "YT_RE_EXPLORE" = "Reemplazar pestaña de Cortos con pestaña de Explorar (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "Requiere reiniciar la app."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "Requiere reiniciar la app."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/fr.lproj/Localizable.strings b/lang/uYouPlus.bundle/fr.lproj/Localizable.strings index 31f43a0..ff1f470 100644 --- a/lang/uYouPlus.bundle/fr.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/fr.lproj/Localizable.strings @@ -120,3 +120,6 @@ "YT_RE_EXPLORE" = "Remplacer l'onglet Shorts par l'onglet Explorer (YTReExplore)"; "YT_RE_EXPLORE_DESC" = "Un redémarrage de l'application est nécessaire"; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/he.lproj/Localizable.strings b/lang/uYouPlus.bundle/he.lproj/Localizable.strings index 234db4c..ff25188 100644 --- a/lang/uYouPlus.bundle/he.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/he.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "נדרש לפתוח מחדש את היישום."; "YT_RE_EXPLORE" = "החלף את לשונית ה-Shorts בלשונית Explore (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "נדרש לפתוח מחדש את היישום."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "נדרש לפתוח מחדש את היישום."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/hu.lproj/Localizable.strings b/lang/uYouPlus.bundle/hu.lproj/Localizable.strings index 1e286b0..912f346 100644 --- a/lang/uYouPlus.bundle/hu.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/hu.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "Az alkalmazás újraindítása szükséges."; "YT_RE_EXPLORE" = "Cserélje le a Shorts fület a Felfedezés fülre (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "Az alkalmazás újraindítása szükséges."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "Az alkalmazás újraindítása szükséges."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/it.lproj/Localizable.strings b/lang/uYouPlus.bundle/it.lproj/Localizable.strings index f425044..1480f88 100644 --- a/lang/uYouPlus.bundle/it.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/it.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "È richiesto un riavvio dell'app."; "YT_RE_EXPLORE" = "Sostituisci il tab Shorts con il tab Esplora (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "È richiesto un riavvio dell'app."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "È richiesto un riavvio dell'app."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/ja.lproj/Localizable.strings b/lang/uYouPlus.bundle/ja.lproj/Localizable.strings index cb405a4..be3088b 100644 --- a/lang/uYouPlus.bundle/ja.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/ja.lproj/Localizable.strings @@ -120,3 +120,6 @@ "YT_RE_EXPLORE" = "ショートタブを探索タブに置き換える (YTReExplore)"; "YT_RE_EXPLORE_DESC" = "アプリの再起動が必要です。"; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/ko.lproj/Localizable.strings b/lang/uYouPlus.bundle/ko.lproj/Localizable.strings index a3723c7..e6fa96a 100644 --- a/lang/uYouPlus.bundle/ko.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/ko.lproj/Localizable.strings @@ -120,3 +120,6 @@ "YT_RE_EXPLORE" = "Shorts 탭 대신 탐색 탭 보이기 (YTReExplore)"; "YT_RE_EXPLORE_DESC" = "앱을 다시 시작해야 합니다."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/nl.lproj/Localizable.strings b/lang/uYouPlus.bundle/nl.lproj/Localizable.strings index 31a0dce..d8ec9a7 100644 --- a/lang/uYouPlus.bundle/nl.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/nl.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "Je moet de app opnieuw opstarten om dit te activeren."; "YT_RE_EXPLORE" = "Vervang Shorts met Ontdekken (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "Je moet de app opnieuw opstarten om dit te activeren."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "Je moet de app opnieuw opstarten om dit te activeren."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/pl.lproj/Localizable.strings b/lang/uYouPlus.bundle/pl.lproj/Localizable.strings index 162f0eb..7936915 100644 --- a/lang/uYouPlus.bundle/pl.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/pl.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "Restart aplikacji jest wymagany."; "YT_RE_EXPLORE" = "Zamień kartę Shorts na kartę Odkrywaj (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "Restart aplikacji jest wymagany."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "Restart aplikacji jest wymagany."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/pt.lproj/Localizable.strings b/lang/uYouPlus.bundle/pt.lproj/Localizable.strings index 24d7b08..f06d5c9 100644 --- a/lang/uYouPlus.bundle/pt.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/pt.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "A reinicialização do app é necessária."; "YT_RE_EXPLORE" = "Substituir a guia Shorts pela guia Explorar (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "A reinicialização do app é necessária."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "A reinicialização do app é necessária."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/ro.lproj/Localizable.strings b/lang/uYouPlus.bundle/ro.lproj/Localizable.strings index fb980d3..96758f0 100644 --- a/lang/uYouPlus.bundle/ro.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/ro.lproj/Localizable.strings @@ -120,3 +120,6 @@ "YT_RE_EXPLORE" = "Înlocuire fila Shorts cu fila Explore (YTReExplore)"; "YT_RE_EXPLORE_DESC" = "Este necesară repornirea aplicației."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/ru.lproj/Localizable.strings b/lang/uYouPlus.bundle/ru.lproj/Localizable.strings index 8a24c0b..2023f57 100644 --- a/lang/uYouPlus.bundle/ru.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/ru.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "Потребуется перезагрузка."; "YT_RE_EXPLORE" = "Вкладка «Навигация» вместо «Shorts»"; -"YT_RE_EXPLORE_DESC" = "Потребуется перезагрузка."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "Потребуется перезагрузка."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/template.lproj/Localizable.strings b/lang/uYouPlus.bundle/template.lproj/Localizable.strings index 423e588..3ce1627 100644 --- a/lang/uYouPlus.bundle/template.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/template.lproj/Localizable.strings @@ -134,4 +134,7 @@ https://github.com/PoomSmart/Return-YouTube-Dislikes/tree/main/layout/Library/Ap "NEW_MINIPLAYER_STYLE_DESC" = "App restart is required."; "YT_RE_EXPLORE" = "Replace Shorts tab with Explore tab (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "App restart is required."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "App restart is required."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/tr.lproj/Localizable.strings b/lang/uYouPlus.bundle/tr.lproj/Localizable.strings index a428458..3804548 100644 --- a/lang/uYouPlus.bundle/tr.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/tr.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "Uygulamanın yeniden başlatılması gerekir."; "YT_RE_EXPLORE" = "Shorts sekmesini Keşfet sekmesiyle değiştirin (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "Uygulamanın yeniden başlatılması gerekir."; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "Uygulamanın yeniden başlatılması gerekir."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/vi.lproj/Localizable.strings b/lang/uYouPlus.bundle/vi.lproj/Localizable.strings index e8253ef..682d201 100644 --- a/lang/uYouPlus.bundle/vi.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/vi.lproj/Localizable.strings @@ -120,3 +120,6 @@ "YT_RE_EXPLORE" = "Thay thế tab Shorts bằng tab Khám phá (YTReExplore)"; "YT_RE_EXPLORE_DESC" = "Cần khởi động lại ứng dụng."; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/zh_cn.lproj/Localizable.strings b/lang/uYouPlus.bundle/zh_cn.lproj/Localizable.strings index 488662a..59bdf24 100644 --- a/lang/uYouPlus.bundle/zh_cn.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/zh_cn.lproj/Localizable.strings @@ -120,3 +120,6 @@ "YT_RE_EXPLORE" = "将 Shorts 选项卡替换成探索选项卡 (YTReExplore)"; "YT_RE_EXPLORE_DESC" = "更改本设置后需要重启 App。"; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/lang/uYouPlus.bundle/zh_tw.lproj/Localizable.strings b/lang/uYouPlus.bundle/zh_tw.lproj/Localizable.strings index a9234a7..2a87942 100644 --- a/lang/uYouPlus.bundle/zh_tw.lproj/Localizable.strings +++ b/lang/uYouPlus.bundle/zh_tw.lproj/Localizable.strings @@ -119,4 +119,7 @@ "NEW_MINIPLAYER_STYLE_DESC" = "需要重新啟動應用程式。"; "YT_RE_EXPLORE" = "用探索選項卡代替 Shorts 選項卡 (YTReExplore)"; -"YT_RE_EXPLORE_DESC" = "需要重新啟動應用程式。"; \ No newline at end of file +"YT_RE_EXPLORE_DESC" = "需要重新啟動應用程式。"; + +"IPHONE_LAYOUT" = "iPhone Layout"; +"IPHONE_LAYOUT_DESC" = "Toggle to use the iPhone Layout. App restart is required."; diff --git a/uYouPlus.xm b/uYouPlus.xm index 250f230..fb4afe2 100644 --- a/uYouPlus.xm +++ b/uYouPlus.xm @@ -1300,6 +1300,29 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha: // %end %end +%group giPhoneLayout +%hook UIDevice +- (long long)userInterfaceIdiom { + return NO; +} +%end +%hook UIStatusBarStyleAttributes +- (long long)idiom { + return YES; +} +%end +%hook UIKBTree +- (long long)nativeIdiom { + return YES; +} +%end +%hook UIKBRenderer +- (long long)assetIdiom { + return YES; +} +%end +%end + # pragma mark - ctor %ctor { // Load uYou first so its functions are available for hooks. @@ -1342,6 +1365,9 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha: if (IsEnabled(@"hideChipBar_enabled")) { %init(gHideChipBar); } + if (IsEnabled(@"iPhoneLayout_enabled") && (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad)) { + %init(giPhoneLayout); + } // Disable updates [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"automaticallyCheckForUpdates"];