| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// Protected methods for subclasses.I think we can move this to `task_request_private.h`, which we allow to include from sub-classes and from `task_request.mm` but not from the rest of the codebase.
```
@interface TaskRequest ()
- (instancetype)initWithSceneState:(SceneState*)sceneState
isColdStart:(BOOL)isColdStart;
@end
```
@protected
std::string _sceneSessionID;
__weak SceneState* _sceneState;
BOOL _isColdStart;
}I don't think this is necessary.
Looking at the implementation, this is never used from sub-classes. The sub-classes uses the `isColdStart` property, and the `sceneStateFromSessionID` methods instead of accessing those ivars directly.
Thus you should be able to move this back into the implementation files.
+ (instancetype)taskForTestingWithSceneID:(std::string_view)sceneIDnit: move with the other factories (i.e. before the initializers)
return nil;nit: `NOTREACHED()` since all sub-classes `CHECK(...)` that the pointer returned is not nil
_shortcutHandler = [handler copy];nit: `-copy` is not required since we use ARC.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I think we can move this to `task_request_private.h`, which we allow to include from sub-classes and from `task_request.mm` but not from the rest of the codebase.
```
@interface TaskRequest ()- (instancetype)initWithSceneState:(SceneState*)sceneState
isColdStart:(BOOL)isColdStart;
- (SceneState*)sceneStateFromSessionID;
@end
```
Done
@protected
std::string _sceneSessionID;
__weak SceneState* _sceneState;
BOOL _isColdStart;
}I don't think this is necessary.
Looking at the implementation, this is never used from sub-classes. The sub-classes uses the `isColdStart` property, and the `sceneStateFromSessionID` methods instead of accessing those ivars directly.
Thus you should be able to move this back into the implementation files.
Done
+ (instancetype)taskForTestingWithSceneID:(std::string_view)sceneIDnit: move with the other factories (i.e. before the initializers)
Done
nit: `NOTREACHED()` since all sub-classes `CHECK(...)` that the pointer returned is not nil
Done
nit: `-copy` is not required since we use ARC.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[ios] Split TaskRequest responsibilities in multiple classes
Add:
- TaskRequestForShortcutItem
- TaskRequestForURLContext
- TaskRequestForUserActivity
classes to handle specific intent types, to avoid having all logic in
one single class.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |