Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-iOS
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
268
Issues
268
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLC-iOS
Commits
8d461ba8
Commit
8d461ba8
authored
May 10, 2015
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handoff: further clean-up and partial fixes
parent
276ebd7d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
19 deletions
+34
-19
Sources/VLC for iOS-Info.plist
Sources/VLC for iOS-Info.plist
+1
-0
Sources/VLCAppDelegate.m
Sources/VLCAppDelegate.m
+16
-6
Sources/VLCPlaylistViewController.h
Sources/VLCPlaylistViewController.h
+1
-6
Sources/VLCPlaylistViewController.m
Sources/VLCPlaylistViewController.m
+7
-4
VLC for iOS WatchKit Extension/VLCPlaylistInterfaceController.m
...r iOS WatchKit Extension/VLCPlaylistInterfaceController.m
+9
-3
No files found.
Sources/VLC for iOS-Info.plist
View file @
8d461ba8
...
...
@@ -64,6 +64,7 @@
<key>
NSUserActivityTypes
</key>
<array>
<string>
org.videolan.vlc-ios.librarymode
</string>
<string>
org.videolan.vlc-ios.libraryselection
</string>
<string>
org.videolan.vlc-ios.playing
</string>
</array>
<key>
LSApplicationCategoryType
</key>
...
...
Sources/VLCAppDelegate.m
View file @
8d461ba8
...
...
@@ -180,20 +180,30 @@
-
(
BOOL
)
application
:(
UIApplication
*
)
application
willContinueUserActivityWithType
:(
NSString
*
)
userActivityType
{
if
([
userActivityType
isEqualToString
:
@"org.videolan.vlc-ios.librarymode"
]
||
[
userActivityType
isEqualToString
:
@"org.videolan.vlc-ios.playing"
])
if
([
userActivityType
isEqualToString
:
@"org.videolan.vlc-ios.librarymode"
]
||
[
userActivityType
isEqualToString
:
@"org.videolan.vlc-ios.playing"
]
||
[
userActivityType
isEqualToString
:
@"org.videolan.vlc-ios.libraryselection"
])
return
YES
;
return
NO
;
}
-
(
BOOL
)
application
:(
UIApplication
*
)
application
continueUserActivity
:(
NSUserActivity
*
)
userActivity
restorationHandler
:(
void
(
^
)(
NSArray
*
))
restorationHandler
{
-
(
BOOL
)
application
:(
UIApplication
*
)
application
continueUserActivity
:(
NSUserActivity
*
)
userActivity
restorationHandler
:(
void
(
^
)(
NSArray
*
))
restorationHandler
{
NSString
*
userActivityType
=
userActivity
.
activityType
;
if
([
userActivity
.
activityType
isEqualToString
:
@"org.videolan.vlc-ios.librarymode"
])
{
if
([
userActivityType
isEqualToString
:
@"org.videolan.vlc-ios.librarymode"
]
||
[
userActivityType
isEqualToString
:
@"org.videolan.vlc-ios.libraryselection"
])
{
NSDictionary
*
dict
=
userActivity
.
userInfo
;
VLCLibraryMode
row
=
(
VLCLibraryMode
)[(
NSNumber
*
)
dict
[
@"state"
]
integerValue
];
VLCLibraryMode
libraryMode
=
(
VLCLibraryMode
)[(
NSNumber
*
)
dict
[
@"state"
]
integerValue
];
if
(
libraryMode
<=
VLCLibraryModeAllSeries
)
{
[
self
.
menuViewController
selectRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
libraryMode
inSection
:
0
]
animated
:
NO
scrollPosition
:
UITableViewScrollPositionTop
];
[
self
.
playlistViewController
setLibraryMode
:(
VLCLibraryMode
)
libraryMode
];
}
[
self
.
menuViewController
selectRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
row
inSection
:
0
]
animated
:
NO
scrollPosition
:
UITableViewScrollPositionTop
];
[
self
.
playlistViewController
setLibraryMode
:(
VLCLibraryMode
)
row
];
[
self
.
playlistViewController
restoreUserActivityState
:
userActivity
];
_isComingFromHandoff
=
YES
;
return
YES
;
...
...
Sources/VLCPlaylistViewController.h
View file @
8d461ba8
...
...
@@ -15,12 +15,7 @@
#define EXPERIMENTAL_LIBRARY 1
typedef
enum
{
VLCLibraryModeAllFiles
=
0
,
VLCLibraryModeAllAlbums
=
1
,
VLCLibraryModeAllSeries
=
2
,
VLCLibraryModeCreateFolder
=
3
}
VLCLibraryMode
;
#import "MLMediaLibrary+playlist.h"
@class
EmptyLibraryView
;
...
...
Sources/VLCPlaylistViewController.m
View file @
8d461ba8
...
...
@@ -1551,11 +1551,14 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
-
(
void
)
restoreUserActivityState
:(
NSUserActivity
*
)
activity
{
if
([
activity
.
activityType
isEqualToString
:
@"org.videolan.vlc-ios.librarymode"
])
{
NSString
*
userActivityType
=
activity
.
activityType
;
if
([
userActivityType
isEqualToString
:
@"org.videolan.vlc-ios.librarymode"
]
||
[
userActivityType
isEqualToString
:
@"org.videolan.vlc-ios.libraryselection"
])
{
NSDictionary
*
dict
=
activity
.
userInfo
;
NSURL
*
folderURL
=
dict
[
@"folder"
];
if
(
!
folderURL
)
return
;
NSString
*
folderPath
=
dict
[
@"folder"
];
if
(
!
folderPath
)
return
;
NSURL
*
folderURL
=
[
NSURL
URLWithString
:
folderPath
];
NSUInteger
count
=
_foundMedia
.
count
;
for
(
NSUInteger
i
=
0
;
i
<
count
;
i
++
)
{
...
...
VLC for iOS WatchKit Extension/VLCPlaylistInterfaceController.m
View file @
8d461ba8
...
...
@@ -81,11 +81,16 @@ static NSString *const VLCDBUpdateNotificationRemote = @"org.videolan.ios-app.db
-
(
void
)
table
:(
WKInterfaceTable
*
)
table
didSelectRowAtIndex
:(
NSInteger
)
rowIndex
{
id
object
=
self
.
tableController
.
displayedObjects
[
rowIndex
];
if
([
object
isKindOfClass
:[
MLAlbum
class
]]
||
[
object
isKindOfClass
:[
MLLabel
class
]]
||
[
object
isKindOfClass
:[
MLShow
class
]])
{
NSLog
(
@"we have class %@"
,
[
object
class
]);
[
self
pushControllerWithName
:
@"tableViewController"
context
:
object
];
[
self
updateUserActivity
:
@"org.videolan.vlc-ios.librarymode"
userInfo:
@{
@"state"
:
@
(
self
.
libraryMode
),
@"folder"
:
((
NSManagedObject
*
)
object
).
objectID
.
URIRepresentation
}
NSString
*
folderRepresentation
=
[((
NSManagedObject
*
)
object
).
objectID
.
URIRepresentation
absoluteString
];
NSDictionary
*
userDict
=
@{
@"state"
:
@
(
self
.
libraryMode
),
@"folder"
:
folderRepresentation
};
[
self
invalidateUserActivity
];
[
self
updateUserActivity
:
@"org.videolan.vlc-ios.libraryselection"
userInfo:
userDict
webpageURL:
nil
];
}
else
{
[
self
pushControllerWithName
:
@"detailInfo"
context
:
object
];
...
...
@@ -138,6 +143,7 @@ static NSString *const VLCDBUpdateNotificationRemote = @"org.videolan.ios-app.db
-
(
void
)
setLibraryMode
:(
VLCLibraryMode
)
libraryMode
{
//should also handle diving into a folder
[
self
invalidateUserActivity
];
[
self
updateUserActivity
:
@"org.videolan.vlc-ios.librarymode"
userInfo
:@{
@"state"
:
@
(
libraryMode
)}
webpageURL
:
nil
];
_libraryMode
=
libraryMode
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment