1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-11 09:28:38 +00:00

Merge remote-tracking branch 'origin/master' into notification-widget

This commit is contained in:
Toxblh 2019-11-28 21:48:48 +03:00
commit a6b52ebe95
2 changed files with 27 additions and 27 deletions

View File

@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.24</string>
<string>0.25</string>
<key>CFBundleVersion</key>
<string>296</string>
<string>297</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>

View File

@ -88,9 +88,9 @@ class YandexWeatherBarItem: CustomButtonTouchBarItem, CLLocationManagerDelegate
func getWeatherUrl() -> String {
if location != nil {
return "https://yandex.ru/pogoda/?lat=\(location.coordinate.latitude)&lon=\(location.coordinate.longitude)"
return "https://yandex.ru/pogoda/?lat=\(location.coordinate.latitude)&lon=\(location.coordinate.longitude)?lang=ru"
} else {
return "https://yandex.ru/pogoda/" // Yandex will try to determine your location by default
return "https://yandex.ru/pogoda/?lang=ru" // Yandex will try to determine your location by default
}
}
@ -133,7 +133,7 @@ extension String {
let nsString = self as NSString
let results = regex.matches(in: self, options: [], range: NSMakeRange(0, nsString.length))
return results.map { result in
(0..<result.numberOfRanges).map {
(0 ..< result.numberOfRanges).map {
result.range(at: $0).location != NSNotFound
? nsString.substring(with: result.range(at: $0))
: ""