diff --git a/data/strings/strings.txt b/data/strings/strings.txt index 92ea09cee1..eac62f03fc 100644 --- a/data/strings/strings.txt +++ b/data/strings/strings.txt @@ -30325,7 +30325,8 @@ fa = اجازه دهید صفحه نمایش بخوابد [enable_screen_sleep_description] - comment = + comment = Description in preferences + tags = android en = When enabled the screen will be allowed to sleep after a period of inactivity. ru = При включении экран может переходить в спящий режим после периода бездействия. ar = عند التمكين ، سيتم السماح للشاشة بالنوم بعد فترة من عدم النشاط. @@ -30357,3 +30358,167 @@ he = כאשר מופעל המסך יורשה לישון לאחר תקופה של חוסר פעילות. sk = Ak je táto možnosť povolená, obrazovka bude môcť po určitej dobe nečinnosti spať. fa = درصورت فعال بودن ، بعد از یک دوره عدم فعالیت به صفحه اجازه خواب داده می شود. + + [whats_new_auto_update_title] + comment = Autoupdate dialog on start + tags = ios + en = Update your downloaded maps + ru = Обновите ваши загруженные карты + ar = قم بتحديث الخرائط التي قمت بنتزيلها + cs = Aktualizujte své stažené mapy + da = Opdater dine downloadede kort + nl = Werk uw gedownloade kaarten bij + fi = Päivitä ladatut kartat + fr = Mettez à jour vos cartes téléchargées + de = Aktualisieren Sie Ihre heruntergeladenen Karten + hu = Frissítse a letöltött térképeit + id = Perbarui peta yang sudah Anda unduh + it = Aggiorna le mappe scaricate + ja = ダウンロード済みのマップを更新してください + ko = 다운로드한 지도를 업데이트해야 합니다 + nb = Oppdater dine nedlastede kart + pl = Zaktualizuj pobrane mapy + pt = Atualize seus mapas transferidos + pt-BR = Atualize os mapas no seu dispositivo + ro = Actualizați hărțile descărcate + es = Actualice sus mapas descargados + sv = Uppdatera dina nedladdade kartor + th = อัปเดตแผนที่ที่คุณดาวน์โหลดมา + tr = İndirdiğiniz haritaları güncelleyin + uk = Оновити завантажені карти + vi = Cập nhật các bản đồ đã tải về của bạn + zh-Hans = 更新已下载的地图 + zh-Hant = 更新您下載的地圖 + af = Werk jou afgelaaide kaarte by + be = Абнавіце спампаваныя карты + el = Θα πρέπει να ενημερώστε τους χάρτες που έχετε κατεβάσει + es_MX = Debe actualizar sus mapas descargados + fr_CA = Mettez à jour vos cartes téléchargées + he = עדכן את המפות שהורדת + hi = अपने डाउनलोड किए गए मानचित्र अपडेट करें + sk = Aktualizujte svoje stiahnuté mapy + sw = Sasisha ramani zako ulizopakua + fa = نقشه های دانلود شده خود را به روز کنید + + [whats_new_auto_update_message] + comment = Autoupdate dialog on start + tags = ios + en = Updating maps keeps the information about objects up to date + ru = Обновление карт поддерживает информацию об объектах в актуальном состоянии + ar = تحديث الخرائط والاحتفاظ بالمعلومات حول الكائنات محدثة + cs = Aktualizace map zajišťuje aktuální informace o objektech + da = Opdatering af kort sikrer, at oplysningerne om objekter er aktuel + nl = Kaarten bijwerken houdt de informatie over objecten actueel + fi = Karttojen päivittäminen pitää kohteita koskevat tiedot ajan tasalla + fr = Actualiser les cartes permet d'actualiser également les informations sur les objets + de = Das Aktualisieren der Karten sorgt dafür, dass die Objektinformationen stets auf dem neuesten Stand sind + hu = A térképek frissítésével naprakészen tarthatja az objektumokra vonatkozó adatokat + id = Memperbarui peta membuat informasi tentang objek tetap terkini + it = Aggiornamento mappe mantiene aggiornate le informazioni sugli oggetti + ja = 地図を更新することで物件情報を最新の状態に保ちます + ko = 지도를 업데이트하면 개체에 대한 정보가 최신 상태로 유지됩니다. + nb = Ved å oppdatere kart holder du også informasjonen om ulike elementer oppdatert + pl = Aktualizacja map umożliwia uzyskanie bieżących informacji o obiektach + pt = Atualizar os mapas mantém atualizada a informação sobre objetos + pt-BR = A atualização de mapas mantém as informações sobre objetos atualizadas + ro = Actualizarea hărților vă ajută să păstrați actualizate informațiile despre obiecte + es = La actualización de mapas mantiene actualizada la información sobre objetos + sv = Uppdatering av kartor håller information om objekt uppdaterade + th = การอัปเดตแผนที่จะคงข้อมูลเกี่ยวกับจุดหมายต่าง ๆ ให้ล่าสุดอยู่เสมอ + tr = Haritaları güncellemek, nesnelerle ilgili bilgilerin güncel kalmasını sağlar + uk = Оновлення карт дозволяє підтримувати інформацію про об'єкти в актуальному стані + vi = Cập nhật bản đồ để cập nhật thông tin về các đối tượng trên đó + zh-Hans = 更新地图可以让对象的信息保持最新状态 + zh-Hant = 更新地圖以讓物件資訊保持在最新狀態 + af = As jy kaarte bywerk, bly inligting oor voorwerpe op datum + be = Абнаўленне карт падтрымлівае актуальнасць звестак пра аб’екты + el = Η ενημέρωση των χαρτών διατηρεί τις πληροφορίες των στοιχείων επικαιροποιημένες + es_MX = Actualizar los mapas mantiene actualizada también la información acerca de los objetos + fr_CA = La mise à jour des cartes permet d'avoir des informations à jour sur les objets + he = עדכון המפות שומר על המידע שבהן עדכני + hi = मानचित्रों का अपडेट होना ऑब्जेक्ट्स के बारे में जानकारी अप टू डेट रखता है + sk = Vďaka aktualizácii máp budú informácie o objektoch na mape aktualizované + sw = Kusasisha ramani kunaweka taarifa kuhusu vipengee ikiwa ya hivi sasa zaidi + fa = به روز رسانی نقشه ها اطلاعات مربوط به اشیا را به روز نگه می دارد + + [whats_new_auto_update_button_size] + comment = Autoupdate dialog on start + tags = ios + en = Update (%s) + ru = Обновить (%s) + ar = تحديث (%s) + cs = Aktualizace (%s) + da = Opdater (%s) + nl = Bijwerken (%s) + fi = Päivitä (%s) + fr = Mettre à jour (%s) + de = Aktualisieren (%s) + hu = Frissítés (%s) + id = Pembaruan (%s) + it = Aggiorna (%s) + ja = 更新 (%s) + ko = 업데이트(%s) + nb = Oppdater (%s) + pl = Zaktualizuj (%s) + pt = Atualização (%s) + pt-BR = Atualizar (%s) + ro = Actualizare (%s) + es = Actualizar (%s) + sv = Uppdatera (%s) + th = อัปเดต (%s) + tr = Güncelle (%s) + uk = Оновити (%s) + vi = Cập nhật (%s) + zh-Hans = 更新 (%s) + zh-Hant = 更新 (%s) + af = Werk by (%s) + be = Абнавіць (%s) + el = Ενημέρωση (%s) + es_MX = Actualizar (%s) + fr_CA = Mettre à jour (%s) + he = עדכן (%s) + hi = (%s) अपडेट करें + sk = Aktualizovať (%s) + sw = Sasisha (%s) + fa = بروزرسانی (%s) + + [whats_new_auto_update_button_later] + comment = Autoupdate dialog on start + tags = ios + en = Manually update later + ru = Обновить вручную позже + ar = تحديث يدوياً في وقت لاحق + cs = Aktualizovat ručně později + da = Opdater manuelt senere + nl = Later handmatig bijwerken + fi = Päivitä manuaalisesti myöhemmin + fr = Mettre à jour manuellement plus tard + de = Später manuell aktualisieren + hu = Kézi frissítés később + id = Perbarui secara manual nanti + it = Aggiorna manualmente più tardi + ja = あとで手動で更新 + ko = 나중에 수동으로 업데이트 + nb = Oppdater manuelt senere + pl = Zaktualizuj ręcznie później + pt = Atualizar manualmente mais tarde + pt-BR = Atualizar manualmente mais tarde + ro = Actualizare manuală mai târziu + es = Actualizar más tarde de forma manual + sv = Uppdatera senare manuellt + th = อัปเดตด้วยตนเองภายหลัง + tr = Daha sonra manüel olarak güncelle + uk = Оновити вручну пізніше + vi = Cập nhật thủ công sau + zh-Hans = 稍后手动更新 + zh-Hant = 稍後手動更新 + af = Werk later handmatig by + be = Абнавіць пазней уручную + el = Χειροκίνητη ενημέρωση αργότερα + es_MX = Actualizar después manualmente + fr_CA = Plus tard (manuel) + he = עדכן ידנית מאוחר יותר + hi = बाद में मैनुअल रूप से अपडेट करें + sk = Manuálne aktualizovať neskôr + sw = Sasisha mwenyewe baadaye + fa = بعدا به صورت دستی به روزرسانی کنید diff --git a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm index ef15da70ae..6814644465 100644 --- a/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm +++ b/iphone/Maps/Classes/CustomAlert/AlertController/MWMAlertViewController.mm @@ -55,8 +55,7 @@ static NSString *const kAlertControllerNibIdentifier = @"MWMAlertViewController" } - (void)presentLocationAlertWithCancelBlock:(MWMVoidBlock)cancelBlock { - if (![MapViewController sharedController].welcomePageController) - [self displayAlert:[MWMAlert locationAlertWithCancelBlock:cancelBlock]]; + [self displayAlert:[MWMAlert locationAlertWithCancelBlock:cancelBlock]]; } - (void)presentPoint2PointAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock needToRebuild:(BOOL)needToRebuild { [self displayAlert:[MWMAlert point2PointAlertWithOkBlock:okBlock needToRebuild:needToRebuild]]; diff --git a/iphone/Maps/Classes/MapViewController.h b/iphone/Maps/Classes/MapViewController.h index 4ed2259a04..a6ad1d1adc 100644 --- a/iphone/Maps/Classes/MapViewController.h +++ b/iphone/Maps/Classes/MapViewController.h @@ -2,7 +2,6 @@ #import "MWMViewController.h" #import "MWMMyPositionMode.h" -@class MWMWelcomePageController; @class MWMMapViewControlsManager; @class EAGLView; @class MWMMapDownloadDialog; @@ -42,7 +41,6 @@ - (void)dismissPlacePage; @property(nonatomic, readonly) MWMMapViewControlsManager * _Nonnull controlsManager; -@property(nonatomic) MWMWelcomePageController * _Nullable welcomePageController; @property(nonatomic, readonly) MWMMapDownloadDialog * _Nonnull downloadDialog; @property(nonatomic, readonly) BookmarksCoordinator * _Nonnull bookmarksCoordinator; diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 621b4211a3..cc564384dd 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -67,7 +67,6 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing"; @end @interface MapViewController () @@ -274,7 +273,6 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing"; [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; [self.alertController viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; [self.controlsManager viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; - [self.welcomePageController viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; } - (void)didReceiveMemoryWarning { @@ -316,12 +314,12 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing"; if (self.needDeferFocusNotification) [self onGetFocus:self.deferredFocusValue]; - [self.mapView setLaunchByDeepLink:DeepLinkHandler.shared.isLaunchedByDeeplink]; + BOOL const isLaunchedByDeeplink = DeepLinkHandler.shared.isLaunchedByDeeplink; + [self.mapView setLaunchByDeepLink:isLaunchedByDeeplink]; [MWMRouter restoreRouteIfNeeded]; self.view.clipsToBounds = YES; [MWMKeyboard addObserver:self]; - self.welcomePageController = [MWMWelcomePageController controllerWithParent:self]; if ([FirstSession isFirstSession]) { @@ -339,10 +337,20 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing"; if ([MWMNavigationDashboardManager sharedManager].state == MWMNavigationDashboardStateHidden) self.controlsManager.menuState = self.controlsManager.menuRestoreState; - [self.welcomePageController show]; - if (!self.welcomePageController) { + // TODO(vng): Uncomment update dialog when we're ready to handle more traffic. +// auto const todo = GetFramework().ToDoAfterUpdate(); +// switch (todo) { +// case Framework::DoAfterUpdate::Migrate: +// case Framework::DoAfterUpdate::Nothing: +// break; +// case Framework::DoAfterUpdate::AutoupdateMaps: +// case Framework::DoAfterUpdate::AskForUpdateMaps: +// [self presentViewController:[MWMAutoupdateController instanceWithPurpose:todo] animated:YES completion:nil]; +// break; +// } + + if (isLaunchedByDeeplink) [DeepLinkHandler.shared handleDeeplink]; - } } - (void)viewDidLayoutSubviews { @@ -356,23 +364,6 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing"; [MapsAppDelegate customizeAppearance]; } -- (void)closePageController:(MWMWelcomePageController *)pageController { - if ([pageController isEqual:self.welcomePageController]) - self.welcomePageController = nil; - - auto const todo = GetFramework().ToDoAfterUpdate(); - - switch (todo) { - case Framework::DoAfterUpdate::Migrate: - case Framework::DoAfterUpdate::Nothing: - break; - case Framework::DoAfterUpdate::AutoupdateMaps: - case Framework::DoAfterUpdate::AskForUpdateMaps: - [self presentViewController:[MWMAutoupdateController instanceWithPurpose:todo] animated:YES completion:nil]; - break; - } -} - - (void)showViralAlertIfNeeded { NSUserDefaults *ud = NSUserDefaults.standardUserDefaults; @@ -526,13 +517,9 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing"; } BOOL const isMapVisible = (self.navigationController.visibleViewController == self); if (isMapVisible && ![MWMLocationManager isLocationProhibited]) { - if (self.welcomePageController) { + [self.alertController presentLocationNotFoundAlertWithOkBlock:^{ GetFramework().SwitchMyPositionNextMode(); - } else { - [self.alertController presentLocationNotFoundAlertWithOkBlock:^{ - GetFramework().SwitchMyPositionNextMode(); - }]; - } + }]; } } diff --git a/iphone/Maps/Images.xcassets/Autoupdate/Contents.json b/iphone/Maps/Images.xcassets/Autoupdate/Contents.json deleted file mode 100644 index da4a164c91..0000000000 --- a/iphone/Maps/Images.xcassets/Autoupdate/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/Autoupdate/wn_autoupdate.imageset/Contents.json b/iphone/Maps/Images.xcassets/Autoupdate/wn_autoupdate.imageset/Contents.json deleted file mode 100644 index ec7011bbd8..0000000000 --- a/iphone/Maps/Images.xcassets/Autoupdate/wn_autoupdate.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "wn_autoupdate.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "wn_autoupdate@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "wn_autoupdate@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/Autoupdate/wn_autoupdate.imageset/wn_autoupdate.png b/iphone/Maps/Images.xcassets/Autoupdate/wn_autoupdate.imageset/wn_autoupdate.png deleted file mode 100644 index 4f8ee6cdd7..0000000000 Binary files a/iphone/Maps/Images.xcassets/Autoupdate/wn_autoupdate.imageset/wn_autoupdate.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/Autoupdate/wn_autoupdate.imageset/wn_autoupdate@2x.png b/iphone/Maps/Images.xcassets/Autoupdate/wn_autoupdate.imageset/wn_autoupdate@2x.png deleted file mode 100644 index 4c1d2221d1..0000000000 Binary files a/iphone/Maps/Images.xcassets/Autoupdate/wn_autoupdate.imageset/wn_autoupdate@2x.png and /dev/null differ diff --git a/iphone/Maps/Images.xcassets/Autoupdate/wn_autoupdate.imageset/wn_autoupdate@3x.png b/iphone/Maps/Images.xcassets/Autoupdate/wn_autoupdate.imageset/wn_autoupdate@3x.png deleted file mode 100644 index f64391749b..0000000000 Binary files a/iphone/Maps/Images.xcassets/Autoupdate/wn_autoupdate.imageset/wn_autoupdate@3x.png and /dev/null differ diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index b15e1f9ed8..0489c81fb9 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -98,7 +98,6 @@ 3490D2DF1CE9DD2500D0B838 /* MWMSideButtons.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3490D2DA1CE9DD2500D0B838 /* MWMSideButtons.mm */; }; 3490D2E11CE9DD2500D0B838 /* MWMSideButtonsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3490D2DC1CE9DD2500D0B838 /* MWMSideButtonsView.mm */; }; 3490D2E31CE9DD2500D0B838 /* MWMSideButtonsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3490D2DD1CE9DD2500D0B838 /* MWMSideButtonsView.xib */; }; - 34943BBB1E2626B200B14F84 /* WelcomePageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34943BB91E2626B200B14F84 /* WelcomePageController.swift */; }; 349A13831DEC138C00C7DB60 /* MWMMobileInternetAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = 349A13801DEC138C00C7DB60 /* MWMMobileInternetAlert.m */; }; 349A13851DEC138C00C7DB60 /* MWMMobileInternetAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349A13811DEC138C00C7DB60 /* MWMMobileInternetAlert.xib */; }; 349D1ABC1E2D05EF004A2006 /* SearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349D1ABA1E2D05EF004A2006 /* SearchBar.swift */; }; @@ -499,12 +498,8 @@ 99C9642B2428C0F700E41723 /* PlacePageHeaderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99C964252428C0F700E41723 /* PlacePageHeaderViewController.swift */; }; 99C9642C2428C0F700E41723 /* PlacePageHeaderBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99C964262428C0F700E41723 /* PlacePageHeaderBuilder.swift */; }; 99C964302428C27A00E41723 /* PlacePageHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99C9642F2428C27A00E41723 /* PlacePageHeaderView.swift */; }; - 99CB34B72369E188001D28AD /* WelcomeRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99CB34B62369E188001D28AD /* WelcomeRouter.swift */; }; - 99CB34C5236B00FD001D28AD /* WelcomeStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99CB34C4236B00FD001D28AD /* WelcomeStorage.swift */; }; 99DEF9D723E420F6006BFD21 /* ElevationProfileDescriptionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99DEF9D623E420F6006BFD21 /* ElevationProfileDescriptionCell.swift */; }; 99E2B0122368A8C700FFABC5 /* MWMCategory+PlacesCountTitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99E2B0112368A8C700FFABC5 /* MWMCategory+PlacesCountTitle.swift */; }; - 99E2B01E23698B0800FFABC5 /* WelcomeProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99E2B01D23698B0800FFABC5 /* WelcomeProtocols.swift */; }; - 99E2B0232369904800FFABC5 /* WelcomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99E2B0222369904800FFABC5 /* WelcomeViewController.swift */; }; 99F3EB0323F4178200C713F8 /* PlacePageCommonLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99F3EB0223F4178200C713F8 /* PlacePageCommonLayout.swift */; }; 99F3EB0623F418A200C713F8 /* PlacePagePresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99F3EB0523F418A200C713F8 /* PlacePagePresenter.swift */; }; 99F3EB1123F418C900C713F8 /* PlacePageBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99F3EB0B23F418C900C713F8 /* PlacePageBuilder.swift */; }; @@ -836,7 +831,6 @@ 3490D2DB1CE9DD2500D0B838 /* MWMSideButtonsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSideButtonsView.h; sourceTree = ""; }; 3490D2DC1CE9DD2500D0B838 /* MWMSideButtonsView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSideButtonsView.mm; sourceTree = ""; }; 3490D2DD1CE9DD2500D0B838 /* MWMSideButtonsView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSideButtonsView.xib; sourceTree = ""; }; - 34943BB91E2626B200B14F84 /* WelcomePageController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomePageController.swift; sourceTree = ""; }; 349A137F1DEC138C00C7DB60 /* MWMMobileInternetAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMobileInternetAlert.h; sourceTree = ""; }; 349A13801DEC138C00C7DB60 /* MWMMobileInternetAlert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = MWMMobileInternetAlert.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 349A13811DEC138C00C7DB60 /* MWMMobileInternetAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMMobileInternetAlert.xib; sourceTree = ""; }; @@ -1319,12 +1313,8 @@ 99C964252428C0F700E41723 /* PlacePageHeaderViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlacePageHeaderViewController.swift; sourceTree = ""; }; 99C964262428C0F700E41723 /* PlacePageHeaderBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlacePageHeaderBuilder.swift; sourceTree = ""; }; 99C9642F2428C27A00E41723 /* PlacePageHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlacePageHeaderView.swift; sourceTree = ""; }; - 99CB34B62369E188001D28AD /* WelcomeRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeRouter.swift; sourceTree = ""; }; - 99CB34C4236B00FD001D28AD /* WelcomeStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeStorage.swift; sourceTree = ""; }; 99DEF9D623E420F6006BFD21 /* ElevationProfileDescriptionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElevationProfileDescriptionCell.swift; sourceTree = ""; }; 99E2B0112368A8C700FFABC5 /* MWMCategory+PlacesCountTitle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MWMCategory+PlacesCountTitle.swift"; sourceTree = ""; }; - 99E2B01D23698B0800FFABC5 /* WelcomeProtocols.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeProtocols.swift; sourceTree = ""; }; - 99E2B0222369904800FFABC5 /* WelcomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeViewController.swift; sourceTree = ""; }; 99F3EB0223F4178200C713F8 /* PlacePageCommonLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlacePageCommonLayout.swift; sourceTree = ""; }; 99F3EB0523F418A200C713F8 /* PlacePagePresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlacePagePresenter.swift; sourceTree = ""; }; 99F3EB0B23F418C900C713F8 /* PlacePageBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlacePageBuilder.swift; sourceTree = ""; }; @@ -2270,15 +2260,6 @@ path = Framework; sourceTree = ""; }; - 34943BB01E2620C600B14F84 /* Welcome */ = { - isa = PBXGroup; - children = ( - 34943BB91E2626B200B14F84 /* WelcomePageController.swift */, - 99CB34D1236B0C2A001D28AD /* WelcomeView */, - ); - path = Welcome; - sourceTree = ""; - }; 349A137E1DEC138C00C7DB60 /* MobileInternetAlert */ = { isa = PBXGroup; children = ( @@ -2890,17 +2871,6 @@ path = PlacePageHeader; sourceTree = ""; }; - 99CB34D1236B0C2A001D28AD /* WelcomeView */ = { - isa = PBXGroup; - children = ( - 99E2B01D23698B0800FFABC5 /* WelcomeProtocols.swift */, - 99E2B0222369904800FFABC5 /* WelcomeViewController.swift */, - 99CB34B62369E188001D28AD /* WelcomeRouter.swift */, - 99CB34C4236B00FD001D28AD /* WelcomeStorage.swift */, - ); - path = WelcomeView; - sourceTree = ""; - }; 99DEF9D523E420D2006BFD21 /* ElevationProfile */ = { isa = PBXGroup; children = ( @@ -3226,7 +3196,6 @@ F6E2FCE11E097B9F0083EBEC /* Search */, F6E2FD361E097BA00083EBEC /* Settings */, 340E1EE31E2F614400CE49BF /* Storyboard */, - 34943BB01E2620C600B14F84 /* Welcome */, ); path = UI; sourceTree = ""; @@ -3977,7 +3946,6 @@ 99536113235DB86C008B218F /* InsetsLabel.swift in Sources */, 6741A9A51BF340DE002C974C /* MWMShareActivityItem.mm in Sources */, 994F790723E85C5900660E75 /* DifficultyView.swift in Sources */, - 99E2B0232369904800FFABC5 /* WelcomeViewController.swift in Sources */, F6E2FF5D1E097BA00083EBEC /* MWMRecentTrackSettingsController.mm in Sources */, 34AB66651FC5AA330078E451 /* TransportTransitTrain.swift in Sources */, 993DF11C23F6BDB100AC231A /* UITableViewHeaderFooterViewRenderer.swift in Sources */, @@ -4199,7 +4167,6 @@ 993DF0CB23F6BD0600AC231A /* ElevationDetailsRouter.swift in Sources */, 47CA68FC250F99E500671019 /* BookmarksListCellStrategy.swift in Sources */, B33D21B820E130D000BAD749 /* BookmarksTabViewController.swift in Sources */, - 99CB34C5236B00FD001D28AD /* WelcomeStorage.swift in Sources */, 34AB662F1FC5AA330078E451 /* RouteManagerPresentationController.swift in Sources */, 993F5508237C622700545511 /* DeepLinkRouteStrategyAdapter.mm in Sources */, 99A906ED23F6F7030005872B /* PlacePagePreviewViewController.swift in Sources */, @@ -4246,7 +4213,6 @@ F6E2FD6B1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.m in Sources */, CDCA27842245090900167D87 /* ListenerContainer.swift in Sources */, 47E3C7252111E41B008B3B27 /* DimmedModalPresentationController.swift in Sources */, - 99CB34B72369E188001D28AD /* WelcomeRouter.swift in Sources */, 3472B5CB200F43EF00DC6CD5 /* BackgroundFetchScheduler.swift in Sources */, 34FE5A6F1F18F30F00BCA729 /* TrafficButtonArea.swift in Sources */, 993DF10D23F6BDB100AC231A /* UIPageControlRenderer.swift in Sources */, @@ -4308,7 +4274,6 @@ F6E2FEE21E097BA00083EBEC /* MWMSearchManager.mm in Sources */, F6E2FE221E097BA00083EBEC /* MWMOpeningHoursEditorViewController.mm in Sources */, 999FC12B23ABB4B800B0E6F9 /* FontStyleSheet.swift in Sources */, - 34943BBB1E2626B200B14F84 /* WelcomePageController.swift in Sources */, 47CA68DA2500469400671019 /* BookmarksListBuilder.swift in Sources */, 34D3AFE21E376F7E004100F9 /* UITableView+Updates.swift in Sources */, 3404164C1E7BF42E00E2B6D6 /* UIView+Coordinates.swift in Sources */, @@ -4320,7 +4285,6 @@ F63AF5061EA6162400A1DB98 /* FilterTypeCell.swift in Sources */, 993DF10623F6BDB100AC231A /* UIColor+rgba.swift in Sources */, 47E3C7332111F4D8008B3B27 /* CoverVerticalDismissalAnimator.swift in Sources */, - 99E2B01E23698B0800FFABC5 /* WelcomeProtocols.swift in Sources */, 471AB99423ABA3BD00F56D49 /* SearchMapsDataSource.swift in Sources */, 47CA68F1250B54AF00671019 /* BookmarkCell.swift in Sources */, 993F550F237C622700545511 /* DeepLinkMapStrategy.swift in Sources */, diff --git a/iphone/Maps/UI/Autoupdate/MWMAutoupdateController.xib b/iphone/Maps/UI/Autoupdate/MWMAutoupdateController.xib index e50e4cb92a..940a3906da 100644 --- a/iphone/Maps/UI/Autoupdate/MWMAutoupdateController.xib +++ b/iphone/Maps/UI/Autoupdate/MWMAutoupdateController.xib @@ -1,7 +1,9 @@ - + + - + + @@ -24,7 +26,7 @@ - + @@ -196,6 +198,6 @@ - + diff --git a/iphone/Maps/UI/Welcome/WelcomePageController.swift b/iphone/Maps/UI/Welcome/WelcomePageController.swift deleted file mode 100644 index f7fc480783..0000000000 --- a/iphone/Maps/UI/Welcome/WelcomePageController.swift +++ /dev/null @@ -1,151 +0,0 @@ -@objc(MWMWelcomePageControllerProtocol) -protocol WelcomePageControllerProtocol { - var view: UIView! { get set } - - func addChildViewController(_ childController: UIViewController) - func closePageController(_ pageController: WelcomePageController) -} - -@objc(MWMWelcomePageController) -final class WelcomePageController: UIPageViewController { - - fileprivate var controllers: [UIViewController] = [] - private var parentController: WelcomePageControllerProtocol! - private var iPadBackgroundView: SolidTouchView? - private var isAnimatingTransition = true - fileprivate var currentController: UIViewController! { - get { - return viewControllers?.first - } - set { - guard let controller = newValue, let parentView = parentController.view else { return } - let animated = !isAnimatingTransition - parentView.isUserInteractionEnabled = isAnimatingTransition - setViewControllers([controller], direction: .forward, animated: animated) { [weak self] _ in - guard let s = self else { return } - s.isAnimatingTransition = false - parentView.isUserInteractionEnabled = true - } - isAnimatingTransition = animated - } - } - - static func shouldShowWelcome() -> Bool { -// return WelcomeStorage.shouldShowTerms || -// Alohalytics.isFirstSession() || -// (WelcomeStorage.shouldShowWhatsNew && !DeepLinkHandler.shared.isLaunchedByDeeplink) - return false - } - - @objc static func controller(parent: WelcomePageControllerProtocol) -> WelcomePageController? { - guard WelcomePageController.shouldShowWelcome() else { - return nil - } - - let vc = WelcomePageController(transitionStyle: .scroll , - navigationOrientation: .horizontal, - options: convertToOptionalUIPageViewControllerOptionsKeyDictionary([:])) - vc.parentController = parent - - var controllersToShow: [UIViewController] = [] - vc.controllers = controllersToShow - return vc - } - - override func viewDidLoad() { - super.viewDidLoad() - view.styleName = "Background" - iPadSpecific { - let parentView = parentController.view! - iPadBackgroundView = SolidTouchView(frame: parentView.bounds) - iPadBackgroundView!.styleName = "FadeBackground" - iPadBackgroundView!.autoresizingMask = [.flexibleWidth, .flexibleHeight] - parentView.addSubview(iPadBackgroundView!) - view.layer.cornerRadius = 5 - view.clipsToBounds = true - } - currentController = controllers.first - } - - func nextPage() { - currentController = pageViewController(self, viewControllerAfter: currentController) - } - - func close() { - iPadBackgroundView?.removeFromSuperview() - view.removeFromSuperview() - removeFromParent() - parentController.closePageController(self) - FrameworkHelper.processFirstLaunch(LocationManager.lastLocation() != nil) - } - - @objc func show() { - parentController.addChildViewController(self) - parentController.view.addSubview(view) - updateFrame() - } - - private func updateFrame() { - let parentView = parentController.view! - let size = WelcomeViewController.presentationSize - view.frame = alternative(iPhone: CGRect(origin: CGPoint(), size: parentView.size), - iPad: CGRect(x: parentView.center.x - size.width/2, - y: parentView.center.y - size.height/2, - width: size.width, - height: size.height)) - } - - override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { - super.viewWillTransition(to: size, with: coordinator) - coordinator.animate(alongsideTransition: { [weak self] _ in self?.updateFrame() }, completion: nil) - } -} - -extension WelcomePageController: UIPageViewControllerDataSource { - - func pageViewController(_: UIPageViewController, viewControllerBefore viewController: UIViewController) -> UIViewController? { - guard viewController != controllers.first else { return nil } - let index = controllers.index(before: controllers.firstIndex(of: viewController)!) - return controllers[index] - } - - func pageViewController(_: UIPageViewController, viewControllerAfter viewController: UIViewController) -> UIViewController? { - guard viewController != controllers.last else { return nil } - let index = controllers.index(after: controllers.firstIndex(of: viewController)!) - return controllers[index] - } - - func presentationCount(for _: UIPageViewController) -> Int { - return controllers.count - } - - func presentationIndex(for _: UIPageViewController) -> Int { - guard let vc = currentController else { return 0 } - return controllers.firstIndex(of: vc)! - } -} - -extension WelcomePageController: WelcomeViewDelegate { - func welcomeDidPressNext(_ viewContoller: UIViewController) { - guard let index = controllers.firstIndex(of: viewContoller) else { - close() - return - } - if index + 1 < controllers.count { - nextPage() - } else { - close() - DeepLinkHandler.shared.handleDeeplink() - } - } - - func welcomeDidPressClose(_ viewContoller: UIViewController) { - close() - } -} - -// Helper function inserted by Swift 4.2 migrator. -fileprivate func convertToOptionalUIPageViewControllerOptionsKeyDictionary(_ input: [String: Any]?) -> [UIPageViewController.OptionsKey: Any]? { - guard let input = input else { return nil } - return Dictionary(uniqueKeysWithValues: input.map { key, value in (UIPageViewController.OptionsKey(rawValue: key), value)}) -} diff --git a/iphone/Maps/UI/Welcome/WelcomeView/WelcomeProtocols.swift b/iphone/Maps/UI/Welcome/WelcomeView/WelcomeProtocols.swift deleted file mode 100644 index 9d40a27ac7..0000000000 --- a/iphone/Maps/UI/Welcome/WelcomeView/WelcomeProtocols.swift +++ /dev/null @@ -1,14 +0,0 @@ -protocol IWelcomeConfig { - var image: UIImage? { get } - var title: String { get } - var text: String { get } - var buttonNextTitle: String { get } - var isCloseButtonHidden: Bool { get } -} - -protocol IWelcomePresenter: class { - func configure() - func onAppear() - func onNext() - func onClose() -} diff --git a/iphone/Maps/UI/Welcome/WelcomeView/WelcomeRouter.swift b/iphone/Maps/UI/Welcome/WelcomeView/WelcomeRouter.swift deleted file mode 100644 index bb23cedf6a..0000000000 --- a/iphone/Maps/UI/Welcome/WelcomeView/WelcomeRouter.swift +++ /dev/null @@ -1,33 +0,0 @@ -protocol WelcomeViewDelegate: class { - func welcomeDidPressNext(_ viewContoller: UIViewController) - func welcomeDidPressClose(_ viewContoller: UIViewController) -} - -protocol WelcomeRouterProtocol { - func onNext() - func onClose() -} - -class WelcomeRouter { - private weak var viewController: UIViewController? - private weak var delegate: WelcomeViewDelegate? - - init (viewController: UIViewController, delegate: WelcomeViewDelegate) { - self.viewController = viewController - self.delegate = delegate - } -} - -extension WelcomeRouter: WelcomeRouterProtocol { - func onNext() { - if let viewController = viewController { - delegate?.welcomeDidPressNext(viewController) - } - } - - func onClose() { - if let viewController = viewController { - delegate?.welcomeDidPressClose(viewController) - } - } -} diff --git a/iphone/Maps/UI/Welcome/WelcomeView/WelcomeStorage.swift b/iphone/Maps/UI/Welcome/WelcomeView/WelcomeStorage.swift deleted file mode 100644 index 1106870e90..0000000000 --- a/iphone/Maps/UI/Welcome/WelcomeView/WelcomeStorage.swift +++ /dev/null @@ -1,35 +0,0 @@ -class WelcomeStorage { - private enum UserDefaultsKeys { - static let needTermsKey = "TermsOfUseController_needTerms" - static let ppLinkKey = "TermsOfUseController_ppLink" - static let tosLinkKey = "TermsOfUseController_tosLink" - static let acceptTimeKey = "TermsOfUseController_acceptTime" - } - - static var privacyPolicyLink: String { - get { - return UserDefaults.standard.string(forKey: UserDefaultsKeys.ppLinkKey) ?? "" - } - set { - UserDefaults.standard.set(newValue, forKey: UserDefaultsKeys.ppLinkKey) - } - } - - static var termsOfUseLink: String { - get { - return UserDefaults.standard.string(forKey: UserDefaultsKeys.tosLinkKey) ?? "" - } - set { - UserDefaults.standard.set(newValue, forKey: UserDefaultsKeys.tosLinkKey) - } - } - - static var acceptTime: Date { - get { - return Date(timeIntervalSince1970: UserDefaults.standard.double(forKey: UserDefaultsKeys.acceptTimeKey)) - } - set { - UserDefaults.standard.set(newValue.timeIntervalSince1970, forKey: UserDefaultsKeys.acceptTimeKey) - } - } -} diff --git a/iphone/Maps/UI/Welcome/WelcomeView/WelcomeViewController.swift b/iphone/Maps/UI/Welcome/WelcomeView/WelcomeViewController.swift deleted file mode 100644 index dd4e108254..0000000000 --- a/iphone/Maps/UI/Welcome/WelcomeView/WelcomeViewController.swift +++ /dev/null @@ -1,84 +0,0 @@ -protocol IWelcomeView: class { - var presenter: IWelcomePresenter? { get set } - - func configure(config: IWelcomeConfig) - func setTitle(_ title: String) - func setText(_ text: String) - func setNextButtonTitle(_ title: String) - func setTitleImage(_ titleImage: UIImage?) - var isCloseButtonHidden: Bool {get set} -} - -class WelcomeViewController: MWMViewController, UIAdaptivePresentationControllerDelegate { - var presenter: IWelcomePresenter? - - @IBOutlet private var image: UIImageView! - @IBOutlet private var alertTitle: UILabel! - @IBOutlet private var alertText: UILabel! - @IBOutlet private var nextButton: UIButton! - @IBOutlet private var closeButton: UIButton! - @IBOutlet private var closeButtonHeightConstraint: NSLayoutConstraint! - static var presentationSize = CGSize(width: 520, height: 600) - private let transitioning = FadeTransitioning() - - var isCloseButtonHidden: Bool = false { - didSet{ - closeButtonHeightConstraint.constant = isCloseButtonHidden ? 0 : 32 - } - } - - required init?(coder: NSCoder) { - super.init(coder: coder) - if UIDevice.current.userInterfaceIdiom == .pad { - transitioningDelegate = transitioning - modalPresentationStyle = .custom - } else { - modalPresentationStyle = .fullScreen - } - } - - override func viewDidLoad() { - super.viewDidLoad() - presenter?.configure() - self.preferredContentSize = WelcomeViewController.presentationSize - } - - override func viewDidAppear(_ animated: Bool) { - super.viewDidAppear(animated) - presenter?.onAppear() - } - - @IBAction func onNextButton(_ sender: UIButton) { - presenter?.onNext() - } - - @IBAction func onCloseButton(_ sender: UIButton) { - presenter?.onClose() - } -} - -extension WelcomeViewController: IWelcomeView { - func configure(config: IWelcomeConfig) { - setTitle(L(config.title)) - setText(L(config.text)) - setTitleImage(config.image) - setNextButtonTitle(L(config.buttonNextTitle)) - isCloseButtonHidden = config.isCloseButtonHidden - } - - func setTitle(_ title: String) { - alertTitle.text = title; - } - - func setText(_ text: String) { - alertText.text = text; - } - - func setNextButtonTitle(_ title: String) { - nextButton.setTitle(title, for: .normal) - } - - func setTitleImage(_ titleImage: UIImage?) { - image.image = titleImage - } -}