mirror of
https://github.com/yanue/V2rayU.git
synced 2025-06-27 05:30:09 +00:00
Merge pull request #58 from snailbing/master
修正ss的URL中如果remarks部分是中文url编码过的内容,导入时无法正常解析的问题
This commit is contained in:
commit
43f3e538e0
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
V2rayU.xcodeproj/project.xcworkspace/xcuserdata
|
||||
V2rayU.xcodeproj/xcuserdata
|
||||
Pods
|
||||
V2rayU.xcworkspace/xcuserdata
|
||||
Build/v2ray-core
|
@ -163,15 +163,15 @@ class ConfigWindowController: NSWindowController, NSWindowDelegate, NSTabViewDel
|
||||
rowIndex = idx
|
||||
}
|
||||
|
||||
// reload
|
||||
self.serversTableView.reloadData()
|
||||
|
||||
// fix
|
||||
if cnt > 1 {
|
||||
// selected row
|
||||
self.serversTableView.selectRowIndexes(NSIndexSet(index: rowIndex) as IndexSet, byExtendingSelection: false)
|
||||
}
|
||||
|
||||
// reload
|
||||
self.serversTableView.reloadData()
|
||||
|
||||
if rowIndex >= 0 {
|
||||
self.loadJsonData(rowIndex: rowIndex)
|
||||
} else {
|
||||
@ -729,7 +729,10 @@ extension ConfigWindowController: NSTableViewDataSource {
|
||||
func tableView(_ tableView: NSTableView, objectValueFor tableColumn: NSTableColumn?, row: Int) -> Any? {
|
||||
let v2rayItemList = V2rayServer.list()
|
||||
// set cell data
|
||||
return v2rayItemList[row].remark
|
||||
if v2rayItemList.count >= row {
|
||||
return v2rayItemList[row].remark
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// edit cell
|
||||
|
@ -520,7 +520,7 @@ class ShadowsockUri {
|
||||
|
||||
if let index = base64End {
|
||||
let i = urlStr.index(index, offsetBy: 1)
|
||||
let fragment = String(urlStr[i...])
|
||||
let fragment = String(urlStr[i...]).removingPercentEncoding
|
||||
return ("ss://\(s)", fragment)
|
||||
}
|
||||
return ("ss://\(s)", nil)
|
||||
|
Loading…
x
Reference in New Issue
Block a user