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
269
Issues
269
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
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
42392120
Commit
42392120
authored
Aug 16, 2018
by
Soomin Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VLCEditController: Handle empty rename
parent
41dc0bb0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
Sources/VLCEditController.swift
Sources/VLCEditController.swift
+9
-2
No files found.
Sources/VLCEditController.swift
View file @
42392120
...
...
@@ -156,14 +156,21 @@ extension VLCEditController: VLCEditToolbarDelegate {
}
func
rename
()
{
// FIXME: Multiple renaming of files(multiple alert can get unfriendly if too many files)
for
indexPath
in
selectedCellIndexPaths
{
if
let
media
=
category
.
anyfiles
[
indexPath
.
row
]
as?
VLCMLMedia
{
// Not using VLCAlertViewController to have more customization in text fields
let
alertInfo
=
TextFieldAlertInfo
(
alertTitle
:
String
(
format
:
NSLocalizedString
(
"RENAME_MEDIA_TO"
,
comment
:
""
),
media
.
title
),
placeHolder
:
"NEW_NAME"
)
placeHolder
:
"NEW_NAME"
,
confirmActionTitle
:
NSLocalizedString
(
"BUTTON_RENAME"
,
comment
:
""
))
presentTextFieldAlert
(
with
:
alertInfo
,
completionHandler
:
{
[
weak
self
]
text
->
Void
in
guard
text
!=
""
else
{
VLCAlertViewController
.
alertViewManager
(
title
:
NSLocalizedString
(
"ERROR_RENAME_FAILED"
,
comment
:
""
),
errorMessage
:
NSLocalizedString
(
"ERROR_EMPTY_NAME"
,
comment
:
""
),
viewController
:
(
UIApplication
.
shared
.
keyWindow
?
.
rootViewController
)
!
)
return
}
media
.
updateTitle
(
text
)
self
?
.
resetCell
(
at
:
indexPath
)
})
...
...
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