This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[quick_actions]Migrates all remaining components to Swift, and deprecate OCMock #6597
Merged
auto-submit
merged 13 commits into
flutter:main
from
hellohuanlin:quick_actions_migrate_shortcut_state_manager_to_swift
Nov 18, 2022
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6457d0a
[quick_actions]migrate shortcut state manager, deprecate OCMock and u…
hellohuanlin 1cebdb1
remove objc proj settings
hellohuanlin 8bbd0b7
rename shortcut state manager
hellohuanlin 0994d9e
bump version
hellohuanlin 3bff524
run swift-format
hellohuanlin 87a9ec6
nit
hellohuanlin 76528a8
remove public_header_files
hellohuanlin a0ff061
use shortcut item parser instead of shortcut state manager
hellohuanlin 009aadf
some nit
hellohuanlin d30e077
rename AppShortcutControlling to ShortcutItemProviding
hellohuanlin f354302
nit
hellohuanlin 6f55400
do not crash if no type or title
hellohuanlin 76d835e
update license
hellohuanlin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
use shortcut item parser instead of shortcut state manager
- Loading branch information
commit a0ff061af8c47b678f0e046a94187012ef92b267
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...uick_actions/quick_actions_ios/example/ios/RunnerTests/Mocks/MockShortcutItemParser.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // | ||
| // MockShortcutItemParser.swift | ||
| // RunnerTests | ||
| // | ||
| // Created by Huan Lin on 11/3/22. | ||
| // Copyright © 2022 The Flutter Authors. All rights reserved. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| @testable import quick_actions_ios | ||
|
|
||
| final class MockShortcutItemParser: ShortcutItemParser { | ||
|
|
||
| var parseShortcutItemsStub: ((_ items: [[String: Any]]) -> [UIApplicationShortcutItem])? = nil | ||
|
|
||
| func parseShortcutItems(_ items: [[String: Any]]) -> [UIApplicationShortcutItem] { | ||
| return parseShortcutItemsStub?(items) ?? [] | ||
| } | ||
| } |
13 changes: 0 additions & 13 deletions
13
...ck_actions/quick_actions_ios/example/ios/RunnerTests/Mocks/MockShortcutStateManager.swift
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this need
AnyObject?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AnyObjectscopes this protocol to reference types (classes). It prevents any value types (enums & structs) to conform to it.Since this is injected dependency with no value semantics, we want to scope it to reference types. See the
NOTEbelow: