Remove duplicates #217

Merged
bhackel merged 5 commits from remove-duplicates into main 2024-07-07 10:12:50 +00:00
bhackel commented 2024-07-07 09:39:26 +00:00 (Migrated from github.com)

Got another one @arichornlover thank you

Got another one @arichornlover thank you
arichornloverALT commented 2024-07-07 10:17:35 +00:00 (Migrated from github.com)

Merged! And I will try to port the custom Fullscreen to the right option here later. Hopefully it is stable.

Merged! And I will try to port the custom **Fullscreen to the right** option here later. Hopefully it is stable.
bhackel commented 2024-07-07 10:18:50 +00:00 (Migrated from github.com)

Sounds good, looking forward to it. I've been having more issues recently with the app fullscreening to the wrong side.

Sounds good, looking forward to it. I've been having more issues recently with the app fullscreening to the wrong side.
arichornloverALT commented 2024-07-07 10:21:17 +00:00 (Migrated from github.com)

Sounds good, looking forward to it. I've been having more issues recently with the app fullscreening to the wrong side.

Is it about the implementation I made or are you just referring to the official app always fullscreening to the left side.

> Sounds good, looking forward to it. I've been having more issues recently with the app fullscreening to the wrong side. Is it about the implementation I made or are you just referring to the official app always fullscreening to the left side.
bhackel commented 2024-07-07 10:22:23 +00:00 (Migrated from github.com)

The official app has been doing it to me recently, very strange since it was good for a while.

The official app has been doing it to me recently, very strange since it was good for a while.
arichornloverALT commented 2024-07-07 10:35:27 +00:00 (Migrated from github.com)

The official app has been doing it to me recently, very strange since it was good for a while.

Maybe try using this following implementation below again and tell me if you think this can force it to the right side?
this time the - (BOOL) fullscreen is gone in this version since it already exists in the class.

Implementation (Again)
@interface YTWatchViewController (uYouEnhanced)
@property(nonatomic, strong) YTWatchPullToFullController *pullToFullController;
- (NSUInteger) allowedFullScreenOrientations;
// Fullscreen to the Right (uYouEnhanced Version) - @arichornlover
- (UIInterfaceOrientationMask) supportedInterfaceOrientations;
- (UIInterfaceOrientation) preferredInterfaceOrientationForPresentation;
- (void)forceRightFullscreenOrientation;
@end

// Fullscreen to the Right - @arichornlover
// %group gFullscreenToTheRight

%hook YTWatchViewController
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    if ([self fullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
        return UIInterfaceOrientationLandscapeRight;
    }
    return %orig;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    if ([self fullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
        return UIInterfaceOrientationMaskLandscape;
    }
    return %orig;
}
%new
- (void)forceRightFullscreenOrientation {
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
        NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight];
        [[UIDevice currentDevice] setValue:value forKey:@"orientation"];
    }
}
%end

// TEMPORARY DISABLED GROUPING
// %end

won’t work in YTLitePlus.h just yet.

> The official app has been doing it to me recently, very strange since it was good for a while. Maybe try using this following implementation below again and tell me if you think this can force it to the right side? this time the `- (BOOL) fullscreen` is gone in this version since it already exists in the class. <details> <summary>Implementation (Again)</summary> ``` @interface YTWatchViewController (uYouEnhanced) @property(nonatomic, strong) YTWatchPullToFullController *pullToFullController; - (NSUInteger) allowedFullScreenOrientations; // Fullscreen to the Right (uYouEnhanced Version) - @arichornlover - (UIInterfaceOrientationMask) supportedInterfaceOrientations; - (UIInterfaceOrientation) preferredInterfaceOrientationForPresentation; - (void)forceRightFullscreenOrientation; @end // Fullscreen to the Right - @arichornlover // %group gFullscreenToTheRight %hook YTWatchViewController - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { if ([self fullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { return UIInterfaceOrientationLandscapeRight; } return %orig; } - (UIInterfaceOrientationMask)supportedInterfaceOrientations { if ([self fullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { return UIInterfaceOrientationMaskLandscape; } return %orig; } %new - (void)forceRightFullscreenOrientation { if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { NSNumber *value = [NSNumber numberWithInt:UIInterfaceOrientationLandscapeRight]; [[UIDevice currentDevice] setValue:value forKey:@"orientation"]; } } %end // TEMPORARY DISABLED GROUPING // %end ``` </details> won’t work in **YTLitePlus.h** just yet.
arichornloverALT commented 2024-07-07 10:49:03 +00:00 (Migrated from github.com)

Also I found and removed another duplicate in YTLitePlus.
1cb51102ba
since YTLite already has the implementation.

Also I found and removed another duplicate in YTLitePlus. https://github.com/YTLitePlus/YTLitePlus/commit/1cb51102bab8d582fa0d9be7b31bdd45087ea9d1 since YTLite already has the implementation.
bhackel commented 2024-07-07 10:50:53 +00:00 (Migrated from github.com)

Oh nice I didn't think about those tweaks

Oh nice I didn't think about those tweaks
arichornloverALT commented 2024-07-07 11:19:41 +00:00 (Migrated from github.com)

Oh nice I didn't think about those tweaks

Also the good thing about removing it is that it resolved the missing icons problem!

> Oh nice I didn't think about those tweaks Also the good thing about removing it is that it resolved the missing icons problem!
Balackburn commented 2024-07-07 13:27:58 +00:00 (Migrated from github.com)

Oh nice I didn't think about those tweaks

Also the good thing about removing it is that it resolved the missing icons problem!

Great

> > Oh nice I didn't think about those tweaks > > > > Also the good thing about removing it is that it resolved the missing icons problem! Great
bhackel commented 2024-07-09 07:08:27 +00:00 (Migrated from github.com)

The official app has been doing it to me recently, very strange since it was good for a while.

Maybe try using this following implementation below again and tell me if you think this can force it to the right side? this time the - (BOOL) fullscreen is gone in this version since it already exists in the class.

Implementation (Again)
won’t work in YTLitePlus.h just yet.

I will try this out later today hopefully, will let you know

> > The official app has been doing it to me recently, very strange since it was good for a while. > > Maybe try using this following implementation below again and tell me if you think this can force it to the right side? this time the `- (BOOL) fullscreen` is gone in this version since it already exists in the class. > > Implementation (Again) > won’t work in **YTLitePlus.h** just yet. I will try this out later today hopefully, will let you know
arichornloverALT commented 2024-07-09 18:03:41 +00:00 (Migrated from github.com)
Sources/uYouPlus.xm:858:15: error: no visible @interface for 'YTWatchViewController' declares the selector 'fullscreen'
    if ([self fullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
         ~~~~ ^~~~~~~~~~
Sources/uYouPlus.xm:864:15: error: no visible @interface for 'YTWatchViewController' declares the selector 'fullscreen'
    if ([self fullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
         ~~~~ ^~~~~~~~~~
Sources/uYouPlus.xm:996:50: error: incompatible pointer types initializing 'YTWatchViewController *__strong' with an expression of type 'id<YTWatchPlayerViewLayoutSource>' [-Werror,-Wincompatible-pointer-types]
    YTWatchViewController *watchViewController = self.playerViewSource; // Isn’t related to fullscreen but it’s been unfixable on uYouEnhanced.

If you do, then I recommend declaring - (BOOL)fullscreen in YouTubeHeader’s YTWatchViewController.h if you ever encounter the compiling errors above.

``` Sources/uYouPlus.xm:858:15: error: no visible @interface for 'YTWatchViewController' declares the selector 'fullscreen' if ([self fullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { ~~~~ ^~~~~~~~~~ Sources/uYouPlus.xm:864:15: error: no visible @interface for 'YTWatchViewController' declares the selector 'fullscreen' if ([self fullscreen] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { ~~~~ ^~~~~~~~~~ Sources/uYouPlus.xm:996:50: error: incompatible pointer types initializing 'YTWatchViewController *__strong' with an expression of type 'id<YTWatchPlayerViewLayoutSource>' [-Werror,-Wincompatible-pointer-types] YTWatchViewController *watchViewController = self.playerViewSource; // Isn’t related to fullscreen but it’s been unfixable on uYouEnhanced. ``` If you do, then I recommend declaring `- (BOOL)fullscreen` in YouTubeHeader’s **YTWatchViewController.h** if you ever encounter the compiling errors above.
bhackel commented 2024-07-10 06:51:22 +00:00 (Migrated from github.com)

Ah I dealt with this recently, there’s a very tricky issue with this method. See the below image

image

So if you switch from using [self fullscreen] to instead self.fullscreen, the compiler will automatically convert it to [self isFullscreen] for you, based on the interface declared.

Edit: I just tested with it and it seems to be working, so nice job

Ah I dealt with this recently, there’s a very tricky issue with this method. See the below image ![image](https://github.com/YTLitePlus/YTLitePlus/assets/34104885/6464c7e5-3861-47fa-924b-c0b22498759d) So if you switch from using [self fullscreen] to instead self.fullscreen, the compiler will automatically convert it to [self isFullscreen] for you, based on the interface declared. Edit: I just tested with it and it seems to be working, so nice job
arichornloverALT commented 2024-07-10 07:08:02 +00:00 (Migrated from github.com)

Ah I dealt with this recently, there’s a very tricky issue with this method. See the below image

image

So if you switch from using [self fullscreen] to instead self.fullscreen, the compiler will automatically convert it to [self isFullscreen] for you, based on the interface declared.

Edit: I just tested with it and it seems to be working, so nice job

I am glad I was able to make this option work 😁
I will be adding this as an Option for YTLitePlus!

> Ah I dealt with this recently, there’s a very tricky issue with this method. See the below image > > ![image](https://private-user-images.githubusercontent.com/34104885/347289319-6464c7e5-3861-47fa-924b-c0b22498759d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1OTU0NzUsIm5iZiI6MTcyMDU5NTE3NSwicGF0aCI6Ii8zNDEwNDg4NS8zNDcyODkzMTktNjQ2NGM3ZTUtMzg2MS00N2ZhLTkyNGItYzBiMjI0OTg3NTlkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEwVDA3MDYxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUxOTA4M2ExNTdkYTA4ODY2ZmE5YmZmZWM2NjY5ZjY5M2NiOGI2NGQzMTFiYzVmZGUwYzE0YTNkODQxYmRkMzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.UZ2gy2_NBo8TmHCI4uZTh9KnYMnF-PKUtd938S7QvvE) > > So if you switch from using [self fullscreen] to instead self.fullscreen, the compiler will automatically convert it to [self isFullscreen] for you, based on the interface declared. > > Edit: I just tested with it and it seems to be working, so nice job I am glad I was able to make this option work 😁 I will be adding this as an Option for YTLitePlus!
arichornloverALT commented 2024-07-13 10:25:34 +00:00 (Migrated from github.com)

Ah I dealt with this recently, there’s a very tricky issue with this method. See the below image
image
So if you switch from using [self fullscreen] to instead self.fullscreen, the compiler will automatically convert it to [self isFullscreen] for you, based on the interface declared.
Edit: I just tested with it and it seems to be working, so nice job

I am glad I was able to make this option work 😁 I will be adding this as an Option for YTLitePlus!

I fixed it again 6b78aba609
I found out I used the wrong implementation of Idiom in Fullscreen to the Right, it should still work as intended 😅

> > Ah I dealt with this recently, there’s a very tricky issue with this method. See the below image > > ![image](https://private-user-images.githubusercontent.com/34104885/347289319-6464c7e5-3861-47fa-924b-c0b22498759d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1OTU0NzUsIm5iZiI6MTcyMDU5NTE3NSwicGF0aCI6Ii8zNDEwNDg4NS8zNDcyODkzMTktNjQ2NGM3ZTUtMzg2MS00N2ZhLTkyNGItYzBiMjI0OTg3NTlkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEwVDA3MDYxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUxOTA4M2ExNTdkYTA4ODY2ZmE5YmZmZWM2NjY5ZjY5M2NiOGI2NGQzMTFiYzVmZGUwYzE0YTNkODQxYmRkMzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.UZ2gy2_NBo8TmHCI4uZTh9KnYMnF-PKUtd938S7QvvE) > > So if you switch from using [self fullscreen] to instead self.fullscreen, the compiler will automatically convert it to [self isFullscreen] for you, based on the interface declared. > > Edit: I just tested with it and it seems to be working, so nice job > > I am glad I was able to make this option work 😁 I will be adding this as an Option for YTLitePlus! I fixed it again https://github.com/YTLitePlus/YTLitePlus/commit/6b78aba609f80692fcc0ebbe0f0c3a5d15a3cbb6 I found out I used the wrong implementation of Idiom in Fullscreen to the Right, it should still work as intended 😅
Sign in to join this conversation.
No description provided.