Skip to content

Commit

Permalink
Release 1.4.1 (171)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis15yo committed Oct 6, 2023
1 parent 162d11e commit 4f39db5
Show file tree
Hide file tree
Showing 2,665 changed files with 630,826 additions and 13,454 deletions.
15 changes: 5 additions & 10 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
build --action_env=ZERO_AR_DATE=1

build --apple_platform_type=ios
build --enable_platform_specific_config
build --apple_crosstool_top=@local_config_apple_cc//:toolchain
build --crosstool_top=@local_config_apple_cc//:toolchain
build --host_crosstool_top=@local_config_apple_cc//:toolchain

build --cxxopt='-std=c++17'
build --per_file_copt="third-party/webrtc/.*\.cpp$","@-std=c++17"
Expand All @@ -13,16 +17,7 @@ build --swiftcopt=-whole-module-optimization
build --per_file_copt=".*\.m$","@-fno-objc-msgsend-selector-stubs"
build --per_file_copt=".*\.mm$","@-fno-objc-msgsend-selector-stubs"

# Uncomment for address sanitizer
#build --swiftcopt=-sanitize=address
#build --copt=-fsanitize=address
#build --cxxopt=-fsanitize=address
#build --features=asan
#build --copt='-D_FORTIFY_SOURCE=0'
#build --copt='-D_FORTIFY_SOURCE=0'
#build --copt="-Wno-macro-redefined"
#build --cxxopt="-Wno-macro-redefined"
#build --linkopt="-fsanitize=address"
build --linkopt="-ld_classic"

build --features=debug_prefix_map_pwd_is_dot
build --features=swift.cacheable_swiftmodules
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.1.1
6.3.2
2 changes: 1 addition & 1 deletion .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build:
runs-on: macos-12
runs-on: macos-13

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: macos-12
runs-on: macos-13

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
url = https://github.com/bazelbuild/rules_swift.git
[submodule "build-system/bazel-rules/apple_support"]
path = build-system/bazel-rules/apple_support
url = https://github.com/ali-fareed/apple_support.git
url = https://github.com/bazelbuild/apple_support.git
[submodule "submodules/TgVoip/libtgvoip"]
path = submodules/TgVoip/libtgvoip
url = https://github.com/telegramdesktop/libtgvoip.git
Expand Down
86 changes: 0 additions & 86 deletions Nicegram/NGLoadingIndicator/Sources/NGLoadingIndicator.swift

This file was deleted.

31 changes: 29 additions & 2 deletions Nicegram/NGLottie/Sources/LottieViewImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class LottieViewImpl: UIView {
public override init(frame: CGRect) {
super.init(frame: frame)

animationView.backgroundBehavior = .pauseAndRestore

addSubview(animationView)
animationView.snp.makeConstraints { make in
make.edges.equalToSuperview()
Expand All @@ -31,7 +33,32 @@ extension LottieViewImpl: LottieView {
}
}

public func setAnimation(name: String, bundle: Bundle) {
animationView.animation = Animation.named(name, bundle: bundle)
public func setAnimation(fileUrl: URL?) {
guard let fileUrl else { return }
animationView.animation = Animation.filepath(
fileUrl._wrapperPath()
)
}

public func setLoopMode(_ loopMode: LoopMode) {
let mode: LottieLoopMode
switch loopMode {
case .playOnce:
mode = .playOnce
case .loop:
mode = .loop
case .autoReverse:
mode = .autoReverse
case .repeat(let float):
mode = .repeat(float)
case .repeatBackwards(let float):
mode = .repeatBackwards(float)
}

animationView.loopMode = mode
}

public func stop() {
animationView.stop()
}
}
1 change: 1 addition & 0 deletions Nicegram/NGOnboarding/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ swift_library(
"//submodules/UIKitRuntimeUtils:UIKitRuntimeUtils",
"//Nicegram/NGData:NGData",
"//Nicegram/NGStrings:NGStrings",
"@swiftpkg_nicegram_assistant_ios//:Sources_NGAiChat",
"@swiftpkg_nicegram_assistant_ios//:Sources_NGPremiumUI",
],
visibility = [
Expand Down
18 changes: 17 additions & 1 deletion Nicegram/NGOnboarding/Sources/OnboardingFlow.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Foundation
import UIKit
import NGAiChat
import NGData
import NGPremiumUI
import NGStrings
Expand All @@ -23,7 +24,22 @@ public func onboardingController(languageCode: String, onComplete: @escaping ()
}

private func onboardingPages(languageCode: String) -> [OnboardingPageViewModel] {
(1...6).map { index in
let aiPageIndex = 6

var pages = Array(1...6)

let isAiAvailable: Bool
if #available(iOS 13.0, *) {
let getAiAvailabilityUseCase = AiChatContainer.shared.getAiAvailabilityUseCase()
isAiAvailable = getAiAvailabilityUseCase()
} else {
isAiAvailable = false
}
if !isAiAvailable {
pages.removeAll { $0 == aiPageIndex }
}

return pages.map { index in
OnboardingPageViewModel(
title: l("NicegramOnboarding.\(index).Title", languageCode),
description: l("NicegramOnboarding.\(index).Desc", languageCode),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import Foundation

private let savedTranslationTargetLanguageKey = "ng:savedTranslationTargetLanguage"

public func getSavedTranslationTargetLanguage() -> String? {
func getSavedTranslationTargetLanguage() -> String? {
return UserDefaults.standard.string(forKey: savedTranslationTargetLanguageKey)
}

public func setSavedTranslationTargetLanguage(code: String) {
func setSavedTranslationTargetLanguage(code: String) {
UserDefaults.standard.set(code, forKey: savedTranslationTargetLanguageKey)
}
2 changes: 1 addition & 1 deletion Nicegram/NGUI/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ swift_library(
"//Nicegram/NGLogging:NGLogging",
"//Nicegram/NGStrings:NGStrings",
"//Nicegram/NGAppCache:NGAppCache",
"//Nicegram/NGLoadingIndicator:NGLoadingIndicator",
"//Nicegram/NGWebUtils:NGWebUtils",
"//Nicegram/NGEnv:NGEnv",
"//Nicegram/NGDoubleBottom:NGDoubleBottom",
"//Nicegram/NGQuickReplies:NGQuickReplies",
"//Nicegram/NGSecretMenu:NGSecretMenu",
"//Nicegram/NGStats:NGStats",
"@swiftpkg_nicegram_assistant_ios//:Sources_NGAiChatUI",
"@swiftpkg_nicegram_assistant_ios//:Sources_FeatImagesHubUI",
],
visibility = [
"//visibility:public",
Expand Down
Loading

0 comments on commit 4f39db5

Please sign in to comment.