diff --git a/GitTime/Sources/ViewControllers/Setting/SettingViewController.swift b/GitTime/Sources/ViewControllers/Setting/SettingViewController.swift index d0ea76f..dc86d77 100644 --- a/GitTime/Sources/ViewControllers/Setting/SettingViewController.swift +++ b/GitTime/Sources/ViewControllers/Setting/SettingViewController.swift @@ -204,8 +204,13 @@ class SettingViewController: BaseViewController, ReactorKit.View { } private func goToRecommendApp() { - let url = URL(string: Constants.URLs.appStoreURL) + guard let url = URL(string: Constants.URLs.appStoreURL) else { return } let activityController = UIActivityViewController(activityItems: [url], applicationActivities: nil) + if UIDevice.isPad == true { + guard let cell = tableView.cellForRow(at: IndexPath(row: 2, section: 1)) else { return } + activityController.popoverPresentationController?.sourceView = self.tableView + activityController.popoverPresentationController?.sourceRect = cell.frame + } self.present(activityController, animated: true, completion: nil) } diff --git a/GitTime/Sources/ViewControllers/Trend/TrendViewReactor.swift b/GitTime/Sources/ViewControllers/Trend/TrendViewReactor.swift index 7716348..d6f7acd 100644 --- a/GitTime/Sources/ViewControllers/Trend/TrendViewReactor.swift +++ b/GitTime/Sources/ViewControllers/Trend/TrendViewReactor.swift @@ -294,14 +294,14 @@ final class TrendViewReactor: Reactor { currentPeriodStars: 0, contributors: []) - /// Repository Info - let repositoryInfo = item.xpath(".//h1[@class='h3 lh-condensed']/a")//[index] - let description = item.xpath(".//p[@class='col-9 color-text-secondary my-1 pr-4']")//[index] + // Repository Info + let repositoryInfo = item.xpath(".//h1[@class='h3 lh-condensed']/a") + let description = item.xpath(".//p[@class='col-9 color-fg-muted my-1 pr-4']") let languageColor = item.xpath(".//span[@class='d-inline-block ml-0 mr-3']/span[1]") let language = item.xpath(".//span[@class='d-inline-block ml-0 mr-3']/span[2]") - let star = item.xpath(".//div[@class='f6 color-text-secondary mt-2']/a[1]")//[index] - let fork = item.xpath(".//div[@class='f6 color-text-secondary mt-2']/a[2]")//[index] - let todayStar = item.xpath(".//div[@class='f6 color-text-secondary mt-2']/span[@class='d-inline-block float-sm-right']")//[index] + let star = item.xpath(".//div[@class='f6 color-fg-muted mt-2']/a[1]") + let fork = item.xpath(".//div[@class='f6 color-fg-muted mt-2']/a[2]") + let todayStar = item.xpath(".//div[@class='f6 color-fg-muted mt-2']/span[@class='d-inline-block float-sm-right']") // let contributors = item.xpath(".//div[@class='f6 text-gray mt-2']/span[@class='d-inline-block mr-3']") // repository Info @@ -355,9 +355,15 @@ final class TrendViewReactor: Reactor { /* /html/body[@class='logged-in env-production page-responsive']/div[@class='application-main ']/main/div[@class='position-relative container-lg p-responsive pt-6']/div[@class='Box']/div[2]/article[@class='Box-row'][1]/div[@class='f6 color-text-secondary mt-2']/span[@class='d-inline-block mr-3']/a[@class='d-inline-block'][1]/img[@class='avatar mb-1 avatar-user']/@src */ + + /* + /html/body[@class='logged-in env-production page-responsive issue-closed-done']/div[@class='application-main ']/main[@id='js-pjax-container']/div[@class='position-relative container-lg p-responsive pt-6']/div[@class='Box']/div[2]/article[@class='Box-row'][2]/div[@class='f6 color-fg-muted mt-2']/span[@class='d-inline-block mr-3']/a[@class='d-inline-block'][1]/img[@class='avatar mb-1 avatar-user']/@src + */ + + for i in 1...5 { - if let profile = item.xpath(".//div[@class='f6 color-text-secondary mt-2']/span[@class='d-inline-block mr-3']/a[@class='d-inline-block'][\(i)]/img[@class='avatar mb-1 avatar-user']/@src").first?.text?.striped, - let name = item.xpath(".//div[@class='f6 color-text-secondary mt-2']/span[@class='d-inline-block mr-3']/a[@class='d-inline-block'][\(i)]/@href").first?.text?.striped { + if let profile = item.xpath(".//div[@class='f6 color-fg-muted mt-2']/span[@class='d-inline-block mr-3']/a[@class='d-inline-block'][\(i)]/img[@class='avatar mb-1 avatar-user']/@src").first?.text?.striped, + let name = item.xpath(".//div[@class='f6 color-fg-muted mt-2']/span[@class='d-inline-block mr-3']/a[@class='d-inline-block'][\(i)]/@href").first?.text?.striped { let contributorModel = TrendRepoContributor(name: String(name.dropFirst()), profileURL: profile) trendRepo.contributors.append(contributorModel) diff --git a/GitTime/Supporting Files/Info.plist b/GitTime/Supporting Files/Info.plist index e1c8bdc..c68e10d 100644 --- a/GitTime/Supporting Files/Info.plist +++ b/GitTime/Supporting Files/Info.plist @@ -85,7 +85,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.1.0 + 2.1.1 CFBundleURLTypes @@ -100,7 +100,7 @@ CFBundleVersion - 2 + 3 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/Podfile.lock b/Podfile.lock index c59da21..09e3573 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - AcknowList (2.0.2) + - AcknowList (2.0.3) - Alamofire (5.4.4) - Bagel (1.4.0): - CocoaAsyncSocket @@ -279,7 +279,7 @@ CHECKOUT OPTIONS: :git: https://github.com/devxoul/Toaster.git SPEC CHECKSUMS: - AcknowList: 209323b0f72625a61e1325f4e67a39015b62d48b + AcknowList: 6d4faca4c3e0173377fe5649e086d627cd60b003 Alamofire: f3b09a368f1582ab751b3fff5460276e0d2cf5c9 Bagel: c3fa6bcbd52db9ca976edbafd7638f0553ded101 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 @@ -332,4 +332,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: ecfb47752adb4f2669fe0fbed01e71aadb792c5e -COCOAPODS: 1.10.0 +COCOAPODS: 1.11.2