Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
2d782c46
Commit
2d782c46
authored
Dec 09, 2015
by
Felix Paul Kühne
Browse files
ATV ONS: actually store URLs entered by the user
parent
47491915
Changes
1
Hide whitespace changes
Inline
Side-by-side
Apple-TV/VLCOpenNetworkStreamTVViewController.m
View file @
2d782c46
...
...
@@ -68,7 +68,7 @@
[
ubiquitousKeyValueStore
synchronize
];
/* fetch data from cloud */
_recentURLs
=
[
NSMutableArray
arrayWithArray
:[
[
NSU
biquitousKeyValueStore
defaultStore
]
arrayForKey
:
kVLCRecentURLs
]];
_recentURLs
=
[
NSMutableArray
arrayWithArray
:[
u
biquitousKeyValueStore
arrayForKey
:
kVLCRecentURLs
]];
#ifndef NDEBUG
if
(
_recentURLs
.
count
==
0
)
{
[
_recentURLs
addObject
:
@"https://www.youtube.com/watch?v=13e2GxpqGPY"
];
...
...
@@ -130,6 +130,14 @@
{
NSString
*
urlString
=
self
.
playURLField
.
text
;
if
(
urlString
.
length
)
{
if
([
_recentURLs
indexOfObject
:
urlString
]
!=
NSNotFound
)
[
_recentURLs
removeObject
:
urlString
];
if
(
_recentURLs
.
count
>=
100
)
[
_recentURLs
removeLastObject
];
[
_recentURLs
addObject
:
urlString
];
[[
NSUbiquitousKeyValueStore
defaultStore
]
setArray
:
_recentURLs
forKey
:
kVLCRecentURLs
];
[
self
_openURLStringAndDismiss
:
urlString
];
}
}
...
...
Write
Preview
Supports
Markdown
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