Update to 5.3.1

This commit is contained in:
DrKLO 2019-02-08 05:30:32 +03:00
parent a724d96e9c
commit f338a88eb4
82 changed files with 5853 additions and 2807 deletions

View File

@ -111,7 +111,7 @@ android {
}
}
defaultConfig.versionCode = 1478
defaultConfig.versionCode = 1497
sourceSets.debug {
manifest.srcFile 'config/debug/AndroidManifest.xml'
@ -252,7 +252,7 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
versionName "5.2.1"
versionName "5.3.1"
vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']

View File

@ -1,4 +1,5 @@
LOCAL_PATH := $(call my-dir)
MY_LOCAL_PATH := $(call my-dir)
LOCAL_PATH := $(MY_LOCAL_PATH)
LOCAL_MODULE := avutil
@ -78,351 +79,8 @@ endif
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := voip
LOCAL_CPPFLAGS := -Wall -std=c++11 -DANDROID -finline-functions -ffast-math -Os -fno-strict-aliasing -O3 -frtti -D__STDC_LIMIT_MACROS -Wno-unknown-pragmas
LOCAL_CFLAGS := -O3 -DUSE_KISS_FFT -fexceptions -DWEBRTC_APM_DEBUG_DUMP=0 -DWEBRTC_POSIX -DWEBRTC_ANDROID -D__STDC_LIMIT_MACROS -DFIXED_POINT -DWEBRTC_NS_FLOAT
MY_DIR := libtgvoip
LOCAL_C_INCLUDES := jni/opus/include jni/boringssl/include/ jni/libtgvoip/webrtc_dsp/
ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI),armeabi-v7a arm64-v8a))
CC_NEON := cc.neon
LOCAL_CFLAGS += -DWEBRTC_HAS_NEON
else
CC_NEON := cc
endif
LOCAL_SRC_FILES := \
./libtgvoip/logging.cpp \
./libtgvoip/VoIPController.cpp \
./libtgvoip/VoIPGroupController.cpp \
./libtgvoip/Buffers.cpp \
./libtgvoip/BlockingQueue.cpp \
./libtgvoip/audio/AudioInput.cpp \
./libtgvoip/os/android/AudioInputOpenSLES.cpp \
./libtgvoip/MediaStreamItf.cpp \
./libtgvoip/audio/AudioOutput.cpp \
./libtgvoip/OpusEncoder.cpp \
./libtgvoip/os/android/AudioOutputOpenSLES.cpp \
./libtgvoip/JitterBuffer.cpp \
./libtgvoip/OpusDecoder.cpp \
./libtgvoip/os/android/OpenSLEngineWrapper.cpp \
./libtgvoip/os/android/AudioInputAndroid.cpp \
./libtgvoip/os/android/AudioOutputAndroid.cpp \
./libtgvoip/EchoCanceller.cpp \
./libtgvoip/CongestionControl.cpp \
./libtgvoip/VoIPServerConfig.cpp \
./libtgvoip/audio/Resampler.cpp \
./libtgvoip/NetworkSocket.cpp \
./libtgvoip/os/posix/NetworkSocketPosix.cpp \
./libtgvoip/PacketReassembler.cpp \
./libtgvoip/MessageThread.cpp \
./libtgvoip/json11.cpp \
./libtgvoip/audio/AudioIO.cpp \
./libtgvoip/video/VideoRenderer.cpp \
./libtgvoip/video/VideoSource.cpp \
./libtgvoip/os/android/VideoSourceAndroid.cpp \
./libtgvoip/os/android/VideoRendererAndroid.cpp
# WebRTC signal processing
LOCAL_SRC_FILES += \
./libtgvoip/webrtc_dsp/system_wrappers/source/field_trial.cc \
./libtgvoip/webrtc_dsp/system_wrappers/source/metrics.cc \
./libtgvoip/webrtc_dsp/system_wrappers/source/cpu_features.cc \
./libtgvoip/webrtc_dsp/absl/strings/internal/memutil.cc \
./libtgvoip/webrtc_dsp/absl/strings/string_view.cc \
./libtgvoip/webrtc_dsp/absl/strings/ascii.cc \
./libtgvoip/webrtc_dsp/absl/types/bad_optional_access.cc \
./libtgvoip/webrtc_dsp/absl/types/optional.cc \
./libtgvoip/webrtc_dsp/absl/base/internal/raw_logging.cc \
./libtgvoip/webrtc_dsp/absl/base/internal/throw_delegate.cc \
./libtgvoip/webrtc_dsp/rtc_base/race_checker.cc \
./libtgvoip/webrtc_dsp/rtc_base/strings/string_builder.cc \
./libtgvoip/webrtc_dsp/rtc_base/memory/aligned_malloc.cc \
./libtgvoip/webrtc_dsp/rtc_base/timeutils.cc \
./libtgvoip/webrtc_dsp/rtc_base/platform_file.cc \
./libtgvoip/webrtc_dsp/rtc_base/string_to_number.cc \
./libtgvoip/webrtc_dsp/rtc_base/thread_checker_impl.cc \
./libtgvoip/webrtc_dsp/rtc_base/stringencode.cc \
./libtgvoip/webrtc_dsp/rtc_base/stringutils.cc \
./libtgvoip/webrtc_dsp/rtc_base/checks.cc \
./libtgvoip/webrtc_dsp/rtc_base/platform_thread.cc \
./libtgvoip/webrtc_dsp/rtc_base/criticalsection.cc \
./libtgvoip/webrtc_dsp/rtc_base/platform_thread_types.cc \
./libtgvoip/webrtc_dsp/rtc_base/event.cc \
./libtgvoip/webrtc_dsp/rtc_base/event_tracer.cc \
./libtgvoip/webrtc_dsp/rtc_base/logging_webrtc.cc \
./libtgvoip/webrtc_dsp/third_party/rnnoise/src/rnn_vad_weights.cc \
./libtgvoip/webrtc_dsp/third_party/rnnoise/src/kiss_fft.cc \
./libtgvoip/webrtc_dsp/api/audio/audio_frame.cc \
./libtgvoip/webrtc_dsp/api/audio/echo_canceller3_config.cc \
./libtgvoip/webrtc_dsp/api/audio/echo_canceller3_factory.cc \
./libtgvoip/webrtc_dsp/modules/third_party/fft/fft.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_estimator.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb16_tables.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_gain_tables.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/arith_routines_logist.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/filterbanks.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/transform.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_filter.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/encode_lpc_swb.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/filter_functions.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/decode.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lattice.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/intialize.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_tables.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_gain_swb_tables.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/bandwidth_estimator.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/encode.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_analysis.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/arith_routines_hist.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/entropy_coding.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/isac_vad.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/arith_routines.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/crc.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/lpc_shape_swb12_tables.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/decode_bwe.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/spectrum_ar_model_tables.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/pitch_lag_tables.c \
./libtgvoip/webrtc_dsp/modules/audio_coding/codecs/isac/main/source/isac.c \
./libtgvoip/webrtc_dsp/modules/audio_processing/rms_level.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/echo_detector/moving_max.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/echo_detector/circular_buffer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/echo_detector/mean_variance_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/splitting_filter.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/gain_control_impl.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/ns/nsx_core.c \
./libtgvoip/webrtc_dsp/modules/audio_processing/ns/noise_suppression_x.c \
./libtgvoip/webrtc_dsp/modules/audio_processing/ns/nsx_core_c.c \
./libtgvoip/webrtc_dsp/modules/audio_processing/ns/ns_core.c \
./libtgvoip/webrtc_dsp/modules/audio_processing/ns/noise_suppression.c \
./libtgvoip/webrtc_dsp/modules/audio_processing/audio_buffer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/typing_detection.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/include/audio_processing_statistics.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/include/audio_generator_factory.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/include/aec_dump.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/include/audio_processing.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/include/config.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/interpolated_gain_curve.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/agc2_common.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/gain_applier.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/adaptive_agc.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/adaptive_digital_gain_applier.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/limiter.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/saturation_protector.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/rnn_vad/spectral_features_internal.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/rnn_vad/rnn.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/rnn_vad/pitch_search_internal.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/rnn_vad/spectral_features.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/rnn_vad/pitch_search.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/rnn_vad/features_extraction.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/rnn_vad/fft_util.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/rnn_vad/lp_residual.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/adaptive_mode_level_estimator_agc.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/vector_float_frame.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/noise_level_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/agc2_testing_common.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/fixed_digital_level_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/fixed_gain_controller.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/vad_with_level.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/limiter_db_gain_curve.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/down_sampler.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/signal_classifier.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/noise_spectrum_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/compute_interpolated_gain_curve.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/biquad_filter.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/transient/moving_moments.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/transient/wpd_tree.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/transient/wpd_node.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/transient/transient_suppressor.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/transient/transient_detector.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/low_cut_filter.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/level_estimator_impl.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/three_band_filter_bank.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec/echo_cancellation.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec/aec_resampler.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec/aec_core.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/voice_detection_impl.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/echo_cancellation_impl.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/gain_control_for_experimental_agc.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc/agc.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc/loudness_histogram.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc/agc_manager_direct.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc/legacy/analog_agc.c \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc/legacy/digital_agc.c \
./libtgvoip/webrtc_dsp/modules/audio_processing/agc/utility.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/audio_processing_impl.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/audio_generator/file_audio_generator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/gain_controller2.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/residual_echo_detector.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/noise_suppression_impl.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aecm/aecm_core.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aecm/aecm_core_c.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aecm/echo_control_mobile.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/render_reverb_model.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/reverb_model_fallback.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/echo_remover_metrics.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/matched_filter_lag_aggregator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/render_delay_buffer2.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/echo_path_variability.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/frame_blocker.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/subtractor.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/aec3_fft.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/fullband_erle_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/suppression_filter.$(CC_NEON) \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/block_processor.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/subband_erle_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/render_delay_controller_metrics.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/render_delay_buffer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/vector_buffer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/erl_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/aec_state.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/adaptive_fir_filter.$(CC_NEON) \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/render_delay_controller.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/skew_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/echo_path_delay_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/block_framer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/erle_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/reverb_model.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/cascaded_biquad_filter.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/render_buffer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/subtractor_output.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/stationarity_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/render_signal_analyzer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/subtractor_output_analyzer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/suppression_gain.$(CC_NEON) \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/echo_audibility.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/block_processor_metrics.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/moving_average.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/reverb_model_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/aec3_common.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/residual_echo_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/matched_filter.$(CC_NEON) \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/reverb_decay_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/render_delay_controller2.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/suppression_gain_limiter.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/main_filter_update_gain.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/echo_remover.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/downsampled_render_buffer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/matrix_buffer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/block_processor2.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/echo_canceller3.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/block_delay_buffer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/fft_buffer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/comfort_noise_generator.$(CC_NEON) \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/shadow_filter_update_gain.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/filter_analyzer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/reverb_frequency_response.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec3/decimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/echo_control_mobile_impl.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/logging/apm_data_dumper.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/vad/voice_activity_detector.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/vad/standalone_vad.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/vad/pitch_internal.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/vad/vad_circular_buffer.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/vad/vad_audio_proc.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/vad/pole_zero_filter.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/vad/pitch_based_vad.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/vad/gmm.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/utility/ooura_fft.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/utility/delay_estimator_wrapper.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/utility/delay_estimator.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/utility/block_mean_calculator.cc \
./libtgvoip/webrtc_dsp/common_audio/window_generator.cc \
./libtgvoip/webrtc_dsp/common_audio/channel_buffer.cc \
./libtgvoip/webrtc_dsp/common_audio/fir_filter_factory.cc \
./libtgvoip/webrtc_dsp/common_audio/wav_header.cc \
./libtgvoip/webrtc_dsp/common_audio/real_fourier_ooura.cc \
./libtgvoip/webrtc_dsp/common_audio/audio_util.cc \
./libtgvoip/webrtc_dsp/common_audio/resampler/push_sinc_resampler.cc \
./libtgvoip/webrtc_dsp/common_audio/resampler/resampler.cc \
./libtgvoip/webrtc_dsp/common_audio/resampler/push_resampler.cc \
./libtgvoip/webrtc_dsp/common_audio/resampler/sinc_resampler.cc \
./libtgvoip/webrtc_dsp/common_audio/resampler/sinusoidal_linear_chirp_source.cc \
./libtgvoip/webrtc_dsp/common_audio/wav_file.cc \
./libtgvoip/webrtc_dsp/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c \
./libtgvoip/webrtc_dsp/common_audio/third_party/fft4g/fft4g.c \
./libtgvoip/webrtc_dsp/common_audio/audio_converter.cc \
./libtgvoip/webrtc_dsp/common_audio/real_fourier.cc \
./libtgvoip/webrtc_dsp/common_audio/sparse_fir_filter.cc \
./libtgvoip/webrtc_dsp/common_audio/smoothing_filter.cc \
./libtgvoip/webrtc_dsp/common_audio/fir_filter_c.cc \
./libtgvoip/webrtc_dsp/common_audio/ring_buffer.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/complex_fft.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/filter_ma_fast_q12.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/levinson_durbin.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/dot_product_with_scale.cc \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/auto_corr_to_refl_coef.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/resample_by_2_internal.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/energy.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/sqrt_of_one_minus_x_squared.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/downsample_fast.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/splitting_filter1.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/filter_ar_fast_q12.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/spl_init.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/lpc_to_refl_coef.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/cross_correlation.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/division_operations.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/auto_correlation.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/get_scaling_square.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/resample.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/min_max_operations.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/refl_coef_to_lpc.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/filter_ar.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/vector_scaling_operations.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/resample_fractional.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/real_fft.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/ilbc_specific_functions.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/complex_bit_reverse.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/randomization_functions.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/copy_set_operations.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/resample_by_2.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/get_hanning_window.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/resample_48khz.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/spl_inl.c \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/spl_sqrt.c \
./libtgvoip/webrtc_dsp/common_audio/vad/vad_sp.c \
./libtgvoip/webrtc_dsp/common_audio/vad/vad.cc \
./libtgvoip/webrtc_dsp/common_audio/vad/webrtc_vad.c \
./libtgvoip/webrtc_dsp/common_audio/vad/vad_filterbank.c \
./libtgvoip/webrtc_dsp/common_audio/vad/vad_core.c \
./libtgvoip/webrtc_dsp/common_audio/vad/vad_gmm.c
ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI),armeabi-v7a arm64-v8a))
LOCAL_SRC_FILES += \
./libtgvoip/webrtc_dsp/modules/audio_processing/ns/nsx_core_neon.c.neon \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec/aec_core_neon.cc.neon \
./libtgvoip/webrtc_dsp/modules/audio_processing/aecm/aecm_core_neon.cc.neon \
./libtgvoip/webrtc_dsp/modules/audio_processing/utility/ooura_fft_neon.cc.neon \
./libtgvoip/webrtc_dsp/common_audio/fir_filter_neon.cc.neon \
./libtgvoip/webrtc_dsp/common_audio/resampler/sinc_resampler_neon.cc.neon \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/downsample_fast_neon.c.neon \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/min_max_operations_neon.c.neon \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/cross_correlation_neon.c.neon
endif
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_SRC_FILES += \
./libtgvoip/webrtc_dsp/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_arm.S.neon \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/complex_bit_reverse_arm.S.neon \
./libtgvoip/webrtc_dsp/common_audio/signal_processing/filter_ar_fast_q12_armv7.S.neon
endif
ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI),x86 x86_64))
LOCAL_SRC_FILES += \
./libtgvoip/webrtc_dsp/modules/audio_processing/aec/aec_core_sse2.cc \
./libtgvoip/webrtc_dsp/modules/audio_processing/utility/ooura_fft_sse2.cc \
./libtgvoip/webrtc_dsp/common_audio/fir_filter_sse.cc \
./libtgvoip/webrtc_dsp/common_audio/resampler/sinc_resampler_sse.cc
endif
include $(BUILD_STATIC_LIBRARY)
include $(MY_LOCAL_PATH)/libtgvoip/Android.mk
LOCAL_PATH := $(MY_LOCAL_PATH) # restore local path after include
include $(CLEAR_VARS)
@ -602,7 +260,7 @@ LOCAL_CFLAGS := -w -std=c11 -Os -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USE
LOCAL_CFLAGS += -Drestrict='' -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno
LOCAL_CFLAGS += -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -ffast-math -D__STDC_CONSTANT_MACROS
LOCAL_CPPFLAGS := -DBSD=1 -ffast-math -Os -funroll-loops -std=c++11
LOCAL_LDLIBS := -ljnigraphics -llog -lz -latomic -lOpenSLES -lEGL -lGLESv2 -landroid
LOCAL_LDLIBS := -ljnigraphics -llog -lz -latomic -lEGL -lGLESv2 -landroid
LOCAL_STATIC_LIBRARIES := webp sqlite tgnet avformat avcodec avresample avutil voip flac
LOCAL_SRC_FILES := \
@ -879,7 +537,6 @@ LOCAL_SRC_FILES += \
./exoplayer/flac_parser.cc \
./exoplayer/opus_jni.cc \
./exoplayer/ffmpeg_jni.cc \
./libtgvoip/client/android/tg_voip_jni.cpp \
./fast-edge.cpp \
./genann.c \
./secureid_ocr.cpp

View File

@ -164,9 +164,9 @@ JNIEXPORT void Java_org_telegram_messenger_Utilities_aesCbcEncryption(JNIEnv *en
}
JNIEXPORT jstring Java_org_telegram_messenger_Utilities_readlink(JNIEnv *env, jclass class, jstring path) {
static char buf[1000];
static char buf[PATH_MAX + 1];
const char *fileName = (*env)->GetStringUTFChars(env, path, NULL);
ssize_t result = readlink(fileName, buf, 999);
ssize_t result = readlink(fileName, buf, PATH_MAX);
jstring value = 0;
if (result != -1) {
buf[result] = '\0';

@ -1 +1 @@
Subproject commit 564eada171b3fb97a9740c30899d617b98fe1714
Subproject commit fc13464b35aeb373844bafc7a9a33b18ca7afa3b

View File

@ -100,6 +100,7 @@ import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.Components.PickerBottomLayout;
import org.telegram.ui.Components.TypefaceSpan;
import org.telegram.ui.ThemePreviewActivity;
import org.telegram.ui.WallpapersListActivity;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
@ -385,12 +386,20 @@ public class AndroidUtilities {
if (pathString.matches(Pattern.quote(new File(ApplicationLoader.applicationContext.getCacheDir(), "voip_logs").getAbsolutePath()) + "/\\d+\\.log")) {
return false;
}
int tries = 0;
while (true) {
if (pathString != null && pathString.length() > 4096) {
return true;
}
String newPath = Utilities.readlink(pathString);
if (newPath == null || newPath.equals(pathString)) {
break;
}
pathString = newPath;
tries++;
if (tries >= 10) {
return true;
}
}
if (pathString != null) {
try {
@ -2383,4 +2392,150 @@ public class AndroidUtilities {
return sb.toString();
}
}
public static float[] RGBtoHSB(int r, int g, int b) {
float hue, saturation, brightness;
float[] hsbvals = new float[3];
int cmax = (r > g) ? r : g;
if (b > cmax) {
cmax = b;
}
int cmin = (r < g) ? r : g;
if (b < cmin) {
cmin = b;
}
brightness = ((float) cmax) / 255.0f;
if (cmax != 0) {
saturation = ((float) (cmax - cmin)) / ((float) cmax);
} else {
saturation = 0;
}
if (saturation == 0) {
hue = 0;
} else {
float redc = ((float) (cmax - r)) / ((float) (cmax - cmin));
float greenc = ((float) (cmax - g)) / ((float) (cmax - cmin));
float bluec = ((float) (cmax - b)) / ((float) (cmax - cmin));
if (r == cmax) {
hue = bluec - greenc;
} else if (g == cmax) {
hue = 2.0f + redc - bluec;
} else {
hue = 4.0f + greenc - redc;
}
hue = hue / 6.0f;
if (hue < 0) {
hue = hue + 1.0f;
}
}
hsbvals[0] = hue;
hsbvals[1] = saturation;
hsbvals[2] = brightness;
return hsbvals;
}
public static int HSBtoRGB(float hue, float saturation, float brightness) {
int r = 0, g = 0, b = 0;
if (saturation == 0) {
r = g = b = (int) (brightness * 255.0f + 0.5f);
} else {
float h = (hue - (float) Math.floor(hue)) * 6.0f;
float f = h - (float) java.lang.Math.floor(h);
float p = brightness * (1.0f - saturation);
float q = brightness * (1.0f - saturation * f);
float t = brightness * (1.0f - (saturation * (1.0f - f)));
switch ((int) h) {
case 0:
r = (int) (brightness * 255.0f + 0.5f);
g = (int) (t * 255.0f + 0.5f);
b = (int) (p * 255.0f + 0.5f);
break;
case 1:
r = (int) (q * 255.0f + 0.5f);
g = (int) (brightness * 255.0f + 0.5f);
b = (int) (p * 255.0f + 0.5f);
break;
case 2:
r = (int) (p * 255.0f + 0.5f);
g = (int) (brightness * 255.0f + 0.5f);
b = (int) (t * 255.0f + 0.5f);
break;
case 3:
r = (int) (p * 255.0f + 0.5f);
g = (int) (q * 255.0f + 0.5f);
b = (int) (brightness * 255.0f + 0.5f);
break;
case 4:
r = (int) (t * 255.0f + 0.5f);
g = (int) (p * 255.0f + 0.5f);
b = (int) (brightness * 255.0f + 0.5f);
break;
case 5:
r = (int) (brightness * 255.0f + 0.5f);
g = (int) (p * 255.0f + 0.5f);
b = (int) (q * 255.0f + 0.5f);
break;
}
}
return 0xff000000 | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff);
}
public static int getPatternColor(int color) {
float hsb[] = RGBtoHSB(Color.red(color), Color.green(color), Color.blue(color));
if (hsb[1] > 0.0f || (hsb[2] < 1.0f && hsb[2] > 0.0f)) {
hsb[1] = Math.min(1.0f, hsb[1] + 0.05f + 0.1f * (1.0f - hsb[1]));
}
if (hsb[2] > 0.5f) {
hsb[2] = Math.max(0.0f, hsb[2] * 0.65f);
} else {
hsb[2] = Math.max(0.0f, Math.min(1.0f, 1.0f - hsb[2] * 0.65f));
}
return HSBtoRGB(hsb[0], hsb[1], hsb[2]) & 0x66ffffff;
}
public static int getPatternSideColor(int color) {
float hsb[] = RGBtoHSB(Color.red(color), Color.green(color), Color.blue(color));
hsb[1] = Math.min(1.0f, hsb[1] + 0.05f);
if (hsb[2] > 0.5f) {
hsb[2] = Math.max(0.0f, hsb[2] * 0.90f);
} else{
hsb[2] = Math.max(0.0f, hsb[2] * 0.90f);
}
return HSBtoRGB(hsb[0], hsb[1], hsb[2]) | 0xff000000;
}
public static String getWallPaperUrl(Object object, int currentAccount) {
String link;
if (object instanceof TLRPC.TL_wallPaper) {
TLRPC.TL_wallPaper wallPaper = (TLRPC.TL_wallPaper) object;
link = "https://" + MessagesController.getInstance(currentAccount).linkPrefix + "/bg/" + wallPaper.slug;
StringBuilder modes = new StringBuilder();
if (wallPaper.settings != null) {
if (wallPaper.settings.blur) {
modes.append("blur");
}
if (wallPaper.settings.motion) {
if (modes.length() > 0) {
modes.append("+");
}
modes.append("motion");
}
}
if (modes.length() > 0) {
link += "?mode=" + modes.toString();
}
} else if (object instanceof WallpapersListActivity.ColorWallpaper) {
WallpapersListActivity.ColorWallpaper wallPaper = (WallpapersListActivity.ColorWallpaper) object;
String color = String.format("%02x%02x%02x", (byte) (wallPaper.color >> 16) & 0xff, (byte) (wallPaper.color >> 8) & 0xff, (byte) (wallPaper.color & 0xff)).toLowerCase();
if (wallPaper.pattern != null) {
link = "https://" + MessagesController.getInstance(currentAccount).linkPrefix + "/bg/" + wallPaper.pattern.slug + "?intensity=" + (int) (wallPaper.intensity * 100) + "&bg_color=" + color;
} else {
link = "https://" + MessagesController.getInstance(currentAccount).linkPrefix + "/bg/" + color;
}
} else {
link = null;
}
return link;
}
}

View File

@ -18,8 +18,8 @@ public class BuildVars {
public static boolean LOGS_ENABLED = false;
public static boolean USE_CLOUD_STRINGS = true;
public static boolean CHECK_UPDATES = false;
public static int BUILD_VERSION = 1478;
public static String BUILD_VERSION_STRING = "5.2.0";
public static int BUILD_VERSION = 1497;
public static String BUILD_VERSION_STRING = "5.3.0";
public static int APP_ID = 0; //obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id
public static String APP_HASH = ""; //obtain your own APP_HASH at https://core.telegram.org/api/obtaining_api_id
public static String HOCKEY_APP_HASH = "your-hockeyapp-api-key-here";

View File

@ -86,7 +86,7 @@ public class FileRefController {
TLRPC.TL_wallPaper wallPaper = (TLRPC.TL_wallPaper) parentObject;
return "wallpaper" + wallPaper.id;
}
return null;
return parentObject != null ? "" + parentObject : null;
}
@SuppressWarnings("unchecked")
@ -598,21 +598,21 @@ public class FileRefController {
} else if (response instanceof TLRPC.TL_account_wallPapers) {
TLRPC.TL_account_wallPapers accountWallPapers = (TLRPC.TL_account_wallPapers) response;
for (int i = 0, size10 = accountWallPapers.wallpapers.size(); i < size10; i++) {
result = getFileReference(accountWallPapers.wallpapers.get(i).document, requester.location);
result = getFileReference(((TLRPC.TL_wallPaper) accountWallPapers.wallpapers.get(i)).document, requester.location);
if (result != null) {
break;
}
}
if (result != null && cache) {
MessagesStorage.getInstance(currentAccount).putWallpapers(accountWallPapers.wallpapers, true);
MessagesStorage.getInstance(currentAccount).putWallpapers(accountWallPapers.wallpapers, 1);
}
} else if (response instanceof TLRPC.TL_wallPaper) {
TLRPC.TL_wallPaper wallPaper = (TLRPC.TL_wallPaper) response;
result = getFileReference(wallPaper.document, requester.location);
if (result != null && cache) {
ArrayList<TLRPC.TL_wallPaper> wallpapers = new ArrayList<>();
ArrayList<TLRPC.WallPaper> wallpapers = new ArrayList<>();
wallpapers.add(wallPaper);
MessagesStorage.getInstance(currentAccount).putWallpapers(wallpapers, false);
MessagesStorage.getInstance(currentAccount).putWallpapers(wallpapers, 0);
}
} else if (response instanceof TLRPC.Vector) {
TLRPC.Vector vector = (TLRPC.Vector) response;

View File

@ -286,7 +286,7 @@ public class ImageLoader {
public ArtworkLoadTask(CacheImage cacheImage) {
this.cacheImage = cacheImage;
Uri uri = Uri.parse(cacheImage.httpUrl);
Uri uri = Uri.parse((String) cacheImage.location);
small = uri.getQueryParameter("s") != null;
}
@ -294,7 +294,8 @@ public class ImageLoader {
ByteArrayOutputStream outbuf = null;
InputStream httpConnectionStream = null;
try {
URL downloadUrl = new URL(cacheImage.httpUrl.replace("athumb://", "https://"));
String location = (String) cacheImage.location;
URL downloadUrl = new URL(location.replace("athumb://", "https://"));
httpConnection = (HttpURLConnection) downloadUrl.openConnection();
httpConnection.addRequestProperty("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0 like Mac OS X) AppleWebKit/602.1.38 (KHTML, like Gecko) Version/10.0 Mobile/14A5297c Safari/602.1");
httpConnection.setConnectTimeout(5000);
@ -437,10 +438,11 @@ public class ImageLoader {
if (!isCancelled()) {
try {
if (cacheImage.httpUrl.startsWith("https://static-maps") || cacheImage.httpUrl.startsWith("https://maps.googleapis")) {
String location = (String) cacheImage.location;
if (location.startsWith("https://static-maps") || location.startsWith("https://maps.googleapis")) {
int provider = MessagesController.getInstance(cacheImage.currentAccount).mapProvider;
if (provider == 3 || provider == 4) {
WebFile webFile = testWebFile.get(cacheImage.httpUrl);
WebFile webFile = testWebFile.get(location);
if (webFile != null) {
TLRPC.TL_upload_getWebFile req = new TLRPC.TL_upload_getWebFile();
req.location = webFile.location;
@ -453,7 +455,7 @@ public class ImageLoader {
}
}
URL downloadUrl = new URL(overrideUrl != null ? overrideUrl : cacheImage.httpUrl);
URL downloadUrl = new URL(overrideUrl != null ? overrideUrl : location);
httpConnection = (HttpURLConnection) downloadUrl.openConnection();
httpConnection.addRequestProperty("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0 like Mac OS X) AppleWebKit/602.1.38 (KHTML, like Gecko) Version/10.0 Mobile/14A5297c Safari/602.1");
//httpConnection.addRequestProperty("Referer", "google.com");
@ -927,23 +929,24 @@ public class ImageLoader {
} else {
try {
String mediaThumbPath = null;
if (cacheImage.httpUrl != null) {
if (cacheImage.httpUrl.startsWith("thumb://")) {
int idx = cacheImage.httpUrl.indexOf(":", 8);
if (cacheImage.location instanceof String) {
String location = (String) cacheImage.location;
if (location.startsWith("thumb://")) {
int idx = location.indexOf(":", 8);
if (idx >= 0) {
mediaId = Long.parseLong(cacheImage.httpUrl.substring(8, idx));
mediaId = Long.parseLong(location.substring(8, idx));
mediaIsVideo = false;
mediaThumbPath = cacheImage.httpUrl.substring(idx + 1);
mediaThumbPath = location.substring(idx + 1);
}
canDeleteFile = false;
} else if (cacheImage.httpUrl.startsWith("vthumb://")) {
int idx = cacheImage.httpUrl.indexOf(":", 9);
} else if (location.startsWith("vthumb://")) {
int idx = location.indexOf(":", 9);
if (idx >= 0) {
mediaId = Long.parseLong(cacheImage.httpUrl.substring(9, idx));
mediaId = Long.parseLong(location.substring(9, idx));
mediaIsVideo = true;
}
canDeleteFile = false;
} else if (!cacheImage.httpUrl.startsWith("http")) {
} else if (!location.startsWith("http")) {
canDeleteFile = false;
}
}
@ -969,6 +972,7 @@ public class ImageLoader {
float h_filter = 0;
boolean blur = false;
boolean checkInversion = false;
boolean force8888 = false;
if (cacheImage.filter != null) {
String args[] = cacheImage.filter.split("_");
if (args.length >= 2) {
@ -981,6 +985,9 @@ public class ImageLoader {
if (cacheImage.filter.contains("i")) {
checkInversion = true;
}
if (cacheImage.filter.contains("f")) {
force8888 = true;
}
if (w_filter != 0 && h_filter != 0) {
opts.inJustDecodeBounds = true;
@ -1057,7 +1064,7 @@ public class ImageLoader {
}
}
if (cacheImage.filter == null || blur || cacheImage.httpUrl != null) {
if (force8888 || cacheImage.filter == null || blur || cacheImage.location instanceof String) {
opts.inPreferredConfig = Bitmap.Config.ARGB_8888;
} else {
opts.inPreferredConfig = Bitmap.Config.RGB_565;
@ -1240,7 +1247,7 @@ public class ImageLoader {
protected String filter;
protected String ext;
protected SecureDocument secureDocument;
protected TLObject location;
protected Object location;
protected boolean animatedFile;
protected boolean selfThumb;
@ -1250,7 +1257,6 @@ public class ImageLoader {
protected File tempFilePath;
protected File encryptionKeyPath;
protected String httpUrl;
protected ArtworkLoadTask artworkTask;
protected HttpImageTask httpTask;
protected CacheOutTask cacheTask;
@ -1916,7 +1922,7 @@ public class ImageLoader {
imageLoadQueue.postRunnable(() -> forceLoadingImages.remove(key));
}
private void createLoadOperationForImageReceiver(final ImageReceiver imageReceiver, final String key, final String url, final String ext, final TLObject imageLocation, final String httpLocation, final String filter, final int size, final int cacheType, final int thumb) {
private void createLoadOperationForImageReceiver(final ImageReceiver imageReceiver, final String key, final String url, final String ext, final Object imageLocation, final String filter, final int size, final int cacheType, final int thumb) {
if (imageReceiver == null || url == null || key == null) {
return;
}
@ -1933,7 +1939,7 @@ public class ImageLoader {
final boolean finalIsNeedsQualityThumb = imageReceiver.isNeedsQualityThumb();
final Object parentObject = imageReceiver.getParentObject();
final boolean shouldGenerateQualityThumb = imageReceiver.isShouldGenerateQualityThumb();
final int currentAccount = imageReceiver.getcurrentAccount();
final int currentAccount = imageReceiver.getCurrentAccount();
final boolean currentKeyQuality = imageReceiver.isCurrentKeyQuality();
imageLoadQueue.postRunnable(() -> {
boolean added = false;
@ -1970,21 +1976,22 @@ public class ImageLoader {
File cacheFile = null;
boolean cacheFileExists = false;
if (httpLocation != null) {
if (!httpLocation.startsWith("http") && !httpLocation.startsWith("athumb")) {
if (imageLocation instanceof String) {
String location = (String) imageLocation;
if (!location.startsWith("http") && !location.startsWith("athumb")) {
onlyCache = true;
if (httpLocation.startsWith("thumb://")) {
int idx = httpLocation.indexOf(":", 8);
if (location.startsWith("thumb://")) {
int idx = location.indexOf(":", 8);
if (idx >= 0) {
cacheFile = new File(httpLocation.substring(idx + 1));
cacheFile = new File(location.substring(idx + 1));
}
} else if (httpLocation.startsWith("vthumb://")) {
int idx = httpLocation.indexOf(":", 9);
} else if (location.startsWith("vthumb://")) {
int idx = location.indexOf(":", 9);
if (idx >= 0) {
cacheFile = new File(httpLocation.substring(idx + 1));
cacheFile = new File(location.substring(idx + 1));
}
} else {
cacheFile = new File(httpLocation);
cacheFile = new File(location);
}
}
} else if (thumb == 0 && currentKeyQuality) {
@ -2036,14 +2043,17 @@ public class ImageLoader {
if (thumb != 2) {
boolean isEncrypted = imageLocation instanceof TLRPC.TL_documentEncrypted || imageLocation instanceof TLRPC.TL_fileEncryptedLocation;
CacheImage img = new CacheImage();
if (httpLocation != null && !httpLocation.startsWith("vthumb") && !httpLocation.startsWith("thumb")) {
String trueExt = getHttpUrlExtension(httpLocation, "jpg");
if (trueExt.equals("mp4") || trueExt.equals("gif")) {
img.animatedFile = true;
}
} else if (imageLocation instanceof WebFile && MessageObject.isGifDocument((WebFile) imageLocation) ||
if (imageLocation instanceof WebFile && MessageObject.isGifDocument((WebFile) imageLocation) ||
imageLocation instanceof TLRPC.Document && (MessageObject.isGifDocument((TLRPC.Document) imageLocation) || MessageObject.isRoundVideoDocument((TLRPC.Document) imageLocation))) {
img.animatedFile = true;
} else if (imageLocation instanceof String) {
String location = (String) imageLocation;
if (!location.startsWith("vthumb") && !location.startsWith("thumb")) {
String trueExt = getHttpUrlExtension(location, "jpg");
if (trueExt.equals("mp4") || trueExt.equals("gif")) {
img.animatedFile = true;
}
}
}
if (cacheFile == null) {
@ -2053,7 +2063,7 @@ public class ImageLoader {
img.secureDocument = (SecureDocument) imageLocation;
onlyCache = img.secureDocument.secureFile.dc_id == Integer.MIN_VALUE;
cacheFile = new File(FileLoader.getDirectory(FileLoader.MEDIA_DIR_CACHE), url);
} else if (cacheType != 0 || size <= 0 || httpLocation != null || isEncrypted) {
} else if (cacheType != 0 || size <= 0 || imageLocation instanceof String || isEncrypted) {
cacheFile = new File(FileLoader.getDirectory(FileLoader.MEDIA_DIR_CACHE), url);
if (cacheFile.exists()) {
cacheFileExists = true;
@ -2076,7 +2086,7 @@ public class ImageLoader {
img.selfThumb = thumb != 0;
img.key = key;
img.filter = filter;
img.httpUrl = httpLocation;
img.location = imageLocation;
img.ext = ext;
img.currentAccount = currentAccount;
if (cacheType == 2) {
@ -2095,9 +2105,24 @@ public class ImageLoader {
}
} else {
img.url = url;
img.location = imageLocation;
imageLoadingByUrl.put(url, img);
if (httpLocation == null) {
if (imageLocation instanceof String) {
String location = (String) imageLocation;
String file = Utilities.MD5(location);
File cacheDir = FileLoader.getDirectory(FileLoader.MEDIA_DIR_CACHE);
img.tempFilePath = new File(cacheDir, file + "_temp.jpg");
img.finalFilePath = cacheFile;
if (location.startsWith("athumb")) {
img.artworkTask = new ArtworkLoadTask(img);
artworkTasks.add(img.artworkTask);
runArtworkTasks(false);
} else {
img.httpTask = new HttpImageTask(img, size);
httpTasks.add(img.httpTask);
runHttpTasks(false);
}
} else {
if (imageLocation instanceof TLRPC.FileLocation) {
TLRPC.FileLocation location = (TLRPC.FileLocation) imageLocation;
int localCacheType = cacheType;
@ -2122,20 +2147,6 @@ public class ImageLoader {
if (imageReceiver.isForceLoding()) {
forceLoadingImages.put(img.key, 0);
}
} else {
String file = Utilities.MD5(httpLocation);
File cacheDir = FileLoader.getDirectory(FileLoader.MEDIA_DIR_CACHE);
img.tempFilePath = new File(cacheDir, file + "_temp.jpg");
img.finalFilePath = cacheFile;
if (httpLocation.startsWith("athumb")) {
img.artworkTask = new ArtworkLoadTask(img);
artworkTasks.add(img.artworkTask);
runArtworkTasks(false);
} else {
img.httpTask = new HttpImageTask(img, size);
httpTasks.add(img.httpTask);
runHttpTasks(false);
}
}
}
}
@ -2177,14 +2188,12 @@ public class ImageLoader {
boolean qualityThumb = false;
Object parentObject = imageReceiver.getParentObject();
TLObject thumbLocation = imageReceiver.getThumbLocation();
TLObject imageLocation = imageReceiver.getImageLocation();
Object thumbLocation = imageReceiver.getThumbLocation();
Object imageLocation = imageReceiver.getImageLocation();
if (imageLocation == null && imageReceiver.isNeedsQualityThumb() && imageReceiver.isCurrentKeyQuality() && parentObject instanceof MessageObject) {
imageLocation = ((MessageObject) parentObject).getDocument();
qualityThumb = true;
}
String httpLocation = imageReceiver.getHttpImageLocation();
boolean saveImageToCache = false;
String url = null;
@ -2195,11 +2204,12 @@ public class ImageLoader {
if (ext == null) {
ext = "jpg";
}
if (httpLocation != null) {
key = Utilities.MD5(httpLocation);
url = key + "." + getHttpUrlExtension(httpLocation, "jpg");
} else if (imageLocation != null) {
if (imageLocation instanceof TLRPC.FileLocation) {
if (imageLocation != null) {
if (imageLocation instanceof String) {
String location = (String) imageLocation;
key = Utilities.MD5(location);
url = key + "." + getHttpUrlExtension(location, "jpg");
} else if (imageLocation instanceof TLRPC.FileLocation) {
TLRPC.FileLocation location = (TLRPC.FileLocation) imageLocation;
key = location.volume_id + "_" + location.local_id;
url = key + "." + ext;
@ -2266,17 +2276,21 @@ public class ImageLoader {
}
}
if (thumbLocation instanceof TLRPC.FileLocation) {
if (thumbLocation instanceof String) {
String location = (String) thumbLocation;
thumbKey = Utilities.MD5(location);
thumbUrl = thumbKey + "." + getHttpUrlExtension(location, "jpg");
} else if (thumbLocation instanceof TLRPC.FileLocation) {
TLRPC.FileLocation location = (TLRPC.FileLocation) thumbLocation;
thumbKey = location.volume_id + "_" + location.local_id;
thumbUrl = thumbKey + "." + ext;
} else if (thumbLocation instanceof TLRPC.TL_photoStrippedSize) {
TLRPC.TL_photoStrippedSize location = (TLRPC.TL_photoStrippedSize) thumbLocation;
thumbKey = "stripped" + FileRefController.getKeyForParentObject(parentObject);
thumbUrl = thumbKey + "." + ext;
} else if (thumbLocation instanceof TLRPC.TL_photoSize) {
TLRPC.TL_photoSize photoSize = (TLRPC.TL_photoSize) thumbLocation;
thumbKey = photoSize.location.volume_id + "_" + photoSize.location.local_id;
}
if (thumbKey != null) {
thumbUrl = thumbKey + "." + ext;
}
@ -2289,17 +2303,20 @@ public class ImageLoader {
thumbKey += "@" + thumbFilter;
}
if (httpLocation != null) {
createLoadOperationForImageReceiver(imageReceiver, thumbKey, thumbUrl, ext, thumbLocation, null, thumbFilter, 0, 1, thumbSet ? 2 : 1);
createLoadOperationForImageReceiver(imageReceiver, key, url, ext, null, httpLocation, filter, 0, 1, 0);
int cacheType;
int thumbCacheType;
if (imageLocation instanceof String) {
cacheType = 1;
thumbCacheType = 1;
} else {
int cacheType = imageReceiver.getCacheType();
cacheType = imageReceiver.getCacheType();
if (cacheType == 0 && saveImageToCache) {
cacheType = 1;
}
createLoadOperationForImageReceiver(imageReceiver, thumbKey, thumbUrl, ext, thumbLocation, null, thumbFilter, 0, cacheType == 0 ? 1 : cacheType, thumbSet ? 2 : 1);
createLoadOperationForImageReceiver(imageReceiver, key, url, ext, imageLocation, null, filter, imageReceiver.getSize(), cacheType, 0);
thumbCacheType = cacheType == 0 ? 1 : cacheType;
}
createLoadOperationForImageReceiver(imageReceiver, thumbKey, thumbUrl, ext, thumbLocation, thumbFilter, 0, thumbCacheType, thumbSet ? 2 : 1);
createLoadOperationForImageReceiver(imageReceiver, key, url, ext, imageLocation, filter, imageReceiver.getSize(), cacheType, 0);
}
private void httpFileLoadError(final String location) {
@ -2353,7 +2370,7 @@ public class ImageLoader {
cacheImage.currentAccount = img.currentAccount;
cacheImage.finalFilePath = finalFile;
cacheImage.key = key;
cacheImage.httpUrl = img.httpUrl;
cacheImage.location = img.location;
cacheImage.selfThumb = thumb;
cacheImage.ext = img.ext;
cacheImage.encryptionKeyPath = img.encryptionKeyPath;

View File

@ -77,11 +77,10 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
}
private class SetImageBackup {
public TLObject fileLocation;
public String httpUrl;
public Object fileLocation;
public String filter;
public Drawable thumb;
public TLObject thumbLocation;
public Object thumbLocation;
public String thumbFilter;
public int size;
public int cacheType;
@ -102,14 +101,13 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
private SetImageBackup setImageBackup;
private TLObject currentImageLocation;
private Object currentImageLocation;
private String currentKey;
private String currentThumbKey;
private String currentHttpUrl;
private String currentFilter;
private String currentThumbFilter;
private String currentExt;
private TLObject currentThumbLocation;
private Object currentThumbLocation;
private int currentSize;
private int currentCacheType;
private Drawable currentImage;
@ -180,41 +178,41 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
}
public void setImage(TLObject path, String filter, Drawable thumb, String ext, Object parentObject, int cacheType) {
setImage(path, null, filter, thumb, null, null, 0, ext, parentObject, cacheType);
setImage(path, filter, thumb, null, null, 0, ext, parentObject, cacheType);
}
public void setImage(TLObject path, String filter, Drawable thumb, int size, String ext, Object parentObject, int cacheType) {
setImage(path, null, filter, thumb, null, null, size, ext, parentObject, cacheType);
setImage(path, filter, thumb, null, null, size, ext, parentObject, cacheType);
}
public void setImage(String httpUrl, String filter, Drawable thumb, String ext, int size) {
setImage(null, httpUrl, filter, thumb, null, null, size, ext, null, 1);
setImage(httpUrl, filter, thumb, null, null, size, ext, null, 1);
}
public void setImage(TLObject fileLocation, String filter, TLObject thumbLocation, String thumbFilter, String ext, Object parentObject, int cacheType) {
setImage(fileLocation, null, filter, null, thumbLocation, thumbFilter, 0, ext, parentObject, cacheType);
setImage(fileLocation, filter, null, thumbLocation, thumbFilter, 0, ext, parentObject, cacheType);
}
public void setImage(TLObject fileLocation, String filter, TLObject thumbLocation, String thumbFilter, int size, String ext, Object parentObject, int cacheType) {
setImage(fileLocation, null, filter, null, thumbLocation, thumbFilter, size, ext, parentObject, cacheType);
setImage(fileLocation, filter, null, thumbLocation, thumbFilter, size, ext, parentObject, cacheType);
}
public void setImage(TLObject fileLocation, String httpUrl, String filter, Drawable thumb, TLObject thumbLocation, String thumbFilter, int size, String ext, Object parentObject, int cacheType) {
public void setImage(Object fileLocation, String filter, Drawable thumb, Object thumbLocation, String thumbFilter, int size, String ext, Object parentObject, int cacheType) {
if (setImageBackup != null) {
setImageBackup.fileLocation = null;
setImageBackup.httpUrl = null;
setImageBackup.thumbLocation = null;
setImageBackup.thumb = null;
}
if ((fileLocation == null && httpUrl == null && thumbLocation == null)
if ((fileLocation == null && thumbLocation == null)
|| (fileLocation != null && !(fileLocation instanceof TLRPC.TL_fileLocation)
&& !(fileLocation instanceof TLRPC.TL_fileEncryptedLocation)
&& !(fileLocation instanceof TLRPC.TL_document)
&& !(fileLocation instanceof WebFile)
&& !(fileLocation instanceof TLRPC.TL_documentEncrypted)
&& !(fileLocation instanceof TLRPC.PhotoSize)
&& !(fileLocation instanceof SecureDocument))) {
&& !(fileLocation instanceof SecureDocument)
&& !(fileLocation instanceof String))) {
for (int a = 0; a < 3; a++) {
recycleBitmap(null, a);
}
@ -223,7 +221,6 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
currentThumbKey = null;
currentThumbFilter = null;
currentImageLocation = null;
currentHttpUrl = null;
currentFilter = null;
currentParentObject = null;
currentCacheType = 0;
@ -249,38 +246,37 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
return;
}
if (!(thumbLocation instanceof TLRPC.PhotoSize) && !(thumbLocation instanceof TLRPC.TL_fileLocation) && !(thumbLocation instanceof TLRPC.TL_fileEncryptedLocation)) {
if (!(thumbLocation instanceof String) && !(thumbLocation instanceof TLRPC.PhotoSize) && !(thumbLocation instanceof TLRPC.TL_fileLocation) && !(thumbLocation instanceof TLRPC.TL_fileEncryptedLocation)) {
thumbLocation = null;
}
String key = null;
if (fileLocation != null) {
if (fileLocation instanceof SecureDocument) {
SecureDocument document = (SecureDocument) fileLocation;
key = document.secureFile.dc_id + "_" + document.secureFile.id;
} else if (fileLocation instanceof TLRPC.FileLocation) {
TLRPC.FileLocation location = (TLRPC.FileLocation) fileLocation;
key = location.volume_id + "_" + location.local_id;
} else if (fileLocation instanceof TLRPC.TL_photoStrippedSize) {
TLRPC.TL_photoStrippedSize location = (TLRPC.TL_photoStrippedSize) fileLocation;
key = "stripped" + FileRefController.getKeyForParentObject(parentObject);
} else if (fileLocation instanceof TLRPC.PhotoSize) {
TLRPC.PhotoSize photoSize = (TLRPC.PhotoSize) fileLocation;
key = photoSize.location.volume_id + "_" + photoSize.location.local_id;
} else if (fileLocation instanceof WebFile) {
WebFile location = (WebFile) fileLocation;
key = Utilities.MD5(location.url);
if (fileLocation instanceof SecureDocument) {
SecureDocument document = (SecureDocument) fileLocation;
key = document.secureFile.dc_id + "_" + document.secureFile.id;
} else if (fileLocation instanceof TLRPC.FileLocation) {
TLRPC.FileLocation location = (TLRPC.FileLocation) fileLocation;
key = location.volume_id + "_" + location.local_id;
} else if (fileLocation instanceof TLRPC.TL_photoStrippedSize) {
TLRPC.TL_photoStrippedSize location = (TLRPC.TL_photoStrippedSize) fileLocation;
key = "stripped" + FileRefController.getKeyForParentObject(parentObject);
} else if (fileLocation instanceof TLRPC.TL_photoSize || fileLocation instanceof TLRPC.TL_photoCachedSize) {
TLRPC.PhotoSize photoSize = (TLRPC.PhotoSize) fileLocation;
key = photoSize.location.volume_id + "_" + photoSize.location.local_id;
} else if (fileLocation instanceof WebFile) {
WebFile location = (WebFile) fileLocation;
key = Utilities.MD5(location.url);
} else if (fileLocation instanceof TLRPC.Document) {
TLRPC.Document location = (TLRPC.Document) fileLocation;
if (location.dc_id != 0) {
key = location.dc_id + "_" + location.id;
} else {
TLRPC.Document location = (TLRPC.Document) fileLocation;
if (location.dc_id != 0) {
key = location.dc_id + "_" + location.id;
} else {
fileLocation = null;
}
fileLocation = null;
}
} else if (httpUrl != null) {
key = Utilities.MD5(httpUrl);
} else if (fileLocation instanceof String) {
key = Utilities.MD5((String) fileLocation);
}
currentKeyQuality = false;
if (key == null && needsQualityThumb && parentObject instanceof MessageObject) {
TLRPC.Document document = ((MessageObject) parentObject).getDocument();
@ -309,9 +305,11 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
} else if (thumbLocation instanceof TLRPC.TL_photoStrippedSize) {
TLRPC.TL_photoStrippedSize location = (TLRPC.TL_photoStrippedSize) thumbLocation;
thumbKey = "stripped" + FileRefController.getKeyForParentObject(parentObject);
} else if (thumbLocation instanceof TLRPC.PhotoSize) {
} else if (thumbLocation instanceof TLRPC.TL_photoSize || thumbLocation instanceof TLRPC.TL_photoCachedSize) {
TLRPC.PhotoSize photoSize = (TLRPC.PhotoSize) thumbLocation;
thumbKey = photoSize.location.volume_id + "_" + photoSize.location.local_id;
} else if (thumbLocation instanceof String) {
thumbKey = Utilities.MD5((String) thumbLocation);
}
if (thumbKey != null && thumbFilter != null) {
thumbKey += "@" + thumbFilter;
@ -364,7 +362,6 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
currentKey = key;
currentExt = ext;
currentImageLocation = fileLocation;
currentHttpUrl = httpUrl;
currentFilter = filter;
currentThumbFilter = thumbFilter;
currentSize = size;
@ -504,14 +501,12 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
currentImage = null;
currentThumbFilter = null;
currentImageLocation = null;
currentHttpUrl = null;
currentFilter = null;
currentSize = 0;
currentCacheType = 0;
bitmapShader = null;
if (setImageBackup != null) {
setImageBackup.fileLocation = null;
setImageBackup.httpUrl = null;
setImageBackup.thumbLocation = null;
setImageBackup.thumb = null;
}
@ -541,12 +536,11 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
}
public void onDetachedFromWindow() {
if (currentImageLocation != null || currentHttpUrl != null || currentThumbLocation != null || staticThumb != null) {
if (currentImageLocation != null || currentThumbLocation != null || staticThumb != null) {
if (setImageBackup == null) {
setImageBackup = new SetImageBackup();
}
setImageBackup.fileLocation = currentImageLocation;
setImageBackup.httpUrl = currentHttpUrl;
setImageBackup.filter = currentFilter;
setImageBackup.thumb = staticThumb;
setImageBackup.thumbLocation = currentThumbLocation;
@ -562,8 +556,8 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
public boolean onAttachedToWindow() {
NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.didReplacedPhotoInMemCache);
if (setImageBackup != null && (setImageBackup.fileLocation != null || setImageBackup.httpUrl != null || setImageBackup.thumbLocation != null || setImageBackup.thumb != null)) {
setImage(setImageBackup.fileLocation, setImageBackup.httpUrl, setImageBackup.filter, setImageBackup.thumb, setImageBackup.thumbLocation, setImageBackup.thumbFilter, setImageBackup.size, setImageBackup.ext, setImageBackup.parentObject, setImageBackup.cacheType);
if (setImageBackup != null && (setImageBackup.fileLocation != null || setImageBackup.thumbLocation != null || setImageBackup.thumb != null)) {
setImage(setImageBackup.fileLocation, setImageBackup.filter, setImageBackup.thumb, setImageBackup.thumbLocation, setImageBackup.thumbFilter, setImageBackup.size, setImageBackup.ext, setImageBackup.parentObject, setImageBackup.cacheType);
return true;
}
return false;
@ -667,19 +661,21 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
bitmapH /= scale;
drawRegion.set(imageX + (imageW - bitmapW) / 2, imageY + (imageH - bitmapH) / 2, imageX + (imageW + bitmapW) / 2, imageY + (imageH + bitmapH) / 2);
bitmapDrawable.setBounds(drawRegion);
try {
bitmapDrawable.setAlpha(alpha);
bitmapDrawable.draw(canvas);
} catch (Exception e) {
if (bitmapDrawable == currentImage && currentKey != null) {
ImageLoader.getInstance().removeImage(currentKey);
currentKey = null;
} else if (bitmapDrawable == currentThumb && currentThumbKey != null) {
ImageLoader.getInstance().removeImage(currentThumbKey);
currentThumbKey = null;
if (isVisible) {
try {
bitmapDrawable.setAlpha(alpha);
bitmapDrawable.draw(canvas);
} catch (Exception e) {
if (bitmapDrawable == currentImage && currentKey != null) {
ImageLoader.getInstance().removeImage(currentKey);
currentKey = null;
} else if (bitmapDrawable == currentThumb && currentThumbKey != null) {
ImageLoader.getInstance().removeImage(currentThumbKey);
currentThumbKey = null;
}
setImage(currentImageLocation, currentFilter, currentThumb, currentThumbLocation, currentThumbFilter, currentSize, currentExt, currentParentObject, currentCacheType);
FileLog.e(e);
}
setImage(currentImageLocation, currentHttpUrl, currentFilter, currentThumb, currentThumbLocation, currentThumbFilter, currentSize, currentExt, currentParentObject, currentCacheType);
FileLog.e(e);
}
canvas.restore();
} else {
@ -726,7 +722,7 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
ImageLoader.getInstance().removeImage(currentThumbKey);
currentThumbKey = null;
}
setImage(currentImageLocation, currentHttpUrl, currentFilter, currentThumb, currentThumbLocation, currentThumbFilter, currentSize, currentExt, currentParentObject, currentCacheType);
setImage(currentImageLocation, currentFilter, currentThumb, currentThumbLocation, currentThumbFilter, currentSize, currentExt, currentParentObject, currentCacheType);
FileLog.e(e);
}
}
@ -766,7 +762,7 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
ImageLoader.getInstance().removeImage(currentThumbKey);
currentThumbKey = null;
}
setImage(currentImageLocation, currentHttpUrl, currentFilter, currentThumb, currentThumbLocation, currentThumbFilter, currentSize, currentExt, currentParentObject, currentCacheType);
setImage(currentImageLocation, currentFilter, currentThumb, currentThumbLocation, currentThumbFilter, currentSize, currentExt, currentParentObject, currentCacheType);
FileLog.e(e);
}
}
@ -1033,7 +1029,7 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
}
public boolean hasImage() {
return currentImage != null || currentThumb != null || currentKey != null || currentHttpUrl != null || staticThumb != null;
return currentImage != null || currentThumb != null || currentKey != null || staticThumb != null;
}
public boolean hasBitmapImage() {
@ -1044,10 +1040,18 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
return currentImage != null;
}
public boolean hasStaticThumb() {
return staticThumb != null;
}
public void setAspectFit(boolean value) {
isAspectFit = value;
}
public boolean isAspectFit() {
return isAspectFit;
}
public void setParentView(View view) {
parentView = view;
if (currentImage instanceof AnimatedFileDrawable) {
@ -1143,18 +1147,14 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
return currentSize;
}
public TLObject getImageLocation() {
public Object getImageLocation() {
return currentImageLocation;
}
public TLObject getThumbLocation() {
public Object getThumbLocation() {
return currentThumbLocation;
}
public String getHttpImageLocation() {
return currentHttpUrl;
}
public int getCacheType() {
return currentCacheType;
}
@ -1203,7 +1203,7 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
return currentKeyQuality;
}
public int getcurrentAccount() {
public int getCurrentAccount() {
return currentAccount;
}
@ -1424,20 +1424,20 @@ public class ImageReceiver implements NotificationCenter.NotificationCenterDeleg
String oldKey = (String) args[0];
if (currentKey != null && currentKey.equals(oldKey)) {
currentKey = (String) args[1];
currentImageLocation = (TLObject) args[2];
currentImageLocation = args[2];
}
if (currentThumbKey != null && currentThumbKey.equals(oldKey)) {
currentThumbKey = (String) args[1];
currentThumbLocation = (TLObject) args[2];
currentThumbLocation = args[2];
}
if (setImageBackup != null) {
if (currentKey != null && currentKey.equals(oldKey)) {
currentKey = (String) args[1];
currentImageLocation = (TLObject) args[2];
currentImageLocation = args[2];
}
if (currentThumbKey != null && currentThumbKey.equals(oldKey)) {
currentThumbKey = (String) args[1];
currentThumbLocation = (TLObject) args[2];
currentThumbLocation = args[2];
}
}
}

View File

@ -53,9 +53,7 @@ public class LocaleController {
public FastDateFormat formatterDay;
public FastDateFormat formatterWeek;
public FastDateFormat formatterDayMonth;
public FastDateFormat formatterMonth;
public FastDateFormat formatterYear;
public FastDateFormat formatterMonthYear;
public FastDateFormat formatterYearMax;
public FastDateFormat formatterStats;
public FastDateFormat formatterBannedUntil;
@ -1426,14 +1424,12 @@ public class LocaleController {
nameDisplayOrder = lang.equals("ko") ? 2 : 1;
formatterDayMonth = createFormatter(locale, getStringInternal("formatterMonth", R.string.formatterMonth), "dd MMM");
formatterMonth = createFormatter(locale, getStringInternal("formatterMonthName", R.string.formatterMonthName), "LLLL");
formatterYear = createFormatter(locale, getStringInternal("formatterYear", R.string.formatterYear), "dd.MM.yy");
formatterYearMax = createFormatter(locale, getStringInternal("formatterYearMax", R.string.formatterYearMax), "dd.MM.yyyy");
chatDate = createFormatter(locale, getStringInternal("chatDate", R.string.chatDate), "d MMMM");
chatFullDate = createFormatter(locale, getStringInternal("chatFullDate", R.string.chatFullDate), "d MMMM yyyy");
formatterWeek = createFormatter(locale, getStringInternal("formatterWeek", R.string.formatterWeek), "EEE");
formatterScheduleDay = createFormatter(locale, getStringInternal("formatDateScheduleDay", R.string.formatDateScheduleDay), "EEE MMM d");
formatterMonthYear = createFormatter(locale, getStringInternal("formatterMonthYear2", R.string.formatterMonthYear2), "LLLL yyyy");
formatterDay = createFormatter(lang.toLowerCase().equals("ar") || lang.toLowerCase().equals("ko") ? locale : Locale.US, is24HourFormat ? getStringInternal("formatterDay24H", R.string.formatterDay24H) : getStringInternal("formatterDay12H", R.string.formatterDay12H), is24HourFormat ? "HH:mm" : "h:mm a");
formatterStats = createFormatter(locale, is24HourFormat ? getStringInternal("formatterStats24H", R.string.formatterStats24H) : getStringInternal("formatterStats12H", R.string.formatterStats12H), is24HourFormat ? "MMM dd yyyy, HH:mm" : "MMM dd yyyy, h:mm a");
formatterBannedUntil = createFormatter(locale, is24HourFormat ? getStringInternal("formatterBannedUntil24H", R.string.formatterBannedUntil24H) : getStringInternal("formatterBannedUntil12H", R.string.formatterBannedUntil12H), is24HourFormat ? "MMM dd yyyy, HH:mm" : "MMM dd yyyy, h:mm a");
@ -1451,11 +1447,26 @@ public class LocaleController {
int year = rightNow.get(Calendar.YEAR);
rightNow.setTimeInMillis(date);
int dateYear = rightNow.get(Calendar.YEAR);
int month = rightNow.get(Calendar.MONTH);
final String[] months = new String[]{
LocaleController.getString("January", R.string.January),
LocaleController.getString("February", R.string.February),
LocaleController.getString("March", R.string.March),
LocaleController.getString("April", R.string.April),
LocaleController.getString("May", R.string.May),
LocaleController.getString("June", R.string.June),
LocaleController.getString("July", R.string.July),
LocaleController.getString("August", R.string.August),
LocaleController.getString("September", R.string.September),
LocaleController.getString("October", R.string.October),
LocaleController.getString("November", R.string.November),
LocaleController.getString("December", R.string.December)
};
if (year == dateYear) {
return getInstance().formatterMonth.format(new Date(date));
return months[month];
} else {
return getInstance().formatterMonthYear.format(new Date(date));
return months[month] + " " + dateYear;
}
} catch (Exception e) {
FileLog.e(e);

View File

@ -357,6 +357,7 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
private static Runnable refreshGalleryRunnable;
public static AlbumEntry allMediaAlbumEntry;
public static AlbumEntry allPhotosAlbumEntry;
public static AlbumEntry allVideosAlbumEntry;
private static Runnable broadcastPhotosRunnable;
private boolean isPaused = false;
@ -3026,6 +3027,7 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
SparseArray<AlbumEntry> mediaAlbums = new SparseArray<>();
SparseArray<AlbumEntry> photoAlbums = new SparseArray<>();
AlbumEntry allPhotosAlbum = null;
AlbumEntry allVideosAlbum = null;
AlbumEntry allMediaAlbum = null;
String cameraFolder = null;
try {
@ -3139,10 +3141,22 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
PhotoEntry photoEntry = new PhotoEntry(bucketId, imageId, dateTaken, path, (int) (duration / 1000), true);
if (allVideosAlbum == null) {
allVideosAlbum = new AlbumEntry(0, LocaleController.getString("AllVideos", R.string.AllVideos), photoEntry);
int index = 0;
if (allMediaAlbum != null) {
index++;
}
if (allPhotosAlbum != null) {
index++;
}
mediaAlbumsSorted.add(index, allVideosAlbum);
}
if (allMediaAlbum == null) {
allMediaAlbum = new AlbumEntry(0, LocaleController.getString("AllMedia", R.string.AllMedia), photoEntry);
mediaAlbumsSorted.add(0, allMediaAlbum);
}
allVideosAlbum.addPhoto(photoEntry);
allMediaAlbum.addPhoto(photoEntry);
AlbumEntry albumEntry = mediaAlbums.get(bucketId);
@ -3182,24 +3196,25 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
return 0;
});
}
broadcastNewPhotos(guid, mediaAlbumsSorted, photoAlbumsSorted, mediaCameraAlbumId, allMediaAlbum, allPhotosAlbum, 0);
broadcastNewPhotos(guid, mediaAlbumsSorted, photoAlbumsSorted, mediaCameraAlbumId, allMediaAlbum, allPhotosAlbum, allVideosAlbum, 0);
});
thread.setPriority(Thread.MIN_PRIORITY);
thread.start();
}
private static void broadcastNewPhotos(final int guid, final ArrayList<AlbumEntry> mediaAlbumsSorted, final ArrayList<AlbumEntry> photoAlbumsSorted, final Integer cameraAlbumIdFinal, final AlbumEntry allMediaAlbumFinal, final AlbumEntry allPhotosAlbumFinal, int delay) {
private static void broadcastNewPhotos(final int guid, final ArrayList<AlbumEntry> mediaAlbumsSorted, final ArrayList<AlbumEntry> photoAlbumsSorted, final Integer cameraAlbumIdFinal, final AlbumEntry allMediaAlbumFinal, final AlbumEntry allPhotosAlbumFinal, final AlbumEntry allVideosAlbumFinal, int delay) {
if (broadcastPhotosRunnable != null) {
AndroidUtilities.cancelRunOnUIThread(broadcastPhotosRunnable);
}
AndroidUtilities.runOnUIThread(broadcastPhotosRunnable = () -> {
if (PhotoViewer.getInstance().isVisible()) {
broadcastNewPhotos(guid, mediaAlbumsSorted, photoAlbumsSorted, cameraAlbumIdFinal, allMediaAlbumFinal, allPhotosAlbumFinal, 1000);
broadcastNewPhotos(guid, mediaAlbumsSorted, photoAlbumsSorted, cameraAlbumIdFinal, allMediaAlbumFinal, allPhotosAlbumFinal, allVideosAlbumFinal, 1000);
return;
}
broadcastPhotosRunnable = null;
allPhotosAlbumEntry = allPhotosAlbumFinal;
allMediaAlbumEntry = allMediaAlbumFinal;
allVideosAlbumEntry = allVideosAlbumFinal;
for (int a = 0; a < UserConfig.MAX_ACCOUNT_COUNT; a++) {
NotificationCenter.getInstance(a).postNotificationName(NotificationCenter.albumsDidLoad, guid, mediaAlbumsSorted, photoAlbumsSorted, cameraAlbumIdFinal);
}

View File

@ -9,6 +9,7 @@
package org.telegram.messenger;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.Build;
import android.text.Layout;
import android.text.Spannable;
@ -2314,6 +2315,10 @@ public class MessageObject {
return false;
}
public void resetLayout() {
layoutCreated = false;
}
public String getMimeType() {
if (messageOwner.media instanceof TLRPC.TL_messageMediaDocument) {
return messageOwner.media.document.mime_type;
@ -3098,14 +3103,32 @@ public class MessageObject {
}
public int getMaxMessageTextWidth() {
int maxWidth;
generatedWithMinSize = AndroidUtilities.isTablet() ? AndroidUtilities.getMinTabletSide() : AndroidUtilities.displaySize.x;
maxWidth = generatedWithMinSize - AndroidUtilities.dp(needDrawAvatarInternal() && !isOutOwner() ? 132 : 80);
if (needDrawShareButton() && !isOutOwner()) {
maxWidth -= AndroidUtilities.dp(10);
int maxWidth = 0;
if (AndroidUtilities.isTablet() && eventId != 0) {
generatedWithMinSize = AndroidUtilities.dp(530);
} else {
generatedWithMinSize = AndroidUtilities.isTablet() ? AndroidUtilities.getMinTabletSide() : AndroidUtilities.displaySize.x;
}
if (messageOwner.media instanceof TLRPC.TL_messageMediaGame) {
maxWidth -= AndroidUtilities.dp(10);
if (messageOwner.media instanceof TLRPC.TL_messageMediaWebPage && messageOwner.media.webpage != null && "telegram_background".equals(messageOwner.media.webpage.type)) {
try {
Uri uri = Uri.parse(messageOwner.media.webpage.url);
if (uri.getQueryParameter("bg_color") != null) {
maxWidth = AndroidUtilities.dp(220);
} else if (uri.getLastPathSegment().length() == 6) {
maxWidth = AndroidUtilities.dp(200);
}
} catch (Exception ignore) {
}
}
if (maxWidth == 0) {
maxWidth = generatedWithMinSize - AndroidUtilities.dp(needDrawAvatarInternal() && !isOutOwner() ? 132 : 80);
if (needDrawShareButton() && !isOutOwner()) {
maxWidth -= AndroidUtilities.dp(10);
}
if (messageOwner.media instanceof TLRPC.TL_messageMediaGame) {
maxWidth -= AndroidUtilities.dp(10);
}
}
return maxWidth;
}
@ -4342,6 +4365,26 @@ public class MessageObject {
return messageOwner.media instanceof TLRPC.TL_messageMediaWebPage && messageOwner.media.webpage != null && "telegram_background".equals(messageOwner.media.webpage.type);
}
public int getMediaExistanceFlags() {
int flags = 0;
if (attachPathExists) {
flags |= 1;
}
if (mediaExists) {
flags |= 2;
}
return flags;
}
public void applyMediaExistanceFlags(int flags) {
if (flags == -1) {
checkMediaExistance();
} else {
attachPathExists = (flags & 1) != 0;
mediaExists = (flags & 2) != 0;
}
}
public void checkMediaExistance() {
File cacheFile = null;
attachPathExists = false;

View File

@ -64,6 +64,8 @@ public class MessagesController implements NotificationCenter.NotificationCenter
public ArrayList<TLRPC.TL_dialog> dialogsForward = new ArrayList<>();
public ArrayList<TLRPC.TL_dialog> dialogsServerOnly = new ArrayList<>();
public ArrayList<TLRPC.TL_dialog> dialogsGroupsOnly = new ArrayList<>();
public ArrayList<TLRPC.TL_dialog> dialogsChannelsOnly = new ArrayList<>();
public ArrayList<TLRPC.TL_dialog> dialogsUsersOnly = new ArrayList<>();
public int unreadUnmutedDialogs;
public int nextDialogsCacheOffset;
public ConcurrentHashMap<Long, Integer> dialogs_read_inbox_max = new ConcurrentHashMap<>(100, 1.0f, 2);
@ -189,6 +191,10 @@ public class MessagesController implements NotificationCenter.NotificationCenter
private boolean offlineSent;
private String uploadingAvatar;
private String uploadingWallpaper;
private boolean uploadingWallpaperBlurred;
private boolean uploadingWallpaperMotion;
public boolean enableJoined;
public String linkPrefix;
public int maxGroupCount;
@ -689,11 +695,52 @@ public class MessagesController implements NotificationCenter.NotificationCenter
});
}
});
} else if (uploadingWallpaper != null && uploadingWallpaper.equals(location)) {
TLRPC.TL_account_uploadWallPaper req = new TLRPC.TL_account_uploadWallPaper();
req.file = file;
req.mime_type = "image/jpeg";
final TLRPC.TL_wallPaperSettings settings = new TLRPC.TL_wallPaperSettings();
settings.blur = uploadingWallpaperBlurred;
settings.motion = uploadingWallpaperMotion;
req.settings = settings;
ConnectionsManager.getInstance(currentAccount).sendRequest(req, (response, error) -> {
TLRPC.TL_wallPaper wallPaper = (TLRPC.TL_wallPaper) response;
File path = new File(ApplicationLoader.getFilesDirFixed(), uploadingWallpaperBlurred ? "wallpaper_original.jpg" : "wallpaper.jpg");
if (wallPaper != null) {
try {
AndroidUtilities.copyFile(path, FileLoader.getPathToAttach(wallPaper.document, true));
} catch (Exception ignore) {
}
}
AndroidUtilities.runOnUIThread(() -> {
if (uploadingWallpaper != null && wallPaper != null) {
wallPaper.settings = settings;
wallPaper.flags |= 4;
SharedPreferences preferences = getGlobalMainSettings();
SharedPreferences.Editor editor = preferences.edit();
editor.putLong("selectedBackground2", wallPaper.id);
editor.commit();
ArrayList<TLRPC.WallPaper> wallpapers = new ArrayList<>();
wallpapers.add(wallPaper);
MessagesStorage.getInstance(currentAccount).putWallpapers(wallpapers, 2);
TLRPC.PhotoSize image = FileLoader.getClosestPhotoSizeWithSize(wallPaper.document.thumbs, 320);
if (image != null) {
String newKey = image.location.volume_id + "_" + image.location.local_id + "@100_100";
String oldKey = Utilities.MD5(path.getAbsolutePath()) + "@100_100";
ImageLoader.getInstance().replaceImageInCache(oldKey, newKey, image.location, false);
}
NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.wallpapersNeedReload, wallPaper.id);
}
});
});
}
} else if (id == NotificationCenter.FileDidFailUpload) {
final String location = (String) args[0];
if (uploadingAvatar != null && uploadingAvatar.equals(location)) {
uploadingAvatar = null;
} else if (uploadingWallpaper != null && uploadingWallpaper.equals(location)) {
uploadingWallpaper = null;
}
} else if (id == NotificationCenter.messageReceivedByServer) {
Integer msgId = (Integer) args[0];
@ -762,6 +809,8 @@ public class MessagesController implements NotificationCenter.NotificationCenter
dialogsServerOnly.clear();
dialogsForward.clear();
dialogsGroupsOnly.clear();
dialogsChannelsOnly.clear();
dialogsUsersOnly.clear();
dialogMessagesByIds.clear();
dialogMessagesByRandomIds.clear();
channelAdmins.clear();
@ -829,6 +878,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
registeringForPush = false;
getDifferenceFirstSync = true;
uploadingAvatar = null;
uploadingWallpaper = null;
statusRequest = 0;
statusSettingState = 0;
@ -2185,6 +2235,83 @@ public class MessagesController implements NotificationCenter.NotificationCenter
FileLoader.getInstance(currentAccount).uploadFile(uploadingAvatar, false, true, ConnectionsManager.FileTypePhoto);
}
public void saveWallpaperToServer(File path, long wallPaperId, long accessHash, boolean isBlurred, boolean isMotion, int backgroundColor, float intesity, boolean install, long taskId) {
if (uploadingWallpaper != null) {
File finalPath = new File(ApplicationLoader.getFilesDirFixed(), uploadingWallpaperBlurred ? "wallpaper_original.jpg" : "wallpaper.jpg");
if (path != null && (path.getAbsolutePath().equals(uploadingWallpaper) || path.equals(finalPath))) {
uploadingWallpaperMotion = isMotion;
uploadingWallpaperBlurred = isBlurred;
return;
}
FileLoader.getInstance(currentAccount).cancelUploadFile(uploadingWallpaper, false);
uploadingWallpaper = null;
}
if (path != null) {
uploadingWallpaper = path.getAbsolutePath();
uploadingWallpaperMotion = isMotion;
uploadingWallpaperBlurred = isBlurred;
FileLoader.getInstance(currentAccount).uploadFile(uploadingWallpaper, false, true, ConnectionsManager.FileTypePhoto);
} else if (accessHash != 0) {
TLRPC.TL_inputWallPaper inputWallPaper = new TLRPC.TL_inputWallPaper();
inputWallPaper.id = wallPaperId;
inputWallPaper.access_hash = accessHash;
TLRPC.TL_wallPaperSettings settings = new TLRPC.TL_wallPaperSettings();
settings.blur = isBlurred;
settings.motion = isMotion;
if (backgroundColor != 0) {
settings.background_color = backgroundColor;
settings.flags |= 1;
settings.intensity = (int) (intesity * 100);
settings.flags |= 8;
}
TLObject req;
if (install) {
TLRPC.TL_account_installWallPaper request = new TLRPC.TL_account_installWallPaper();
request.wallpaper = inputWallPaper;
request.settings = settings;
req = request;
} else {
TLRPC.TL_account_saveWallPaper request = new TLRPC.TL_account_saveWallPaper();
request.wallpaper = inputWallPaper;
request.settings = settings;
req = request;
}
final long newTaskId;
if (taskId != 0) {
newTaskId = taskId;
} else {
NativeByteBuffer data = null;
try {
data = new NativeByteBuffer(44);
data.writeInt32(12);
data.writeInt64(wallPaperId);
data.writeInt64(accessHash);
data.writeBool(isBlurred);
data.writeBool(isMotion);
data.writeInt32(backgroundColor);
data.writeDouble(intesity);
data.writeBool(install);
} catch (Exception e) {
FileLog.e(e);
}
newTaskId = MessagesStorage.getInstance(currentAccount).createPendingTask(data);
}
ConnectionsManager.getInstance(currentAccount).sendRequest(req, (response, error) -> {
MessagesStorage.getInstance(currentAccount).removePendingTask(newTaskId);
if (!install && uploadingWallpaper != null) {
SharedPreferences preferences = getGlobalMainSettings();
SharedPreferences.Editor editor = preferences.edit();
editor.putLong("selectedBackground2", wallPaperId);
editor.commit();
}
});
}
}
public void markChannelDialogMessageAsDeleted(ArrayList<Integer> messages, final int channelId) {
MessageObject obj = dialogMessage.get((long) -channelId);
if (obj != null) {
@ -2381,6 +2508,8 @@ public class MessagesController implements NotificationCenter.NotificationCenter
});
}
dialogsGroupsOnly.remove(dialog);
dialogsChannelsOnly.remove(dialog);
dialogsUsersOnly.remove(dialog);
dialogsForward.remove(dialog);
dialogs_dict.remove(did);
dialogs_read_inbox_max.remove(did);
@ -4265,6 +4394,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
}
final LongSparseArray<TLRPC.TL_dialog> new_dialogs_dict = new LongSparseArray<>();
final SparseArray<TLRPC.EncryptedChat> enc_chats_dict;
final LongSparseArray<MessageObject> new_dialogMessage = new LongSparseArray<>();
final SparseArray<TLRPC.User> usersDict = new SparseArray<>();
final SparseArray<TLRPC.Chat> chatsDict = new SparseArray<>();
@ -4277,6 +4407,15 @@ public class MessagesController implements NotificationCenter.NotificationCenter
TLRPC.Chat c = dialogsRes.chats.get(a);
chatsDict.put(c.id, c);
}
if (encChats != null) {
enc_chats_dict = new SparseArray<>();
for (int a = 0, N = encChats.size(); a < N; a++) {
TLRPC.EncryptedChat encryptedChat = encChats.get(a);
enc_chats_dict.put(encryptedChat.id, encryptedChat);
}
} else {
enc_chats_dict = null;
}
if (loadType == 1) {
nextDialogsCacheOffset = offset + count;
}
@ -4365,6 +4504,13 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (d.id == 0) {
continue;
}
int lower_id = (int) d.id;
int high_id = (int) (d.id >> 32);
if (lower_id == 0 && enc_chats_dict != null) {
if (enc_chats_dict.get(high_id) == null) {
continue;
}
}
if (proxyDialogId != 0 && proxyDialogId == d.id) {
proxyDialog = d;
}
@ -6457,7 +6603,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
long[] ids = corrected.valueAt(a);
int oldId = (int) ids[1];
SendMessagesHelper.getInstance(currentAccount).processSentMessage(oldId);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, newId, null, ids[0], 0L);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, newId, null, ids[0], 0L, -1);
}
});
}
@ -6703,7 +6849,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
long[] ids = corrected.valueAt(a);
int oldId = (int) ids[1];
SendMessagesHelper.getInstance(currentAccount).processSentMessage(oldId);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, newId, null, ids[0], 0L);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, newId, null, ids[0], 0L, -1);
}
});
}
@ -9593,6 +9739,8 @@ public class MessagesController implements NotificationCenter.NotificationCenter
dialogs.remove(dialog);
dialogsServerOnly.remove(dialog);
dialogsGroupsOnly.remove(dialog);
dialogsChannelsOnly.remove(dialog);
dialogsUsersOnly.remove(dialog);
dialogsForward.remove(dialog);
dialogs_dict.remove(dialog.id);
dialogs_read_inbox_max.remove(dialog.id);
@ -9711,6 +9859,8 @@ public class MessagesController implements NotificationCenter.NotificationCenter
public void sortDialogs(SparseArray<TLRPC.Chat> chatsDict) {
dialogsServerOnly.clear();
dialogsGroupsOnly.clear();
dialogsChannelsOnly.clear();
dialogsUsersOnly.clear();
dialogsForward.clear();
unreadUnmutedDialogs = 0;
boolean selfAdded = false;
@ -9740,6 +9890,11 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (chat != null && (chat.megagroup && (chat.admin_rights != null && (chat.admin_rights.post_messages || chat.admin_rights.add_admins)) || chat.creator)) {
dialogsGroupsOnly.add(d);
}
if (chat != null && chat.megagroup) {
} else {
dialogsChannelsOnly.add(d);
}
} else if (lower_id < 0) {
if (chatsDict != null) {
TLRPC.Chat chat = chatsDict.get(-lower_id);
@ -9750,6 +9905,8 @@ public class MessagesController implements NotificationCenter.NotificationCenter
}
}
dialogsGroupsOnly.add(d);
} else if (lower_id > 0) {
dialogsUsersOnly.add(d);
}
}
if (proxyDialog != null && d.id == proxyDialog.id && isLeftProxyChannel) {

View File

@ -1013,6 +1013,17 @@ public class MessagesStorage {
AndroidUtilities.runOnUIThread(() -> MessagesController.getInstance(currentAccount).markMessageAsRead(mid, channelId, inputChannel, ttl, taskId));
break;
}
case 12: {
long wallPaperId = data.readInt64(false);
long accessHash = data.readInt64(false);
boolean isBlurred = data.readBool(false);
boolean isMotion = data.readBool(false);
int backgroundColor = data.readInt32(false);
float intesity = (float) data.readDouble(false);
boolean install = data.readBool(false);
AndroidUtilities.runOnUIThread(() -> MessagesController.getInstance(currentAccount).saveWallpaperToServer(null, wallPaperId, accessHash, isBlurred, isMotion, backgroundColor, intesity, install, taskId));
break;
}
}
data.reuse();
}
@ -1333,28 +1344,28 @@ public class MessagesStorage {
});
}
public void putWallpapers(final ArrayList<TLRPC.TL_wallPaper> wallPapers, boolean replace) {
public void putWallpapers(final ArrayList<TLRPC.WallPaper> wallPapers, int action) {
storageQueue.postRunnable(() -> {
try {
if (replace) {
if (action == 1) {
database.executeFast("DELETE FROM wallpapers2 WHERE 1").stepThis().dispose();
}
database.beginTransaction();
SQLitePreparedStatement state;
if (replace) {
if (action != 0) {
state = database.executeFast("REPLACE INTO wallpapers2 VALUES(?, ?, ?)");
} else {
state = database.executeFast("UPDATE wallpapers2 SET data = ? WHERE uid = ?");
}
for (int a = 0, N = wallPapers.size(); a < N; a++) {
TLRPC.TL_wallPaper wallPaper = wallPapers.get(a);
TLRPC.TL_wallPaper wallPaper = (TLRPC.TL_wallPaper) wallPapers.get(a);
state.requery();
NativeByteBuffer data = new NativeByteBuffer(wallPaper.getObjectSize());
wallPaper.serializeToStream(data);
if (replace) {
if (action != 0) {
state.bindLong(1, wallPaper.id);
state.bindByteBuffer(2, data);
state.bindInteger(3, a);
state.bindInteger(3, action == 2 ? -1 : a);
} else {
state.bindByteBuffer(1, data);
state.bindLong(2, wallPaper.id);
@ -1379,7 +1390,7 @@ public class MessagesStorage {
while (cursor.next()) {
NativeByteBuffer data = cursor.byteBufferValue(0);
if (data != null) {
TLRPC.TL_wallPaper wallPaper = TLRPC.TL_wallPaper.TLdeserialize(data, data.readInt32(false), false);
TLRPC.TL_wallPaper wallPaper = (TLRPC.TL_wallPaper) TLRPC.WallPaper.TLdeserialize(data, data.readInt32(false), false);
data.reuse();
if (wallPaper != null) {
wallPapers.add(wallPaper);
@ -7292,7 +7303,6 @@ public class MessagesStorage {
if (!encryptedToLoad.isEmpty()) {
getEncryptedChatsInternal(TextUtils.join(",", encryptedToLoad), encryptedChats, usersToLoad);
}
if (!chatsToLoad.isEmpty()) {
getChatsInternal(TextUtils.join(",", chatsToLoad), dialogs.chats);
}

View File

@ -134,6 +134,7 @@ public class NotificationCenter {
public static final int pushMessagesUpdated = totalEvents++;
public static final int stopEncodingService = totalEvents++;
public static final int wallpapersDidLoad = totalEvents++;
public static final int wallpapersNeedReload = totalEvents++;
public static final int didReceiveSmsCode = totalEvents++;
public static final int didReceiveCall = totalEvents++;
public static final int emojiDidLoad = totalEvents++;

View File

@ -704,8 +704,12 @@ public class SecretChatHelper {
if (isSecretVisibleMessage(newMsgObj)) {
newMsgObj.date = res.date;
}
int existFlags;
if (newMsg != null && res.file instanceof TLRPC.TL_encryptedFile) {
updateMediaPaths(newMsg, res.file, req, originalPath);
existFlags = newMsg.getMediaExistanceFlags();
} else {
existFlags = 0;
}
MessagesStorage.getInstance(currentAccount).getStorageQueue().postRunnable(() -> {
if (isSecretInvisibleMessage(newMsgObj)) {
@ -714,7 +718,7 @@ public class SecretChatHelper {
MessagesStorage.getInstance(currentAccount).updateMessageStateAndId(newMsgObj.random_id, newMsgObj.id, newMsgObj.id, res.date, false, 0);
AndroidUtilities.runOnUIThread(() -> {
newMsgObj.send_state = MessageObject.MESSAGE_SEND_STATE_SENT;
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, newMsgObj.id, newMsgObj.id, newMsgObj, newMsgObj.dialog_id, 0L);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, newMsgObj.id, newMsgObj.id, newMsgObj, newMsgObj.dialog_id, 0L, existFlags);
SendMessagesHelper.getInstance(currentAccount).processSentMessage(newMsgObj.id);
if (MessageObject.isVideoMessage(newMsgObj) || MessageObject.isNewGifMessage(newMsgObj) || MessageObject.isRoundVideoMessage(newMsgObj)) {
SendMessagesHelper.getInstance(currentAccount).stopVideoService(attachPath);

View File

@ -981,10 +981,15 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
return;
}
if (messageObject.messageOwner.media != null && !(messageObject.messageOwner.media instanceof TLRPC.TL_messageMediaEmpty) && !(messageObject.messageOwner.media instanceof TLRPC.TL_messageMediaWebPage) && !(messageObject.messageOwner.media instanceof TLRPC.TL_messageMediaGame) && !(messageObject.messageOwner.media instanceof TLRPC.TL_messageMediaInvoice)) {
HashMap<String, String> params = null;
if ((int) did == 0 && messageObject.messageOwner.to_id != null && (messageObject.messageOwner.media.photo instanceof TLRPC.TL_photo || messageObject.messageOwner.media.document instanceof TLRPC.TL_document)) {
params = new HashMap<>();
params.put("parentObject", "sent_" + messageObject.messageOwner.to_id.channel_id + "_" + messageObject.getId());
}
if (messageObject.messageOwner.media.photo instanceof TLRPC.TL_photo) {
sendMessage((TLRPC.TL_photo) messageObject.messageOwner.media.photo, null, did, messageObject.replyMessageObject, messageObject.messageOwner.message, messageObject.messageOwner.entities, null, null, messageObject.messageOwner.media.ttl_seconds, messageObject);
sendMessage((TLRPC.TL_photo) messageObject.messageOwner.media.photo, null, did, messageObject.replyMessageObject, messageObject.messageOwner.message, messageObject.messageOwner.entities, null, params, messageObject.messageOwner.media.ttl_seconds, messageObject);
} else if (messageObject.messageOwner.media.document instanceof TLRPC.TL_document) {
sendMessage((TLRPC.TL_document) messageObject.messageOwner.media.document, null, messageObject.messageOwner.attachPath, did, messageObject.replyMessageObject, messageObject.messageOwner.message, messageObject.messageOwner.entities, null, null, messageObject.messageOwner.media.ttl_seconds, messageObject);
sendMessage((TLRPC.TL_document) messageObject.messageOwner.media.document, null, messageObject.messageOwner.attachPath, did, messageObject.replyMessageObject, messageObject.messageOwner.message, messageObject.messageOwner.entities, null, params, messageObject.messageOwner.media.ttl_seconds, messageObject);
} else if (messageObject.messageOwner.media instanceof TLRPC.TL_messageMediaVenue || messageObject.messageOwner.media instanceof TLRPC.TL_messageMediaGeo) {
sendMessage(messageObject.messageOwner.media, did, messageObject.replyMessageObject, null, null);
} else if (messageObject.messageOwner.media.phone_number != null) {
@ -1438,6 +1443,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
final ArrayList<TLRPC.Message> sentMessages = new ArrayList<>();
sentMessages.add(message);
updateMediaPaths(msgObj1, message, message.id, null, true);
int existFlags = msgObj1.getMediaExistanceFlags();
newMsgObj1.id = message.id;
sentCount++;
MessagesStorage.getInstance(currentAccount).getStorageQueue().postRunnable(() -> {
@ -1446,7 +1452,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
AndroidUtilities.runOnUIThread(() -> {
newMsgObj1.send_state = MessageObject.MESSAGE_SEND_STATE_SENT;
DataQuery.getInstance(currentAccount).increasePeerRaiting(peer);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, message.id, message, peer, 0L);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, message.id, message, peer, 0L, existFlags);
processSentMessage(oldId);
removeFromSendingMessages(oldId);
});
@ -3078,7 +3084,11 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
delayedMessage.originalPath = originalPath;
delayedMessage.sendEncryptedRequest = reqSend;
delayedMessage.obj = newMsgObj;
delayedMessage.parentObject = parentObject;
if (params != null && params.containsKey("parentObject")) {
delayedMessage.parentObject = params.get("parentObject");
} else {
delayedMessage.parentObject = parentObject;
}
delayedMessage.performMediaUpload = true;
}
if (!TextUtils.isEmpty(path) && path.startsWith("http")) {
@ -3138,7 +3148,11 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
delayedMessage.sendEncryptedRequest = reqSend;
delayedMessage.originalPath = originalPath;
delayedMessage.obj = newMsgObj;
delayedMessage.parentObject = parentObject;
if (params != null && params.containsKey("parentObject")) {
delayedMessage.parentObject = params.get("parentObject");
} else {
delayedMessage.parentObject = parentObject;
}
delayedMessage.performMediaUpload = true;
}
delayedMessage.videoEditedInfo = videoEditedInfo;
@ -3202,7 +3216,11 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
delayedMessage.sendEncryptedRequest = reqSend;
delayedMessage.type = 2;
delayedMessage.obj = newMsgObj;
delayedMessage.parentObject = parentObject;
if (params != null && params.containsKey("parentObject")) {
delayedMessage.parentObject = params.get("parentObject");
} else {
delayedMessage.parentObject = parentObject;
}
delayedMessage.encryptedChat = encryptedChat;
delayedMessage.performMediaUpload = true;
if (path != null && path.length() > 0 && path.startsWith("http")) {
@ -3378,7 +3396,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
}
if (!file.exists()) {
putToDelayedMessages(FileLoader.getAttachFileName(message.location), message);
FileLoader.getInstance(currentAccount).loadFile(message.location, message, "jpg", 0, 2, 0);
FileLoader.getInstance(currentAccount).loadFile(message.location, message.parentObject, "jpg", 0, 2, 0);
return;
}
}
@ -3454,7 +3472,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
File file = new File(location);
if (!file.exists()) {
putToDelayedMessages(FileLoader.getAttachFileName(document), message);
FileLoader.getInstance(currentAccount).loadFile(document, message, 2, 0);
FileLoader.getInstance(currentAccount).loadFile(document, message.parentObject, 2, 0);
return;
}
}
@ -3496,7 +3514,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
File file = new File(location);
if (!file.exists()) {
putToDelayedMessages(FileLoader.getAttachFileName(document), message);
FileLoader.getInstance(currentAccount).loadFile(document, message, 2, 0);
FileLoader.getInstance(currentAccount).loadFile(document, message.parentObject, 2, 0);
return;
}
}
@ -3820,6 +3838,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
final ArrayList<TLRPC.Message> sentMessages = new ArrayList<>();
final String attachPath = newMsgObj.attachPath;
final long grouped_id;
final int existFlags;
Integer id = newIds.get(newMsgObj.random_id);
if (id != null) {
@ -3827,6 +3846,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
if (message != null) {
sentMessages.add(message);
updateMediaPaths(msgObj, message, message.id, originalPath, false);
existFlags = msgObj.getMediaExistanceFlags();
newMsgObj.id = message.id;
if ((newMsgObj.flags & TLRPC.MESSAGE_FLAG_MEGAGROUP) != 0) {
message.flags |= TLRPC.MESSAGE_FLAG_MEGAGROUP;
@ -3851,13 +3871,13 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
if (!isSentError) {
StatsController.getInstance(currentAccount).incrementSentItemsCount(ApplicationLoader.getCurrentNetworkType(), StatsController.TYPE_MESSAGES, 1);
newMsgObj.send_state = MessageObject.MESSAGE_SEND_STATE_SENT;
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, newMsgObj.id, newMsgObj, newMsgObj.dialog_id, grouped_id);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, newMsgObj.id, newMsgObj, newMsgObj.dialog_id, grouped_id, existFlags);
MessagesStorage.getInstance(currentAccount).getStorageQueue().postRunnable(() -> {
MessagesStorage.getInstance(currentAccount).updateMessageStateAndId(newMsgObj.random_id, oldId, newMsgObj.id, 0, false, newMsgObj.to_id.channel_id);
MessagesStorage.getInstance(currentAccount).putMessages(sentMessages, true, false, false, 0);
AndroidUtilities.runOnUIThread(() -> {
DataQuery.getInstance(currentAccount).increasePeerRaiting(newMsgObj.dialog_id);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, newMsgObj.id, newMsgObj, newMsgObj.dialog_id, grouped_id);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, newMsgObj.id, newMsgObj, newMsgObj.dialog_id, grouped_id, existFlags);
processSentMessage(oldId);
removeFromSendingMessages(oldId);
});
@ -4012,9 +4032,11 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
final boolean isBroadcast = req instanceof TLRPC.TL_messages_sendBroadcast;
final ArrayList<TLRPC.Message> sentMessages = new ArrayList<>();
final String attachPath = newMsgObj.attachPath;
final int existFlags;
if (response instanceof TLRPC.TL_updateShortSentMessage) {
final TLRPC.TL_updateShortSentMessage res = (TLRPC.TL_updateShortSentMessage) response;
updateMediaPaths(msgObj, null, res.id, null, false);
existFlags = msgObj.getMediaExistanceFlags();
newMsgObj.local_id = newMsgObj.id = res.id;
newMsgObj.date = res.date;
newMsgObj.entities = res.entities;
@ -4064,11 +4086,15 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
}
message.unread = value < message.id;
updateMediaPaths(msgObj, message, message.id, originalPath, false);
existFlags = msgObj.getMediaExistanceFlags();
newMsgObj.id = message.id;
} else {
isSentError = true;
existFlags = 0;
}
Utilities.stageQueue.postRunnable(() -> MessagesController.getInstance(currentAccount).processUpdates(updates, false));
} else {
existFlags = 0;
}
if (MessageObject.isLiveLocationMessage(newMsgObj)) {
@ -4078,7 +4104,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
if (!isSentError) {
StatsController.getInstance(currentAccount).incrementSentItemsCount(ApplicationLoader.getCurrentNetworkType(), StatsController.TYPE_MESSAGES, 1);
newMsgObj.send_state = MessageObject.MESSAGE_SEND_STATE_SENT;
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, (isBroadcast ? oldId : newMsgObj.id), newMsgObj, newMsgObj.dialog_id, 0L);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, (isBroadcast ? oldId : newMsgObj.id), newMsgObj, newMsgObj.dialog_id, 0L, existFlags);
MessagesStorage.getInstance(currentAccount).getStorageQueue().postRunnable(() -> {
MessagesStorage.getInstance(currentAccount).updateMessageStateAndId(newMsgObj.random_id, oldId, (isBroadcast ? oldId : newMsgObj.id), 0, false, newMsgObj.to_id.channel_id);
MessagesStorage.getInstance(currentAccount).putMessages(sentMessages, true, false, isBroadcast, 0);
@ -4099,7 +4125,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.dialogsNeedReload);
}
DataQuery.getInstance(currentAccount).increasePeerRaiting(newMsgObj.dialog_id);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, (isBroadcast ? oldId : newMsgObj.id), newMsgObj, newMsgObj.dialog_id, 0L);
NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.messageReceivedByServer, oldId, (isBroadcast ? oldId : newMsgObj.id), newMsgObj, newMsgObj.dialog_id, 0L, existFlags);
processSentMessage(oldId);
removeFromSendingMessages(oldId);
});
@ -4569,6 +4595,12 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
case "opus":
document.mime_type = "audio/opus";
break;
case "mp3":
document.mime_type = "audio/mpeg";
break;
case "m4a":
document.mime_type = "audio/m4a";
break;
case "ogg":
document.mime_type = "audio/ogg";
break;

View File

@ -68,6 +68,9 @@ public class Utilities {
public static native void stackBlurBitmap(Bitmap bitmap, int radius);
public static Bitmap blurWallpaper(Bitmap src) {
if (src == null) {
return null;
}
Bitmap b;
if (src.getHeight() > src.getWidth()) {
b = Bitmap.createBitmap(Math.round(450f * src.getWidth() / src.getHeight()), 450, Bitmap.Config.ARGB_8888);

View File

@ -16,10 +16,12 @@
*/
package org.telegram.messenger.time;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.R;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.text.DateFormat;
import java.text.DateFormatSymbols;
import java.text.FieldPosition;
@ -167,49 +169,14 @@ public class FastDatePrinter implements DatePrinter, Serializable {
* @throws IllegalArgumentException if pattern is invalid
*/
private static boolean gotMethods;
private static Method getStandAloneMonthsMethod;
private static Method getShortStandAloneMonths;
protected List<Rule> parsePattern() {
if (!gotMethods) {
try {
getStandAloneMonthsMethod = DateFormatSymbols.class.getDeclaredMethod("getStandAloneMonths");
getStandAloneMonthsMethod.setAccessible(true);
getShortStandAloneMonths = DateFormatSymbols.class.getDeclaredMethod("getShortStandAloneMonths");
getShortStandAloneMonths.setAccessible(true);
} catch (Throwable ignore) {
}
gotMethods = true;
}
final DateFormatSymbols symbols = new DateFormatSymbols(mLocale);
final List<Rule> rules = new ArrayList<Rule>();
final String[] ERAs = symbols.getEras();
final String[] months = symbols.getMonths();
String[] standaloneMonths;
if (getStandAloneMonthsMethod != null) {
try {
standaloneMonths = (String[]) getStandAloneMonthsMethod.invoke(symbols);
} catch (Throwable ignore) {
standaloneMonths = months;
}
} else {
standaloneMonths = months;
}
final String[] shortMonths = symbols.getShortMonths();
String[] shortStandaloneMonths;
if (getShortStandAloneMonths != null) {
try {
shortStandaloneMonths = (String[]) getShortStandAloneMonths.invoke(symbols);
} catch (Throwable ignore) {
shortStandaloneMonths = shortMonths;
}
} else {
shortStandaloneMonths = shortMonths;
}
final String[] weekdays = symbols.getWeekdays();
final String[] shortWeekdays = symbols.getShortWeekdays();
final String[] AmPmStrings = symbols.getAmPmStrings();
@ -243,9 +210,9 @@ public class FastDatePrinter implements DatePrinter, Serializable {
break;
case 'L': // month in year (text and number)
if (tokenLen >= 4) {
rule = new TextField(Calendar.MONTH, standaloneMonths);
rule = new TextField(Calendar.MONTH, months);
} else if (tokenLen == 3) {
rule = new TextField(Calendar.MONTH, shortStandaloneMonths);
rule = new TextField(Calendar.MONTH, shortMonths);
} else if (tokenLen == 2) {
rule = TwoDigitMonthField.INSTANCE;
} else {

View File

@ -89,13 +89,17 @@ public class ConnectionsManager {
private static class ResolvedDomain {
public String address;
public ArrayList<String> addresses;
long ttl;
public ResolvedDomain(String a, long t) {
address = a;
public ResolvedDomain(ArrayList<String> a, long t) {
addresses = a;
ttl = t;
}
public String getAddress() {
return addresses.get(Utilities.random.nextInt(addresses.size()));
}
}
private static ThreadLocal<HashMap<String, ResolvedDomain>> dnsCache = new ThreadLocal<HashMap<String, ResolvedDomain>>() {
@ -438,7 +442,7 @@ public class ConnectionsManager {
});
}
public static int getInitFlags() {
public static int getInitFlags() {
return 0;
}
@ -492,7 +496,7 @@ public class ConnectionsManager {
HashMap<String, ResolvedDomain> cache = dnsCache.get();
ResolvedDomain resolvedDomain = cache.get(domain);
if (resolvedDomain != null && SystemClock.elapsedRealtime() - resolvedDomain.ttl < 5 * 60 * 1000) {
return resolvedDomain.address;
return resolvedDomain.getAddress();
}
ByteArrayOutputStream outbuf = null;
@ -525,10 +529,13 @@ public class ConnectionsManager {
JSONArray array = jsonObject.getJSONArray("Answer");
int len = array.length();
if (len > 0) {
String ip = array.getJSONObject(Utilities.random.nextInt(array.length())).getString("data");
ResolvedDomain newResolvedDomain = new ResolvedDomain(ip, SystemClock.elapsedRealtime());
ArrayList<String> addresses = new ArrayList<>(len);
for (int a = 0; a < len; a++) {
addresses.add(array.getJSONObject(a).getString("data"));
}
ResolvedDomain newResolvedDomain = new ResolvedDomain(addresses, SystemClock.elapsedRealtime());
cache.put(domain, newResolvedDomain);
return ip;
return newResolvedDomain.getAddress();
}
} catch (Throwable e) {
FileLog.e(e);
@ -741,7 +748,14 @@ public class ConnectionsManager {
googleDomain = "google.com";
}
String domain = native_isTestBackend(currentAccount) != 0 ? "tapv2.stel.com" : MessagesController.getInstance(currentAccount).dcDomainName;
URL downloadUrl = new URL("https://" + googleDomain + "/resolve?name=" + domain + "&type=16");
int len = Utilities.random.nextInt(116) + 13;
final String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
StringBuilder padding = new StringBuilder(len);
for (int a = 0; a < len; a++) {
padding.append(characters.charAt(Utilities.random.nextInt(characters.length())));
}
URL downloadUrl = new URL("https://" + googleDomain + "/resolve?name=" + domain + "&type=ANY&random_padding=" + padding);
URLConnection httpConnection = downloadUrl.openConnection();
httpConnection.addRequestProperty("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0 like Mac OS X) AppleWebKit/602.1.38 (KHTML, like Gecko) Version/10.0 Mobile/14A5297c Safari/602.1");
httpConnection.addRequestProperty("Host", "dns.google.com");
@ -769,10 +783,15 @@ public class ConnectionsManager {
JSONObject jsonObject = new JSONObject(new String(outbuf.toByteArray(), "UTF-8"));
JSONArray array = jsonObject.getJSONArray("Answer");
int len = array.length();
len = array.length();
ArrayList<String> arrayList = new ArrayList<>(len);
for (int a = 0; a < len; a++) {
arrayList.add(array.getJSONObject(a).getString("data"));
JSONObject object = array.getJSONObject(a);
int type = object.getInt("type");
if (type != 16) {
continue;
}
arrayList.add(object.getString("data"));
}
Collections.sort(arrayList, (o1, o2) -> {
int l1 = o1.length();

View File

@ -59,7 +59,7 @@ public class TLRPC {
public static final int MESSAGE_FLAG_EDITED = 0x00008000;
public static final int MESSAGE_FLAG_MEGAGROUP = 0x80000000;
public static final int LAYER = 94;
public static final int LAYER = 95;
public static class TL_chatBannedRights extends TLObject {
public static int constructor = 0x9f120418;
@ -13537,7 +13537,7 @@ public class TLRPC {
public static int constructor = 0x702b65a9;
public int hash;
public ArrayList<TL_wallPaper> wallpapers = new ArrayList<>();
public ArrayList<WallPaper> wallpapers = new ArrayList<>();
public void readParams(AbstractSerializedData stream, boolean exception) {
hash = stream.readInt32(exception);
@ -13550,7 +13550,7 @@ public class TLRPC {
}
int count = stream.readInt32(exception);
for (int a = 0; a < count; a++) {
TL_wallPaper object = TL_wallPaper.TLdeserialize(stream, stream.readInt32(exception), exception);
WallPaper object = WallPaper.TLdeserialize(stream, stream.readInt32(exception), exception);
if (object == null) {
return;
}
@ -22613,6 +22613,54 @@ public class TLRPC {
}
}
public static class TL_wallPaperSettings extends TLObject {
public static int constructor = 0xa12f40b8;
public int flags;
public boolean blur;
public boolean motion;
public int background_color;
public int intensity;
public static TL_wallPaperSettings TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_wallPaperSettings.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_wallPaperSettings", constructor));
} else {
return null;
}
}
TL_wallPaperSettings result = new TL_wallPaperSettings();
result.readParams(stream, exception);
return result;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
flags = stream.readInt32(exception);
blur = (flags & 2) != 0;
motion = (flags & 4) != 0;
if ((flags & 1) != 0) {
background_color = stream.readInt32(exception);
}
if ((flags & 8) != 0) {
intensity = stream.readInt32(exception);
}
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
flags = blur ? (flags | 2) : (flags &~ 2);
flags = motion ? (flags | 4) : (flags &~ 4);
stream.writeInt32(flags);
if ((flags & 1) != 0) {
stream.writeInt32(background_color);
}
if ((flags & 8) != 0) {
stream.writeInt32(intensity);
}
}
}
public static class TL_contacts_found extends TLObject {
public static int constructor = 0xb3134d9d;
@ -26823,30 +26871,78 @@ public class TLRPC {
public static int constructor = 0xe317af7e;
}
public static class TL_wallPaper extends TLObject {
public static int constructor = 0xf04f91ec;
public static abstract class WallPaper extends TLObject {
public static WallPaper TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
WallPaper result = null;
switch (constructor) {
case 0xa437c3ed:
result = new TL_wallPaper();
break;
case 0xf04f91ec:
result = new TL_wallPaper_layer94();
break;
}
if (result == null && exception) {
throw new RuntimeException(String.format("can't parse magic %x in WallPaper", constructor));
}
if (result != null) {
result.readParams(stream, exception);
}
return result;
}
}
public static class TL_wallPaper extends WallPaper {
public static int constructor = 0xa437c3ed;
public long id;
public int flags;
public boolean creator;
public boolean isDefault;
public boolean pattern;
public boolean dark;
public long access_hash;
public String slug;
public Document document;
public TL_wallPaperSettings settings;
public static TL_wallPaper TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
if (TL_wallPaper.constructor != constructor) {
if (exception) {
throw new RuntimeException(String.format("can't parse magic %x in TL_wallPaper", constructor));
} else {
return null;
}
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
flags = stream.readInt32(exception);
creator = (flags & 1) != 0;
isDefault = (flags & 2) != 0;
pattern = (flags & 8) != 0;
dark = (flags & 16) != 0;
access_hash = stream.readInt64(exception);
slug = stream.readString(exception);
document = Document.TLdeserialize(stream, stream.readInt32(exception), exception);
if ((flags & 4) != 0) {
settings = TL_wallPaperSettings.TLdeserialize(stream, stream.readInt32(exception), exception);
}
TL_wallPaper result = new TL_wallPaper();
result.readParams(stream, exception);
return result;
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
stream.writeInt64(id);
flags = creator ? (flags | 1) : (flags &~ 1);
flags = isDefault ? (flags | 2) : (flags &~ 2);
flags = pattern ? (flags | 8) : (flags &~ 8);
flags = dark ? (flags | 16) : (flags &~ 16);
stream.writeInt32(flags);
stream.writeInt64(access_hash);
stream.writeString(slug);
document.serializeToStream(stream);
if ((flags & 4) != 0) {
settings.serializeToStream(stream);
}
}
}
public static class TL_wallPaper_layer94 extends TL_wallPaper {
public static int constructor = 0xf04f91ec;
public void readParams(AbstractSerializedData stream, boolean exception) {
id = stream.readInt64(exception);
flags = stream.readInt32(exception);
@ -30913,30 +31009,13 @@ public class TLRPC {
}
}
public static class TL_account_uploadWallPaper extends TLObject {
public static int constructor = 0xc7ba9b4d;
public InputFile file;
public String mime_type;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_wallPaper.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
file.serializeToStream(stream);
stream.writeString(mime_type);
}
}
public static class TL_account_getWallPaper extends TLObject {
public static int constructor = 0xfc8ddbea;
public InputWallPaper wallpaper;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return TL_wallPaper.TLdeserialize(stream, constructor, exception);
return WallPaper.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
@ -30945,11 +31024,31 @@ public class TLRPC {
}
}
public static class TL_account_uploadWallPaper extends TLObject {
public static int constructor = 0xdd853661;
public InputFile file;
public String mime_type;
public TL_wallPaperSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return WallPaper.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
file.serializeToStream(stream);
stream.writeString(mime_type);
settings.serializeToStream(stream);
}
}
public static class TL_account_saveWallPaper extends TLObject {
public static int constructor = 0x189581b3;
public static int constructor = 0x6c5a5b37;
public InputWallPaper wallpaper;
public boolean unsave;
public TL_wallPaperSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
@ -30959,13 +31058,15 @@ public class TLRPC {
stream.writeInt32(constructor);
wallpaper.serializeToStream(stream);
stream.writeBool(unsave);
settings.serializeToStream(stream);
}
}
public static class TL_account_installWallPaper extends TLObject {
public static int constructor = 0x4a0378ce;
public static int constructor = 0xfeed5769;
public InputWallPaper wallpaper;
public TL_wallPaperSettings settings;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
@ -30974,6 +31075,20 @@ public class TLRPC {
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
wallpaper.serializeToStream(stream);
settings.serializeToStream(stream);
}
}
public static class TL_account_resetWallPapers extends TLObject {
public static int constructor = 0xbb3b9804;
public TLObject deserializeResponse(AbstractSerializedData stream, int constructor, boolean exception) {
return Bool.TLdeserialize(stream, constructor, exception);
}
public void serializeToStream(AbstractSerializedData stream) {
stream.writeInt32(constructor);
}
}
@ -34398,7 +34513,14 @@ public class TLRPC {
protected void writeAttachPath(AbstractSerializedData stream) {
if (this instanceof TL_message_secret || this instanceof TL_message_secret_layer72) {
stream.writeString(attachPath);
String path = attachPath != null ? attachPath : "";
if (send_state == 1 && params != null && params.size() > 0) {
for (HashMap.Entry<String, String> entry : params.entrySet()) {
path = entry.getKey() + "|=|" + entry.getValue() + "||" + path;
}
path = "||" + path;
}
stream.writeString(path);
} else {
String path = attachPath != null ? attachPath : "";
if ((id < 0 || send_state == 3) && params != null && params.size() > 0) {

View File

@ -171,6 +171,7 @@ public class ActionBarLayout extends FrameLayout {
private float themeAnimationValue;
private boolean animateThemeAfterAnimation;
private Theme.ThemeInfo animateSetThemeAfterAnimation;
private boolean animateSetThemeNightAfterAnimation;
private boolean rebuildAfterAnimation;
private boolean rebuildLastAfterAnimation;
private boolean showLastAfterAnimation;
@ -1287,10 +1288,11 @@ public class ActionBarLayout extends FrameLayout {
return themeAnimationValue;
}
public void animateThemedValues(Theme.ThemeInfo theme) {
public void animateThemedValues(Theme.ThemeInfo theme, boolean nightTheme) {
if (transitionAnimationInProgress || startedTracking) {
animateThemeAfterAnimation = true;
animateSetThemeAfterAnimation = theme;
animateSetThemeNightAfterAnimation = nightTheme;
return;
}
if (themeAnimatorSet != null) {
@ -1324,7 +1326,7 @@ public class ActionBarLayout extends FrameLayout {
}
}
if (i == 0) {
Theme.applyTheme(theme, true);
Theme.applyTheme(theme, nightTheme);
}
animateEndColors[i] = new int[themeAnimatorDescriptions[i].length];
for (int a = 0; a < themeAnimatorDescriptions[i].length; a++) {
@ -1436,7 +1438,7 @@ public class ActionBarLayout extends FrameLayout {
rebuildAllFragmentViews(rebuildLastAfterAnimation, showLastAfterAnimation);
rebuildAfterAnimation = false;
} else if (animateThemeAfterAnimation) {
animateThemedValues(animateSetThemeAfterAnimation);
animateThemedValues(animateSetThemeAfterAnimation, animateSetThemeNightAfterAnimation);
animateSetThemeAfterAnimation = null;
animateThemeAfterAnimation = false;
}

View File

@ -928,7 +928,10 @@ public class AlertDialog extends Dialog implements Drawable.Callback {
}
public View getButton(int type) {
return buttonsLayout.findViewWithTag(type);
if (buttonsLayout != null) {
return buttonsLayout.findViewWithTag(type);
}
return null;
}
@Override

View File

@ -11,8 +11,12 @@ package org.telegram.ui.ActionBar;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.os.SystemClock;
import android.text.Layout;
import android.text.SpannableStringBuilder;
import android.text.StaticLayout;
@ -36,12 +40,28 @@ public class SimpleTextView extends View implements Drawable.Callback {
private int leftDrawableTopPadding;
private int rightDrawableTopPadding;
private boolean scrollNonFitText;
private boolean textDoesNotFit;
private float scrollingOffset;
private long lastUpdateTime;
private int currentScrollDelay;
private GradientDrawable fadeDrawable;
private GradientDrawable fadeDrawableBack;
private int lastWidth;
private int offsetX;
private int offsetY;
private int textWidth;
private int totalWidth;
private int textHeight;
private boolean wasLayout;
private static final int PIXELS_PER_SECOND = 50;
private static final int PIXELS_PER_SECOND_SLOW = 30;
private static final int DIST_BETWEEN_SCROLLING_TEXT = 16;
private static final int SCROLL_DELAY_MS = 500;
private static final int SCROLL_SLOWDOWN_PX = 100;
public SimpleTextView(Context context) {
super(context);
textPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
@ -74,6 +94,18 @@ public class SimpleTextView extends View implements Drawable.Callback {
}
}
public void setScrollNonFitText(boolean value) {
if (scrollNonFitText == value) {
return;
}
scrollNonFitText = value;
if (scrollNonFitText) {
fadeDrawable = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, new int[]{0xffffffff, 0});
fadeDrawableBack = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, new int[]{0, 0xffffffff});
}
requestLayout();
}
public void setGravity(int value) {
gravity = value;
}
@ -116,6 +148,7 @@ public class SimpleTextView extends View implements Drawable.Callback {
offsetX = -AndroidUtilities.dp(8);
}
offsetX += getPaddingLeft();
textDoesNotFit = textWidth > width;
}
}
@ -130,12 +163,17 @@ public class SimpleTextView extends View implements Drawable.Callback {
width -= rightDrawable.getIntrinsicWidth();
width -= drawablePadding;
}
CharSequence string = TextUtils.ellipsize(text, textPaint, width, TextUtils.TruncateAt.END);
CharSequence string;
if (scrollNonFitText) {
string = text;
} else {
string = TextUtils.ellipsize(text, textPaint, width, TextUtils.TruncateAt.END);
}
/*if (layout != null && TextUtils.equals(layout.getText(), string)) {
calcOffset(width);
return false;
}*/
layout = new StaticLayout(string, 0, string.length(), textPaint, width + AndroidUtilities.dp(8), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
layout = new StaticLayout(string, 0, string.length(), textPaint, scrollNonFitText ? AndroidUtilities.dp(2000) : width + AndroidUtilities.dp(8), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
calcOffset(width);
} catch (Exception ignore) {
@ -153,6 +191,11 @@ public class SimpleTextView extends View implements Drawable.Callback {
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int width = MeasureSpec.getSize(widthMeasureSpec);
int height = MeasureSpec.getSize(heightMeasureSpec);
if (lastWidth != AndroidUtilities.displaySize.x) {
lastWidth = AndroidUtilities.displaySize.x;
scrollingOffset = 0;
currentScrollDelay = SCROLL_DELAY_MS;
}
createLayout(width - getPaddingLeft() - getPaddingRight());
int finalHeight;
@ -234,6 +277,8 @@ public class SimpleTextView extends View implements Drawable.Callback {
return false;
}
text = value;
scrollingOffset = 0;
currentScrollDelay = SCROLL_DELAY_MS;
recreateLayoutMaybe();
return true;
}
@ -291,32 +336,120 @@ public class SimpleTextView extends View implements Drawable.Callback {
@Override
protected void onDraw(Canvas canvas) {
int textOffsetX = 0;
totalWidth = textWidth;
if (leftDrawable != null) {
int x = (int) -scrollingOffset;
int y = (textHeight - leftDrawable.getIntrinsicHeight()) / 2 + leftDrawableTopPadding;
leftDrawable.setBounds(0, y, leftDrawable.getIntrinsicWidth(), y + leftDrawable.getIntrinsicHeight());
leftDrawable.setBounds(x, y, x + leftDrawable.getIntrinsicWidth(), y + leftDrawable.getIntrinsicHeight());
leftDrawable.draw(canvas);
if ((gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.LEFT) {
textOffsetX += drawablePadding + leftDrawable.getIntrinsicWidth();
}
totalWidth += drawablePadding + leftDrawable.getIntrinsicWidth();
}
if (rightDrawable != null) {
int x = textOffsetX + textWidth + drawablePadding;
int x = textOffsetX + textWidth + drawablePadding + (int) -scrollingOffset;
int y = (textHeight - rightDrawable.getIntrinsicHeight()) / 2 + rightDrawableTopPadding;
rightDrawable.setBounds(x, y, x + rightDrawable.getIntrinsicWidth(), y + rightDrawable.getIntrinsicHeight());
rightDrawable.draw(canvas);
totalWidth += drawablePadding + rightDrawable.getIntrinsicWidth();
}
int nextScrollX = totalWidth + AndroidUtilities.dp(DIST_BETWEEN_SCROLLING_TEXT);
if (scrollingOffset != 0) {
if (leftDrawable != null) {
int x = (int) -scrollingOffset + nextScrollX;
int y = (textHeight - leftDrawable.getIntrinsicHeight()) / 2 + leftDrawableTopPadding;
leftDrawable.setBounds(x, y, x + leftDrawable.getIntrinsicWidth(), y + leftDrawable.getIntrinsicHeight());
leftDrawable.draw(canvas);
}
if (rightDrawable != null) {
int x = textOffsetX + textWidth + drawablePadding + (int) -scrollingOffset + nextScrollX;
int y = (textHeight - rightDrawable.getIntrinsicHeight()) / 2 + rightDrawableTopPadding;
rightDrawable.setBounds(x, y, x + rightDrawable.getIntrinsicWidth(), y + rightDrawable.getIntrinsicHeight());
rightDrawable.draw(canvas);
}
}
if (layout != null) {
if (offsetX + textOffsetX != 0 || offsetY != 0) {
if (offsetX + textOffsetX != 0 || offsetY != 0 || scrollingOffset != 0) {
canvas.save();
canvas.translate(offsetX + textOffsetX, offsetY);
canvas.translate(offsetX + textOffsetX - scrollingOffset, offsetY);
if (scrollingOffset != 0) {
//canvas.clipRect(0, 0, getMeasuredWidth(), getMeasuredHeight());
}
}
layout.draw(canvas);
if (offsetX + textOffsetX != 0 || offsetY != 0) {
if (scrollingOffset != 0) {
canvas.translate(nextScrollX, 0);
layout.draw(canvas);
}
if (offsetX + textOffsetX != 0 || offsetY != 0 || scrollingOffset != 0) {
canvas.restore();
}
if (scrollNonFitText && textDoesNotFit) {
if (scrollingOffset < AndroidUtilities.dp(10)) {
fadeDrawable.setAlpha((int) (255 * (scrollingOffset / AndroidUtilities.dp(10))));
} else if (scrollingOffset > totalWidth + AndroidUtilities.dp(DIST_BETWEEN_SCROLLING_TEXT) - AndroidUtilities.dp(10)) {
float dist = scrollingOffset - (totalWidth + AndroidUtilities.dp(DIST_BETWEEN_SCROLLING_TEXT) - AndroidUtilities.dp(10));
fadeDrawable.setAlpha((int) (255 * (1.0f - dist / AndroidUtilities.dp(10))));
} else {
fadeDrawable.setAlpha(255);
}
fadeDrawable.setBounds(0, 0, AndroidUtilities.dp(6), getMeasuredHeight());
fadeDrawable.draw(canvas);
fadeDrawableBack.setBounds(getMeasuredWidth() - AndroidUtilities.dp(6), 0, getMeasuredWidth(), getMeasuredHeight());
fadeDrawableBack.draw(canvas);
}
updateScrollAnimation();
}
}
@Override
public void setBackgroundColor(int color) {
if (scrollNonFitText) {
if (fadeDrawable != null) {
fadeDrawable.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
fadeDrawableBack.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
}
} else {
super.setBackgroundColor(color);
}
}
private void updateScrollAnimation() {
if (!scrollNonFitText || !textDoesNotFit) {
return;
}
long newUpdateTime = SystemClock.uptimeMillis();
long dt = newUpdateTime - lastUpdateTime;
if (dt > 17) {
dt = 17;
}
if (currentScrollDelay > 0) {
currentScrollDelay -= dt;
} else {
int totalDistance = totalWidth + AndroidUtilities.dp(DIST_BETWEEN_SCROLLING_TEXT);
float pixelsPerSecond;
if (scrollingOffset < AndroidUtilities.dp(SCROLL_SLOWDOWN_PX)) {
pixelsPerSecond = PIXELS_PER_SECOND_SLOW + (PIXELS_PER_SECOND - PIXELS_PER_SECOND_SLOW) * (scrollingOffset / AndroidUtilities.dp(SCROLL_SLOWDOWN_PX));
} else if (scrollingOffset >= totalDistance - AndroidUtilities.dp(SCROLL_SLOWDOWN_PX)) {
float dist = scrollingOffset - (totalDistance - AndroidUtilities.dp(SCROLL_SLOWDOWN_PX));
pixelsPerSecond = PIXELS_PER_SECOND - (PIXELS_PER_SECOND - PIXELS_PER_SECOND_SLOW) * (dist / AndroidUtilities.dp(SCROLL_SLOWDOWN_PX));
} else {
pixelsPerSecond = PIXELS_PER_SECOND;
}
scrollingOffset += dt / 1000.0f * AndroidUtilities.dp(pixelsPerSecond);
lastUpdateTime = newUpdateTime;
if (scrollingOffset > totalDistance) {
scrollingOffset = 0;
currentScrollDelay = SCROLL_DELAY_MS;
}
}
invalidate();
}
@Override
public void invalidateDrawable(Drawable who) {
if (who == leftDrawable) {

View File

@ -105,6 +105,10 @@ public class Theme {
return name;
}
public boolean isDark() {
return "Dark".equals(name) || "Dark Blue".equals(name);
}
public static ThemeInfo createWithJson(JSONObject object) {
if (object == null) {
return null;
@ -302,6 +306,7 @@ public class Theme {
private static Drawable themedWallpaper;
private static int themedWallpaperFileOffset;
private static boolean isWallpaperMotion;
private static boolean isPatternWallpaper;
public static Paint dividerPaint;
public static Paint linkSelectionPaint;
@ -1563,9 +1568,9 @@ public class Theme {
defaultColors.put(key_player_actionBarItems, 0xff8a8a8a);
defaultColors.put(key_player_background, 0xffffffff);
defaultColors.put(key_player_time, 0xff8c9296);
defaultColors.put(key_player_progressBackground, 0x19000000);
defaultColors.put(key_player_progressCachedBackground, 0x19000000);
defaultColors.put(key_player_progress, 0xff23afef);
defaultColors.put(key_player_progressBackground, 0xffe9eff5);
defaultColors.put(key_player_progressCachedBackground, 0xffe9eff5);
defaultColors.put(key_player_progress, 0xff4b9fe3);
defaultColors.put(key_player_placeholder, 0xffa8a8a8);
defaultColors.put(key_player_placeholderBackground, 0xfff0f0f0);
defaultColors.put(key_player_button, 0xff333333);
@ -2268,8 +2273,8 @@ public class Theme {
applyTheme(themeInfo, true, true, false);
}
public static void applyTheme(ThemeInfo themeInfo, boolean animated) {
applyTheme(themeInfo, true, true, animated);
public static void applyTheme(ThemeInfo themeInfo, boolean nightTheme) {
applyTheme(themeInfo, true, true, nightTheme);
}
public static void applyTheme(ThemeInfo themeInfo, boolean save, boolean removeWallpaperOverride, final boolean nightTheme) {
@ -2547,12 +2552,12 @@ public class Theme {
if (night) {
if (currentTheme != currentNightTheme) {
lastThemeSwitchTime = SystemClock.elapsedRealtime();
NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.needSetDayNightTheme, currentNightTheme);
NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.needSetDayNightTheme, currentNightTheme, true);
}
} else {
if (currentTheme != currentDayTheme) {
lastThemeSwitchTime = SystemClock.elapsedRealtime();
NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.needSetDayNightTheme, currentDayTheme);
NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.needSetDayNightTheme, currentDayTheme, true);
}
}
}
@ -3698,6 +3703,7 @@ public class Theme {
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
boolean overrideTheme = preferences.getBoolean("overrideThemeWallpaper", false);
isWallpaperMotion = preferences.getBoolean("selectedBackgroundMotion", false);
isPatternWallpaper = preferences.getLong("selectedPattern", 0) != 0;
if (!overrideTheme) {
Integer backgroundColor = currentColors.get(key_chat_wallpaper);
if (backgroundColor != null) {
@ -3737,13 +3743,17 @@ public class Theme {
int selectedColor = 0;
try {
long selectedBackground = getSelectedBackgroundId();
long selectedPattern = preferences.getLong("selectedPattern", 0);
selectedColor = preferences.getInt("selectedColor", 0);
if (selectedColor == 0) {
if (selectedBackground == DEFAULT_BACKGROUND_ID) {
wallpaper = ApplicationLoader.applicationContext.getResources().getDrawable(R.drawable.background_hd);
isCustomTheme = false;
if (selectedBackground == DEFAULT_BACKGROUND_ID) {
wallpaper = ApplicationLoader.applicationContext.getResources().getDrawable(R.drawable.background_hd);
isCustomTheme = false;
} else if (selectedBackground == -1 || selectedBackground < -100 || selectedBackground > 0) {
if (selectedColor != 0 && selectedPattern == 0) {
wallpaper = new ColorDrawable(selectedColor);
} else {
File toFile = new File(ApplicationLoader.getFilesDirFixed(), "wallpaper.jpg");
long len = toFile.length();
if (toFile.exists()) {
wallpaper = Drawable.createFromPath(toFile.getAbsolutePath());
isCustomTheme = true;
@ -3849,7 +3859,19 @@ public class Theme {
}
}
public static Drawable getCachedWallpaperNonBlocking() {
if (themedWallpaper != null) {
return themedWallpaper;
} else {
return wallpaper;
}
}
public static boolean isWallpaperMotion() {
return isWallpaperMotion;
}
public static boolean isPatternWallpaper() {
return isPatternWallpaper;
}
}

View File

@ -104,6 +104,10 @@ public class DialogsAdapter extends RecyclerListView.SelectionAdapter {
return MessagesController.getInstance(currentAccount).dialogsGroupsOnly;
} else if (dialogsType == 3) {
return MessagesController.getInstance(currentAccount).dialogsForward;
} else if (dialogsType == 4) {
return MessagesController.getInstance(currentAccount).dialogsUsersOnly;
} else if (dialogsType == 5) {
return MessagesController.getInstance(currentAccount).dialogsChannelsOnly;
}
return null;
}

View File

@ -1031,6 +1031,7 @@ public class DialogsSearchAdapter extends RecyclerListView.SelectionAdapter {
});
view = horizontalListView;
innerListView = horizontalListView;
break;
}
if (viewType == 5) {
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, AndroidUtilities.dp(86)));

View File

@ -178,7 +178,7 @@ public class StickersAdapter extends RecyclerListView.SelectionAdapter implement
a--;
}
}
lastSticker = emoji.toString().trim();
lastSticker = emoji.toString();/*.trim();*/
if (!Emoji.isValidEmoji(originalEmoji) && !Emoji.isValidEmoji(lastSticker)) {
if (visible) {
visible = false;

View File

@ -486,7 +486,7 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
circleSize = AndroidUtilities.dp(5);
gapSize = AndroidUtilities.dp(2);
sideSide = AndroidUtilities.dp(17);
lineSize = (getMeasuredWidth() - circleSize * fontSizeCount - gapSize * 8 - sideSide * 2) / (fontSizeCount - 1);
lineSize = (getMeasuredWidth() - circleSize * fontSizeCount - gapSize * 2 * (fontSizeCount - 1) - sideSide * 2) / (fontSizeCount - 1);
}
@Override
@ -1481,6 +1481,8 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
pageSwitchAnimation.playTogether(ObjectAnimator.ofFloat(listView[0], View.TRANSLATION_X, AndroidUtilities.dp(56), 0),
ObjectAnimator.ofFloat(listView[0], View.ALPHA, 0.0f, 1.0f));
} else if (order == -1) {
listView[0].setAlpha(1.0f);
listView[0].setTranslationX(0.0f);
pageSwitchAnimation.playTogether(ObjectAnimator.ofFloat(listView[1], View.TRANSLATION_X, 0, AndroidUtilities.dp(56)),
ObjectAnimator.ofFloat(listView[1], View.ALPHA, 1.0f, 0.0f));
}
@ -2401,9 +2403,7 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
int end = spanned.getSpanEnd(innerSpans[a]);
textPath.setCurrentLayout(result, start, 0);
int shift = innerSpans[a].getTextPaint() != null ? innerSpans[a].getTextPaint().baselineShift : 0;
if (shift != 0) {
markPath.setBaselineShift(shift + AndroidUtilities.dp(shift > 0 ? 5 : -2));
}
textPath.setBaselineShift(shift != 0 ? shift + AndroidUtilities.dp(shift > 0 ? 5 : -2) : 0);
result.getSelectionPath(start, end, textPath);
}
textPath.setAllowReset(true);
@ -2421,9 +2421,7 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
int end = spanned.getSpanEnd(innerSpans[a]);
markPath.setCurrentLayout(result, start, 0);
int shift = innerSpans[a].getTextPaint() != null ? innerSpans[a].getTextPaint().baselineShift : 0;
if (shift != 0) {
markPath.setBaselineShift(shift + AndroidUtilities.dp(shift > 0 ? 5 : -2));
}
markPath.setBaselineShift(shift != 0 ? shift + AndroidUtilities.dp(shift > 0 ? 5 : -2) : 0);
result.getSelectionPath(start, end, markPath);
}
markPath.setAllowReset(true);
@ -3906,6 +3904,8 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
containerView.setTranslationX(0);
containerView.setTranslationY(0);
listView[0].setTranslationY(0);
listView[0].setTranslationX(0.0f);
listView[1].setTranslationX(0.0f);
listView[0].setAlpha(1.0f);
windowView.setInnerTranslationX(0);
@ -5711,6 +5711,7 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
} else {
imageView.setImage(null, null, thumb, "80_80_b", 0, null, currentPage, 1);
}
imageView.setAspectFit(isGif);
buttonX = (int) (imageView.getImageX() + (imageView.getImageWidth() - size) / 2.0f);
buttonY = (int) (imageView.getImageY() + (imageView.getImageHeight() - size) / 2.0f);
radialProgress.setProgressRect(buttonX, buttonY, buttonX + size, buttonY + size);
@ -5751,8 +5752,8 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
if (currentBlock == null) {
return;
}
if (!imageView.hasBitmapImage() || imageView.getcurrentAccount() != 1.0f) {
canvas.drawRect(imageView.getImageX(), imageView.getImageY(), imageView.getImageX2(), imageView.getImageY2(), photoBackgroundPaint);
if (!imageView.hasBitmapImage() || imageView.getCurrentAlpha() != 1.0f) {
canvas.drawRect(imageView.getDrawRegion(), photoBackgroundPaint);
}
imageView.draw(canvas);
if (imageView.getVisible()) {
@ -9186,7 +9187,7 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
if (currentBlock == null) {
return;
}
if (!imageView.hasBitmapImage() || imageView.getcurrentAccount() != 1.0f) {
if (!imageView.hasBitmapImage() || imageView.getCurrentAlpha() != 1.0f) {
canvas.drawRect(imageView.getImageX(), imageView.getImageY(), imageView.getImageX2(), imageView.getImageY2(), photoBackgroundPaint);
}
imageView.draw(canvas);
@ -11071,14 +11072,14 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
size[0] = -1;
}
TLRPC.PhotoSize thumbLocation = FileLoader.getClosestPhotoSizeWithSize(photo.sizes, 80);
imageReceiver.setImage(fileLocation, null, null, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, thumbLocation, "b", size[0], null, currentPage, 1);
imageReceiver.setImage(fileLocation, null, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, thumbLocation, "b", size[0], null, currentPage, 1);
} else if (isMediaVideo(index)) {
if (!(fileLocation.location instanceof TLRPC.TL_fileLocationUnavailable)) {
ImageReceiver.BitmapHolder placeHolder = null;
if (currentThumb != null && imageReceiver == centerImage) {
placeHolder = currentThumb;
}
imageReceiver.setImage(null, null, null, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, fileLocation, "b", 0, null, currentPage, 1);
imageReceiver.setImage(null, null, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, fileLocation, "b", 0, null, currentPage, 1);
} else {
imageReceiver.setImageBitmap(parentActivity.getResources().getDrawable(R.drawable.photoview_placeholder));
}
@ -11191,7 +11192,12 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
xPos += ((WindowInsets) lastInsets).getSystemWindowInsetLeft();
}
float yPos = ((AndroidUtilities.displaySize.y + AndroidUtilities.statusBarHeight) - height) / 2.0f;
int clipHorizontal = Math.abs(drawRegion.left - object.imageReceiver.getImageX());
int clipHorizontal;
if (object.imageReceiver.isAspectFit()) {
clipHorizontal = 0;
} else {
clipHorizontal = Math.abs(drawRegion.left - object.imageReceiver.getImageX());
}
int clipVertical = Math.abs(drawRegion.top - object.imageReceiver.getImageY());
int coords2[] = new int[2];
@ -11358,7 +11364,12 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
if (object != null) {
object.imageReceiver.setVisible(false, true);
int clipHorizontal = Math.abs(drawRegion.left - object.imageReceiver.getImageX());
int clipHorizontal;
if (object.imageReceiver.isAspectFit()) {
clipHorizontal = 0;
} else {
clipHorizontal = Math.abs(drawRegion.left - object.imageReceiver.getImageX());
}
int clipVertical = Math.abs(drawRegion.top - object.imageReceiver.getImageY());
int coords2[] = new int[2];

View File

@ -120,9 +120,16 @@ public class AudioPlayerCell extends View implements DownloadController.FileDown
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
radialProgress.onDetachedFromWindow();
DownloadController.getInstance(currentAccount).removeLoadingFileObserver(this);
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
radialProgress.onAttachedToWindow();
}
public MessageObject getMessageObject() {
return currentMessageObject;
}

View File

@ -36,11 +36,20 @@ import org.telegram.ui.Components.AvatarDrawable;
public class ChatActionCell extends BaseCell {
public interface ChatActionCellDelegate {
void didClickedImage(ChatActionCell cell);
void didLongPressed(ChatActionCell cell);
void needOpenUserProfile(int uid);
void didPressedBotButton(MessageObject messageObject, TLRPC.KeyboardButton button);
void didPressedReplyMessage(ChatActionCell cell, int id);
default void didClickedImage(ChatActionCell cell) {
}
default void didLongPressed(ChatActionCell cell) {
}
default void needOpenUserProfile(int uid) {
}
default void didPressedBotButton(MessageObject messageObject, TLRPC.KeyboardButton button) {
}
default void didPressedReplyMessage(ChatActionCell cell, int id) {
}
}
private URLSpan pressedLink;

View File

@ -16,12 +16,15 @@ import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
import android.net.Uri;
import android.os.Build;
import android.text.Layout;
import android.text.Spannable;
@ -91,23 +94,59 @@ import java.util.Locale;
public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate, ImageReceiver.ImageReceiverDelegate, DownloadController.FileDownloadProgressListener {
public interface ChatMessageCellDelegate {
void didPressUserAvatar(ChatMessageCell cell, TLRPC.User user);
void didPressViaBot(ChatMessageCell cell, String username);
void didPressChannelAvatar(ChatMessageCell cell, TLRPC.Chat chat, int postId);
void didPressCancelSendButton(ChatMessageCell cell);
void didLongPress(ChatMessageCell cell);
void didPressReplyMessage(ChatMessageCell cell, int id);
void didPressUrl(MessageObject messageObject, CharacterStyle url, boolean longPress);
void needOpenWebView(String url, String title, String description, String originalUrl, int w, int h);
void didPressImage(ChatMessageCell cell);
void didPressShare(ChatMessageCell cell);
void didPressOther(ChatMessageCell cell);
void didPressBotButton(ChatMessageCell cell, TLRPC.KeyboardButton button);
void didPressVoteButton(ChatMessageCell cell, TLRPC.TL_pollAnswer button);
void didPressInstantButton(ChatMessageCell cell, int type);
boolean isChatAdminCell(int uid);
boolean needPlayMessage(MessageObject messageObject);
boolean canPerformActions();
default void didPressUserAvatar(ChatMessageCell cell, TLRPC.User user) {
}
default void didPressViaBot(ChatMessageCell cell, String username) {
}
default void didPressChannelAvatar(ChatMessageCell cell, TLRPC.Chat chat, int postId) {
}
default void didPressCancelSendButton(ChatMessageCell cell) {
}
default void didLongPress(ChatMessageCell cell) {
}
default void didPressReplyMessage(ChatMessageCell cell, int id) {
}
default void didPressUrl(MessageObject messageObject, CharacterStyle url, boolean longPress) {
}
default void needOpenWebView(String url, String title, String description, String originalUrl, int w, int h) {
}
default void didPressImage(ChatMessageCell cell) {
}
default void didPressShare(ChatMessageCell cell) {
}
default void didPressOther(ChatMessageCell cell) {
}
default void didPressBotButton(ChatMessageCell cell, TLRPC.KeyboardButton button) {
}
default void didPressVoteButton(ChatMessageCell cell, TLRPC.TL_pollAnswer button) {
}
default void didPressInstantButton(ChatMessageCell cell, int type) {
}
default boolean isChatAdminCell(int uid) {
return false;
}
default boolean needPlayMessage(MessageObject messageObject) {
return false;
}
default boolean canPerformActions() {
return false;
}
}
private final static int DOCUMENT_ATTACH_TYPE_NONE = 0;
@ -210,6 +249,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
private StaticLayout instantViewLayout;
private boolean drawInstantView;
private int drawInstantViewType;
private int imageBackgroundColor;
private int imageBackgroundSideColor;
private int imageBackgroundSideWidth;
private boolean drawJoinGroupView;
private boolean drawJoinChannelView;
private int instantTextX;
@ -244,6 +286,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
private WebFile currentWebFile;
private boolean addedForTest;
private boolean hasEmbed;
private boolean checkOnlyButtonPressed;
private int buttonX;
private int buttonY;
private int buttonState;
@ -824,7 +869,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
miniButtonPressed = 1;
invalidate();
return true;
} else if (drawPhotoImage && drawImageButton && buttonState != -1 && (photoImage.isInsideImage(x, y) || x >= buttonX && x <= buttonX + AndroidUtilities.dp(48) && y >= buttonY && y <= buttonY + AndroidUtilities.dp(48))) {
} else if (drawPhotoImage && drawImageButton && buttonState != -1 && (!checkOnlyButtonPressed && photoImage.isInsideImage(x, y) || x >= buttonX && x <= buttonX + AndroidUtilities.dp(48) && y >= buttonY && y <= buttonY + AndroidUtilities.dp(48))) {
buttonPressed = 1;
return true;
} else if (drawInstantView) {
@ -1825,6 +1870,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
attachedToWindow = false;
radialProgress.onDetachedFromWindow();
avatarImage.onDetachedFromWindow();
replyImageReceiver.onDetachedFromWindow();
locationImageReceiver.onDetachedFromWindow();
@ -1841,6 +1887,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
super.onAttachedToWindow();
attachedToWindow = true;
setTranslationX(0);
radialProgress.onAttachedToWindow();
avatarImage.onAttachedToWindow();
avatarImage.setParentView((View) getParent());
replyImageReceiver.onAttachedToWindow();
@ -2132,7 +2179,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
photoImage.setShouldGenerateQualityThumb(true);
}
currentPhotoFilter = "86_86_b";
photoImage.setImage(currentPhotoObject, null, "86_86", null, currentPhotoObjectThumb, currentPhotoFilter, 0, null, messageObject, 1);
photoImage.setImage(currentPhotoObject, "86_86", null, currentPhotoObjectThumb, currentPhotoFilter, 0, null, messageObject, 1);
}
return width;
}
@ -2316,7 +2363,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
drawShareButton = checkNeedDrawShareButton(messageObject);
replyNameLayout = null;
adminLayout = null;
checkOnlyButtonPressed = false;
replyTextLayout = null;
hasEmbed = false;
replyNameWidth = 0;
replyTextWidth = 0;
viaWidth = 0;
@ -2386,7 +2435,10 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
drawInstantView = false;
drawInstantViewType = 0;
drawForwardedName = false;
imageBackgroundColor = 0;
imageBackgroundSideColor = 0;
mediaBackground = false;
photoImage.setAlpha(1.0f);
if (messageChanged || dataChanged) {
pollButtons.clear();
}
@ -2397,6 +2449,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
photoImage.setShouldGenerateQualityThumb(false);
photoImage.setAllowDecodeSingleFrame(false);
photoImage.setRoundRadius(AndroidUtilities.dp(3));
photoImage.setColorFilter(null);
if (messageChanged) {
firstVisibleBlockNum = 0;
@ -2439,6 +2492,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
hasInvoicePreview = messageObject.messageOwner.media instanceof TLRPC.TL_messageMediaInvoice;
hasLinkPreview = messageObject.messageOwner.media instanceof TLRPC.TL_messageMediaWebPage && messageObject.messageOwner.media.webpage instanceof TLRPC.TL_webPage;
drawInstantView = hasLinkPreview && messageObject.messageOwner.media.webpage.cached_page != null;
hasEmbed = hasLinkPreview && !TextUtils.isEmpty(messageObject.messageOwner.media.webpage.embed_url);
boolean slideshow = false;
String siteName = hasLinkPreview ? messageObject.messageOwner.media.webpage.site_name : null;
String webpageType = hasLinkPreview ? messageObject.messageOwner.media.webpage.type : null;
@ -2455,6 +2509,29 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
} else if ("telegram_background".equals(webpageType)) {
drawInstantView = true;
drawInstantViewType = 6;
try {
Uri url = Uri.parse(messageObject.messageOwner.media.webpage.url);
int intensity = Utilities.parseInt(url.getQueryParameter("intensity"));
String bgColor = url.getQueryParameter("bg_color");
if (bgColor != null) {
imageBackgroundColor = Integer.parseInt(url.getQueryParameter("bg_color"), 16) | 0xff000000;
imageBackgroundSideColor = AndroidUtilities.getPatternSideColor(imageBackgroundColor);
photoImage.setColorFilter(new PorterDuffColorFilter(AndroidUtilities.getPatternColor(imageBackgroundColor), PorterDuff.Mode.SRC_IN));
photoImage.setAlpha(intensity / 100.0f);
} else {
String color = url.getLastPathSegment();
if (color != null && color.length() == 6) {
imageBackgroundColor = Integer.parseInt(color, 16) | 0xff000000;
currentPhotoObject = new TLRPC.TL_photoSizeEmpty();
currentPhotoObject.type = "s";
currentPhotoObject.w = AndroidUtilities.dp(180);
currentPhotoObject.h = AndroidUtilities.dp(150);
currentPhotoObject.location = new TLRPC.TL_fileLocationUnavailable();
}
}
} catch (Exception ignore) {
}
} /*else if ("telegram_proxy".equals(webpageType)) {
drawInstantView = true;
drawInstantViewType = 4;
@ -2544,9 +2621,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
if (hasLinkPreview) {
TLRPC.TL_webPage webPage = (TLRPC.TL_webPage) messageObject.messageOwner.media.webpage;
site_name = webPage.site_name;
title = webPage.title;
author = webPage.author;
description = webPage.description;
title = drawInstantViewType != 6 ? webPage.title : null;
author = drawInstantViewType != 6 ? webPage.author : null;
description = drawInstantViewType != 6 ? webPage.description : null;
photo = webPage.photo;
webDocument = null;
document = webPage.document;
@ -2914,8 +2991,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
}
}
} else if (photo != null) {
drawImageButton = type != null && type.equals("photo");
currentPhotoObject = FileLoader.getClosestPhotoSizeWithSize(messageObject.photoThumbs, drawImageButton ? AndroidUtilities.getPhotoSize() : maxPhotoWidth, !drawImageButton);
boolean isPhoto = type != null && type.equals("photo");
currentPhotoObject = FileLoader.getClosestPhotoSizeWithSize(messageObject.photoThumbs, isPhoto || !smallImage ? AndroidUtilities.getPhotoSize() : maxPhotoWidth, !isPhoto);
checkOnlyButtonPressed = !isPhoto;
currentPhotoObjectThumb = FileLoader.getClosestPhotoSizeWithSize(messageObject.photoThumbs, 40);
if (currentPhotoObjectThumb == currentPhotoObject) {
currentPhotoObjectThumb = null;
@ -2929,13 +3007,17 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
if (documentAttachType != DOCUMENT_ATTACH_TYPE_MUSIC && documentAttachType != DOCUMENT_ATTACH_TYPE_AUDIO && documentAttachType != DOCUMENT_ATTACH_TYPE_DOCUMENT) {
if (currentPhotoObject != null || webDocument != null) {
drawImageButton = type != null && (type.equals("photo") || type.equals("document") && documentAttachType != DOCUMENT_ATTACH_TYPE_STICKER || type.equals("gif") || documentAttachType == DOCUMENT_ATTACH_TYPE_VIDEO || documentAttachType == DOCUMENT_ATTACH_TYPE_WALLPAPER);
drawImageButton = photo != null && !smallImage || type != null && (type.equals("photo") || type.equals("document") && documentAttachType != DOCUMENT_ATTACH_TYPE_STICKER || type.equals("gif") || documentAttachType == DOCUMENT_ATTACH_TYPE_VIDEO || documentAttachType == DOCUMENT_ATTACH_TYPE_WALLPAPER);
if (linkPreviewHeight != 0) {
linkPreviewHeight += AndroidUtilities.dp(2);
totalHeight += AndroidUtilities.dp(2);
}
if (documentAttachType == DOCUMENT_ATTACH_TYPE_STICKER || documentAttachType == DOCUMENT_ATTACH_TYPE_WALLPAPER) {
if (imageBackgroundSideColor != 0) {
maxPhotoWidth = AndroidUtilities.dp(208);
} else if (currentPhotoObject instanceof TLRPC.TL_photoSizeEmpty && currentPhotoObject.w != 0) {
maxPhotoWidth = currentPhotoObject.w;
} else if (documentAttachType == DOCUMENT_ATTACH_TYPE_STICKER || documentAttachType == DOCUMENT_ATTACH_TYPE_WALLPAPER) {
if (AndroidUtilities.isTablet()) {
maxPhotoWidth = (int) (AndroidUtilities.getMinTabletSide() * 0.5f);
} else {
@ -2955,6 +3037,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
} else {
webDocument.size = -1;
}
if (imageBackgroundSideColor != 0) {
imageBackgroundSideWidth = maxChildWidth - AndroidUtilities.dp(13);
}
int width;
int height;
@ -2982,6 +3067,11 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
height = AndroidUtilities.displaySize.y / 2;
}
}
if (imageBackgroundSideColor != 0) {
scale = height / (float) AndroidUtilities.dp(160);
width /= scale;
height /= scale;
}
}
}
if (isSmallImage) {
@ -2995,7 +3085,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
linkPreviewHeight += height;
}
if (documentAttachType == DOCUMENT_ATTACH_TYPE_WALLPAPER) {
if (documentAttachType == DOCUMENT_ATTACH_TYPE_WALLPAPER && imageBackgroundSideColor == 0) {
photoImage.setImageCoords(0, 0, Math.max(maxChildWidth - AndroidUtilities.dp(13), width), height);
} else {
photoImage.setImageCoords(0, 0, width, height);
@ -3005,12 +3095,16 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
currentPhotoFilterThumb = String.format(Locale.US, "%d_%d_b", width, height);
if (webDocument != null) {
photoImage.setImage(webDocument, null, currentPhotoFilter, null, null, "b1", webDocument.size, null, messageObject, 1);
photoImage.setImage(webDocument, currentPhotoFilter, null, null, "b1", webDocument.size, null, messageObject, 1);
} else {
if (documentAttachType == DOCUMENT_ATTACH_TYPE_WALLPAPER) {
photoImage.setImage(null, null, currentPhotoFilter, null, currentPhotoObject, "b1", 0, "jpg", messageObject, 1);
if (messageObject.mediaExists) {
photoImage.setImage(documentAttach, currentPhotoFilter, null, currentPhotoObject, "b1", 0, "jpg", messageObject, 1);
} else {
photoImage.setImage(null, currentPhotoFilter, null, currentPhotoObject, "b1", 0, "jpg", messageObject, 1);
}
} else if (documentAttachType == DOCUMENT_ATTACH_TYPE_STICKER) {
photoImage.setImage(documentAttach, null, currentPhotoFilter, null, currentPhotoObject, "b1", documentAttach.size, "webp", messageObject, 1);
photoImage.setImage(documentAttach, currentPhotoFilter, null, currentPhotoObject, "b1", documentAttach.size, "webp", messageObject, 1);
} else if (documentAttachType == DOCUMENT_ATTACH_TYPE_VIDEO) {
photoImage.setNeedsQualityThumb(true);
photoImage.setShouldGenerateQualityThumb(true);
@ -3660,19 +3754,19 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
photoHeight = (int) maxHeight;
}
documentAttachType = DOCUMENT_ATTACH_TYPE_STICKER;
availableTimeWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(14);
availableTimeWidth = photoWidth - AndroidUtilities.dp(14);
backgroundWidth = photoWidth + AndroidUtilities.dp(12);
currentPhotoObjectThumb = FileLoader.getClosestPhotoSizeWithSize(messageObject.photoThumbs, 40);
if (messageObject.attachPathExists) {
photoImage.setImage(null, messageObject.messageOwner.attachPath,
photoImage.setImage(messageObject.messageOwner.attachPath,
String.format(Locale.US, "%d_%d", photoWidth, photoHeight),
null,
currentPhotoObjectThumb,
"b1",
messageObject.messageOwner.media.document.size, "webp", messageObject, 1);
} else if (messageObject.messageOwner.media.document.id != 0) {
photoImage.setImage(messageObject.messageOwner.media.document, null,
photoImage.setImage(messageObject.messageOwner.media.document,
String.format(Locale.US, "%d_%d", photoWidth, photoHeight),
null,
currentPhotoObjectThumb,
@ -3753,6 +3847,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
}
}
}
if (currentPhotoObject != null && "s".equals(currentPhotoObject.type)) {
currentPhotoObject = null;
}
if (currentPhotoObject != null && currentPhotoObject == currentPhotoObjectThumb) {
if (messageObject.type == 1) {
@ -4077,7 +4174,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
}
if (!messageObject.isSending() && !messageObject.isEditing() && (localFile != 0 || FileLoader.getInstance(currentAccount).isLoadingFile(fileName) || autoDownload)) {
if (localFile == 1) {
photoImage.setImage(null, messageObject.isSendError() ? null : messageObject.messageOwner.attachPath, null, null, currentPhotoObjectThumb, currentPhotoFilterThumb, 0, null, messageObject, 0);
photoImage.setImage(messageObject.isSendError() ? null : messageObject.messageOwner.attachPath, null, null, currentPhotoObjectThumb, currentPhotoFilterThumb, 0, null, messageObject, 0);
} else {
photoImage.setImage(messageObject.messageOwner.media.document, null, currentPhotoObjectThumb, currentPhotoFilterThumb, messageObject.messageOwner.media.document.size, null, messageObject, 0);
}
@ -4414,7 +4511,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
str = LocaleController.getString("InstantView", R.string.InstantView);
}
int mWidth = backgroundWidth - AndroidUtilities.dp(10 + 24 + 10 + 31);
instantViewLayout = new StaticLayout(TextUtils.ellipsize(str, Theme.chat_instantViewPaint, mWidth, TextUtils.TruncateAt.END), Theme.chat_instantViewPaint, mWidth, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
instantViewLayout = new StaticLayout(TextUtils.ellipsize(str, Theme.chat_instantViewPaint, mWidth, TextUtils.TruncateAt.END), Theme.chat_instantViewPaint, mWidth + AndroidUtilities.dp(2), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
instantWidth = backgroundWidth - AndroidUtilities.dp(34);
totalHeight += AndroidUtilities.dp(46);
if (currentMessageObject.type == 12) {
@ -4843,18 +4940,37 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
linkPreviewY += currentMessageObject.textHeight + AndroidUtilities.dp(4);
}
if (drawPhotoImage && drawInstantView) {
if (drawPhotoImage && drawInstantView || drawInstantViewType == 6 && imageBackgroundColor != 0) {
if (linkPreviewY != startY) {
linkPreviewY += AndroidUtilities.dp(2);
}
photoImage.setImageCoords(linkX + AndroidUtilities.dp(10), linkPreviewY, photoImage.getImageWidth(), photoImage.getImageHeight());
if (drawImageButton) {
int size = AndroidUtilities.dp(48);
buttonX = (int) (photoImage.getImageX() + (photoImage.getImageWidth() - size) / 2.0f);
buttonY = (int) (photoImage.getImageY() + (photoImage.getImageHeight() - size) / 2.0f);
radialProgress.setProgressRect(buttonX, buttonY, buttonX + size, buttonY + size);
if (imageBackgroundSideColor != 0) {
int x = linkX + AndroidUtilities.dp(10);
photoImage.setImageCoords(x + (imageBackgroundSideWidth - photoImage.getImageWidth()) / 2, linkPreviewY, photoImage.getImageWidth(), photoImage.getImageHeight());
rect.set(x, photoImage.getImageY(), x + imageBackgroundSideWidth, photoImage.getImageY2());
Theme.chat_instantViewPaint.setColor(imageBackgroundSideColor);
canvas.drawRoundRect(rect, AndroidUtilities.dp(4), AndroidUtilities.dp(4), Theme.chat_instantViewPaint);
} else {
photoImage.setImageCoords(linkX + AndroidUtilities.dp(10), linkPreviewY, photoImage.getImageWidth(), photoImage.getImageHeight());
}
if (imageBackgroundColor != 0) {
Theme.chat_instantViewPaint.setColor(imageBackgroundColor);
rect.set(photoImage.getImageX(), photoImage.getImageY(), photoImage.getImageX2(), photoImage.getImageY2());
if (imageBackgroundSideColor != 0) {
canvas.drawRect(photoImage.getImageX(), photoImage.getImageY(), photoImage.getImageX2(), photoImage.getImageY2(), Theme.chat_instantViewPaint);
} else {
canvas.drawRoundRect(rect, AndroidUtilities.dp(4), AndroidUtilities.dp(4), Theme.chat_instantViewPaint);
}
}
if (drawPhotoImage && drawInstantView) {
if (drawImageButton) {
int size = AndroidUtilities.dp(48);
buttonX = (int) (photoImage.getImageX() + (photoImage.getImageWidth() - size) / 2.0f);
buttonY = (int) (photoImage.getImageY() + (photoImage.getImageHeight() - size) / 2.0f);
radialProgress.setProgressRect(buttonX, buttonY, buttonX + size, buttonY + size);
}
imageDrawn = photoImage.draw(canvas);
}
imageDrawn = photoImage.draw(canvas);
linkPreviewY += photoImage.getImageHeight() + AndroidUtilities.dp(6);
}
@ -4949,7 +5065,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
canvas.restore();
Theme.chat_durationPaint.setAlpha(255);
}
if (videoInfoLayout != null && (!drawPhotoImage || photoImage.getVisible())) {
if (videoInfoLayout != null && (!drawPhotoImage || photoImage.getVisible()) && imageBackgroundSideColor == 0) {
int x;
int y;
if (hasGamePreview || hasInvoicePreview || documentAttachType == DOCUMENT_ATTACH_TYPE_WALLPAPER) {
@ -5825,6 +5941,8 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
} else {
return MediaActionDrawable.ICON_FIRE;
}
} else if (hasEmbed) {
return MediaActionDrawable.ICON_PLAY;
}
}
}
@ -6002,7 +6120,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
if (!FileLoader.getInstance(currentAccount).isLoadingFile(fileName)) {
if (!cancelLoading &&
(documentAttachType == 0 && DownloadController.getInstance(currentAccount).canDownloadMedia(currentMessageObject) ||
documentAttachType == DOCUMENT_ATTACH_TYPE_GIF && MessageObject.isNewGifDocument(documentAttach) && DownloadController.getInstance(currentAccount).canDownloadMedia(currentMessageObject))) {
documentAttachType == DOCUMENT_ATTACH_TYPE_GIF && MessageObject.isNewGifDocument(documentAttach) && DownloadController.getInstance(currentAccount).canDownloadMedia(currentMessageObject))) {
buttonState = 1;
} else {
buttonState = 0;
@ -6209,7 +6327,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
} else if (documentAttachType == DOCUMENT_ATTACH_TYPE_DOCUMENT) {
FileLoader.getInstance(currentAccount).loadFile(currentMessageObject.messageOwner.media.webpage.document, currentMessageObject, 0, 0);
} else if (documentAttachType == DOCUMENT_ATTACH_TYPE_WALLPAPER) {
FileLoader.getInstance(currentAccount).loadFile(currentMessageObject.messageOwner.media.webpage.document, currentMessageObject, 0, 1);
photoImage.setImage(documentAttach, currentPhotoFilter, null, currentPhotoObject, "b1", 0, "jpg", currentMessageObject, 1);
}
} else {
photoImage.setForceLoading(true);

View File

@ -276,13 +276,13 @@ public class ContextLinkCell extends View implements DownloadController.FileDown
if (documentAttach != null) {
linkImageView.setImage(documentAttach, null, currentPhotoObject, currentPhotoFilter, documentAttach.size, ext, parentObject, 0);
} else {
linkImageView.setImage(webFile, urlLocation, null, null, currentPhotoObject, currentPhotoFilter, -1, ext, parentObject, 1);
linkImageView.setImage(webFile != null ? webFile : urlLocation, null, null, currentPhotoObject, currentPhotoFilter, -1, ext, parentObject, 1);
}
} else {
if (currentPhotoObject != null) {
linkImageView.setImage(currentPhotoObject, currentPhotoFilter, currentPhotoObjectThumb, currentPhotoFilterThumb, currentPhotoObject.size, ext, parentObject, 0);
} else {
linkImageView.setImage(webFile, urlLocation, currentPhotoFilter, null, currentPhotoObjectThumb, currentPhotoFilterThumb, -1, ext, parentObject, 1);
linkImageView.setImage(webFile != null ? webFile : urlLocation, currentPhotoFilter, null, currentPhotoObjectThumb, currentPhotoFilterThumb, -1, ext, parentObject, 1);
}
}
drawLinkImageView = true;
@ -449,6 +449,7 @@ public class ContextLinkCell extends View implements DownloadController.FileDown
if (drawLinkImageView) {
linkImageView.onDetachedFromWindow();
}
radialProgress.onDetachedFromWindow();
DownloadController.getInstance(currentAccount).removeLoadingFileObserver(this);
}
@ -460,6 +461,7 @@ public class ContextLinkCell extends View implements DownloadController.FileDown
updateButtonState(false, false);
}
}
radialProgress.onAttachedToWindow();
}
public MessageObject getMessageObject() {

View File

@ -910,6 +910,10 @@ public class DialogCell extends BaseCell {
return MessagesController.getInstance(currentAccount).dialogsGroupsOnly;
} else if (dialogsType == 3) {
return MessagesController.getInstance(currentAccount).dialogsForward;
} else if (dialogsType == 4) {
return MessagesController.getInstance(currentAccount).dialogsUsersOnly;
} else if (dialogsType == 5) {
return MessagesController.getInstance(currentAccount).dialogsChannelsOnly;
}
return null;
}

View File

@ -120,7 +120,7 @@ public class DrawerProfileCell extends FrameLayout {
shadowView.getDrawable().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
}
nameTextView.setTextColor(Theme.getColor(Theme.key_chats_menuName));
if (Theme.isCustomTheme() && backgroundDrawable != null) {
if (Theme.isCustomTheme() && !Theme.isPatternWallpaper() && backgroundDrawable != null) {
phoneTextView.setTextColor(Theme.getColor(Theme.key_chats_menuPhone));
shadowView.setVisibility(VISIBLE);
if (backgroundDrawable instanceof ColorDrawable) {

View File

@ -101,7 +101,7 @@ public class PaymentInfoCell extends FrameLayout {
detailTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 10 : 123, 33, LocaleController.isRTL ? 123 : 10, 0));
detailExTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 10 : 123, 90, LocaleController.isRTL ? 123 : 10, 0));
imageView.setVisibility(VISIBLE);
imageView.getImageReceiver().setImage(WebFile.createWithWebDocument(invoice.photo), null, String.format(Locale.US, "%d_%d", width, height), null, null, null, -1, null, invoice, 1);
imageView.getImageReceiver().setImage(WebFile.createWithWebDocument(invoice.photo), String.format(Locale.US, "%d_%d", width, height), null, null, null, -1, null, invoice, 1);
} else {
nameTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 17, 9, 17, 0));
detailTextView.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 17, 33, 17, 0));

View File

@ -175,7 +175,7 @@ public class SharedPhotoVideoCell extends FrameLayout {
TLRPC.Document document = messageObject.getDocument();
TLRPC.PhotoSize thumb = FileLoader.getClosestPhotoSizeWithSize(document.thumbs, 90);
if (thumb != null) {
imageView.setImage(null, null, null, ApplicationLoader.applicationContext.getResources().getDrawable(R.drawable.photo_placeholder_in), null, thumb, "b", null, 0, messageObject);
imageView.setImage(null, null, ApplicationLoader.applicationContext.getResources().getDrawable(R.drawable.photo_placeholder_in), null, thumb, "b", null, 0, messageObject);
} else {
imageView.setImageResource(R.drawable.photo_placeholder_in);
}
@ -189,7 +189,7 @@ public class SharedPhotoVideoCell extends FrameLayout {
}
imageView.getImageReceiver().setImage(currentPhotoObject, "100_100", currentPhotoObjectThumb, "b", currentPhotoObject.size, null, messageObject, messageObject.shouldEncryptPhotoOrVideo() ? 2 : 0);
} else {
imageView.setImage(null, null, null, ApplicationLoader.applicationContext.getResources().getDrawable(R.drawable.photo_placeholder_in), null, currentPhotoObjectThumb, "b", null, 0, messageObject);
imageView.setImage(null, null, ApplicationLoader.applicationContext.getResources().getDrawable(R.drawable.photo_placeholder_in), null, currentPhotoObjectThumb, "b", null, 0, messageObject);
}
} else {
videoInfoContainer.setVisibility(INVISIBLE);

View File

@ -35,6 +35,7 @@ import org.telegram.ui.Components.CheckBox;
import org.telegram.ui.Components.CheckBoxSquare;
import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.ActionBar.SimpleTextView;
import org.telegram.ui.NotificationsSettingsActivity;
public class UserCell extends FrameLayout {
@ -48,6 +49,7 @@ public class UserCell extends FrameLayout {
private AvatarDrawable avatarDrawable;
private TLObject currentObject;
private TLRPC.EncryptedChat encryptedChat;
private CharSequence currentName;
private CharSequence currrntStatus;
@ -154,10 +156,14 @@ public class UserCell extends FrameLayout {
}
public void setData(TLObject object, CharSequence name, CharSequence status, int resId) {
setData(object, name, status, resId, false);
setData(object, null, name, status, resId, false);
}
public void setData(TLObject object, CharSequence name, CharSequence status, int resId, boolean divider) {
setData(object, null, name, status, resId, divider);
}
public void setData(TLObject object, TLRPC.EncryptedChat ec, CharSequence name, CharSequence status, int resId, boolean divider) {
if (object == null && name == null && status == null) {
currrntStatus = null;
currentName = null;
@ -167,6 +173,7 @@ public class UserCell extends FrameLayout {
avatarImageView.setImageDrawable(null);
return;
}
encryptedChat = ec;
currrntStatus = status;
currentName = name;
currentObject = object;
@ -176,6 +183,74 @@ public class UserCell extends FrameLayout {
update(0);
}
public void setException(NotificationsSettingsActivity.NotificationException exception, CharSequence name, boolean divider) {
String text;
boolean enabled;
boolean custom = exception.hasCustom;
int value = exception.notify;
int delta = exception.muteUntil;
if (value == 3 && delta != Integer.MAX_VALUE) {
delta -= ConnectionsManager.getInstance(currentAccount).getCurrentTime();
if (delta <= 0) {
if (custom) {
text = LocaleController.getString("NotificationsCustom", R.string.NotificationsCustom);
} else {
text = LocaleController.getString("NotificationsUnmuted", R.string.NotificationsUnmuted);
}
} else if (delta < 60 * 60) {
text = LocaleController.formatString("WillUnmuteIn", R.string.WillUnmuteIn, LocaleController.formatPluralString("Minutes", delta / 60));
} else if (delta < 60 * 60 * 24) {
text = LocaleController.formatString("WillUnmuteIn", R.string.WillUnmuteIn, LocaleController.formatPluralString("Hours", (int) Math.ceil(delta / 60.0f / 60)));
} else if (delta < 60 * 60 * 24 * 365) {
text = LocaleController.formatString("WillUnmuteIn", R.string.WillUnmuteIn, LocaleController.formatPluralString("Days", (int) Math.ceil(delta / 60.0f / 60 / 24)));
} else {
text = null;
}
} else {
if (value == 0) {
enabled = true;
} else if (value == 1) {
enabled = true;
} else if (value == 2) {
enabled = false;
} else {
enabled = false;
}
if (enabled && custom) {
text = LocaleController.getString("NotificationsCustom", R.string.NotificationsCustom);
} else {
text = enabled ? LocaleController.getString("NotificationsUnmuted", R.string.NotificationsUnmuted) : LocaleController.getString("NotificationsMuted", R.string.NotificationsMuted);
}
}
if (text == null) {
text = LocaleController.getString("NotificationsOff", R.string.NotificationsOff);
}
int lower_id = (int) exception.did;
int high_id = (int) (exception.did >> 32);
if (lower_id != 0) {
if (lower_id > 0) {
TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(lower_id);
if (user != null) {
setData(user, null, name, text, 0, divider);
}
} else {
TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(-lower_id);
if (chat != null) {
setData(chat, null, name, text, 0, divider);
}
}
} else {
TLRPC.EncryptedChat encryptedChat = MessagesController.getInstance(currentAccount).getEncryptedChat(high_id);
if (encryptedChat != null) {
TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(encryptedChat.user_id);
if (user != null) {
setData(user, encryptedChat, name, text, 0, false);
}
}
}
}
public void setNameTypeface(Typeface typeface) {
nameTextView.setTypeface(typeface);
}
@ -232,6 +307,18 @@ public class UserCell extends FrameLayout {
if (currentUser.photo != null) {
photo = currentUser.photo.photo_small;
}
/*if (encryptedChat != null) {
drawNameLock = true;
dialog_id = ((long) encryptedChat.id) << 32;
if (!LocaleController.isRTL) {
nameLockLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline);
nameLeft = AndroidUtilities.dp(AndroidUtilities.leftBaseline + 4) + Theme.dialogs_lockDrawable.getIntrinsicWidth();
} else {
nameLockLeft = getMeasuredWidth() - AndroidUtilities.dp(AndroidUtilities.leftBaseline + 2) - Theme.dialogs_lockDrawable.getIntrinsicWidth();
nameLeft = AndroidUtilities.dp(11);
}
nameLockTop = AndroidUtilities.dp(16.5f);
}*/
} else if (currentObject instanceof TLRPC.Chat) {
currentChat = (TLRPC.Chat) currentObject;
if (currentChat.photo != null) {

View File

@ -15,6 +15,8 @@ import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.view.Gravity;
@ -25,6 +27,7 @@ import android.widget.ImageView;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.FileLoader;
import org.telegram.messenger.MediaController;
import org.telegram.messenger.R;
import org.telegram.tgnet.TLRPC;
import org.telegram.ui.ActionBar.Theme;
@ -50,6 +53,7 @@ public class WallpaperCell extends FrameLayout {
public WallpaperView(Context context) {
super(context);
setWillNotDraw(false);
imageView = new BackupImageView(context) {
@Override
@ -112,6 +116,9 @@ public class WallpaperCell extends FrameLayout {
} else {
imageView.setVisibility(VISIBLE);
imageView2.setVisibility(INVISIBLE);
imageView.setBackgroundDrawable(null);
imageView.getImageReceiver().setColorFilter(null);
imageView.getImageReceiver().setAlpha(1.0f);
if (object instanceof TLRPC.TL_wallPaper) {
TLRPC.TL_wallPaper wallPaper = (TLRPC.TL_wallPaper) object;
isSelected = wallPaper.id == selectedBackground;
@ -121,23 +128,52 @@ public class WallpaperCell extends FrameLayout {
image = null;
}
int size = image != null ? image.size : wallPaper.document.size;
imageView.setImage(image != null ? image : wallPaper.document, "100_100", thumb, "100_100_b", "jpg", size, 1, wallPaper);
imageView.setBackgroundColor(0x5a475866);
if (wallPaper.pattern) {
imageView.setBackgroundColor(0xff000000 | wallPaper.settings.background_color);
imageView.setImage(image, "100_100", thumb, null, "jpg", size, 1, wallPaper);
imageView.getImageReceiver().setColorFilter(new PorterDuffColorFilter(AndroidUtilities.getPatternColor(wallPaper.settings.background_color), PorterDuff.Mode.SRC_IN));
imageView.getImageReceiver().setAlpha(wallPaper.settings.intensity / 100.0f);
} else {
/*if (wallPaper.settings != null && wallPaper.settings.blur) {
imageView.setImage(null, "100_100", thumb, "100_100_b", "jpg", size, 1, wallPaper);
} else {*/
imageView.setImage(image != null ? image : wallPaper.document, "100_100", thumb, "100_100_b", "jpg", size, 1, wallPaper);
//}
}
} else if (object instanceof WallpapersListActivity.ColorWallpaper) {
WallpapersListActivity.ColorWallpaper wallPaper = (WallpapersListActivity.ColorWallpaper) object;
if (wallPaper.path != null) {
imageView.setImage(wallPaper.path.getAbsolutePath(), "100_100", null);
} else {
imageView.setImageBitmap(null);
imageView.setBackgroundColor(0xff000000 | wallPaper.color);
}
isSelected = wallPaper.id == selectedBackground;
imageView.setImageBitmap(null);
imageView.setBackgroundColor(0xff000000 | wallPaper.color);
} else if (object instanceof WallpapersListActivity.FileWallpaper) {
WallpapersListActivity.FileWallpaper wallPaper = (WallpapersListActivity.FileWallpaper) object;
isSelected = wallPaper.id == selectedBackground;
if (wallPaper.path != null) {
if (wallPaper.originalPath != null) {
imageView.setImage(wallPaper.originalPath.getAbsolutePath(), "100_100", null);
} else if (wallPaper.path != null) {
imageView.setImage(wallPaper.path.getAbsolutePath(), "100_100", null);
} else if (wallPaper.resId == Theme.THEME_BACKGROUND_ID) {
imageView.setImageDrawable(Theme.getThemedWallpaper(true));
} else {
imageView.setImageResource(wallPaper.thumbResId);
}
} else if (object instanceof MediaController.SearchImage) {
MediaController.SearchImage wallPaper = (MediaController.SearchImage) object;
if (wallPaper.photo != null) {
TLRPC.PhotoSize thumb = FileLoader.getClosestPhotoSizeWithSize(wallPaper.photo.sizes, 100);
TLRPC.PhotoSize image = FileLoader.getClosestPhotoSizeWithSize(wallPaper.photo.sizes, 320);
if (image == thumb) {
image = null;
}
int size = image != null ? image.size : 0;
imageView.setImage(image, "100_100", thumb, "100_100_b", "jpg", size, 1, wallPaper);
} else {
imageView.setImage(wallPaper.thumbUrl, "100_100", null);
}
} else {
isSelected = false;
}
@ -155,8 +191,8 @@ public class WallpaperCell extends FrameLayout {
}
if (animated) {
animator = new AnimatorSet();
animator.playTogether(ObjectAnimator.ofFloat(imageView, "scaleX", checked ? 0.85f : 1.0f),
ObjectAnimator.ofFloat(imageView, "scaleY", checked ? 0.85f : 1.0f));
animator.playTogether(ObjectAnimator.ofFloat(imageView, "scaleX", checked ? 0.8875f : 1.0f),
ObjectAnimator.ofFloat(imageView, "scaleY", checked ? 0.8875f : 1.0f));
animator.setDuration(200);
animator.addListener(new AnimatorListenerAdapter() {
@Override
@ -178,9 +214,10 @@ public class WallpaperCell extends FrameLayout {
});
animator.start();
} else {
imageView.setScaleX(checked ? 0.85f : 1.0f);
imageView.setScaleY(checked ? 0.85f : 1.0f);
imageView.setScaleX(checked ? 0.8875f : 1.0f);
imageView.setScaleY(checked ? 0.8875f : 1.0f);
}
invalidate();
}
@Override
@ -188,6 +225,22 @@ public class WallpaperCell extends FrameLayout {
super.invalidate();
imageView.invalidate();
}
@Override
public void clearAnimation() {
super.clearAnimation();
if (animator != null) {
animator.cancel();
animator = null;
}
}
@Override
protected void onDraw(Canvas canvas) {
if (checkBox.isChecked() || !imageView.getImageReceiver().hasBitmapImage() || imageView.getImageReceiver().getCurrentAlpha() != 1.0f) {
canvas.drawRect(0, 0, getMeasuredWidth(), getMeasuredHeight(), backgroundPaint);
}
}
}
private WallpaperView[] wallpaperViews;
@ -197,6 +250,7 @@ public class WallpaperCell extends FrameLayout {
private int currentType;
private Paint framePaint;
private Paint circlePaint;
private Paint backgroundPaint;
private Drawable checkDrawable;
public WallpaperCell(Context context) {
@ -205,12 +259,10 @@ public class WallpaperCell extends FrameLayout {
wallpaperViews = new WallpaperView[5];
for (int a = 0; a < wallpaperViews.length; a++) {
WallpaperView wallpaperView = wallpaperViews[a] = new WallpaperView(context);
int num = a;
addView(wallpaperView);
wallpaperView.setOnClickListener(v -> onWallpaperClick(wallpaperView.currentWallpaper));
wallpaperView.setOnLongClickListener(v -> {
onWallpaperLongClick(wallpaperView.currentWallpaper);
return true;
});
wallpaperView.setOnClickListener(v -> onWallpaperClick(wallpaperView.currentWallpaper, num));
wallpaperView.setOnLongClickListener(v -> onWallpaperLongClick(wallpaperView.currentWallpaper, num));
}
framePaint = new Paint();
@ -219,14 +271,17 @@ public class WallpaperCell extends FrameLayout {
circlePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
checkDrawable = context.getResources().getDrawable(R.drawable.background_selected).mutate();
backgroundPaint = new Paint();
backgroundPaint.setColor(Theme.getColor(Theme.key_sharedMedia_photoPlaceholder));
}
protected void onWallpaperClick(Object wallPaper) {
protected void onWallpaperClick(Object wallPaper, int index) {
}
protected void onWallpaperLongClick(Object wallPaper) {
protected boolean onWallpaperLongClick(Object wallPaper, int index) {
return false;
}
@Override
@ -260,6 +315,7 @@ public class WallpaperCell extends FrameLayout {
isBottom = bottom;
for (int a = 0; a < wallpaperViews.length; a++) {
wallpaperViews[a].setVisibility(a < columns ? VISIBLE : GONE);
wallpaperViews[a].clearAnimation();
}
}
@ -267,6 +323,7 @@ public class WallpaperCell extends FrameLayout {
currentType = type;
if (wallpaper == null) {
wallpaperViews[index].setVisibility(GONE);
wallpaperViews[index].clearAnimation();
} else {
wallpaperViews[index].setVisibility(VISIBLE);
wallpaperViews[index].setWallpaper(wallpaper, selectedBackground, themedWallpaper, themed);

View File

@ -8512,6 +8512,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
obj.messageOwner.id = newMsgId;
obj.messageOwner.send_state = MessageObject.MESSAGE_SEND_STATE_SENT;
obj.forceUpdate = mediaUpdated;
if (args.length >= 6) {
obj.applyMediaExistanceFlags((Integer) args[5]);
}
addToPolls(obj, null);
ArrayList<MessageObject> messArr = new ArrayList<>();
messArr.add(obj);
@ -8982,7 +8985,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
if (message.media.ttl_seconds != 0 && (message.media.photo instanceof TLRPC.TL_photoEmpty || message.media.document instanceof TLRPC.TL_documentEmpty)) {
existMessageObject.setType();
chatAdapter.updateRowWithMessageObject(existMessageObject, false);
if (chatAdapter != null) {
chatAdapter.updateRowWithMessageObject(existMessageObject, false);
}
} else {
updateVisibleRows();
}
@ -10377,6 +10382,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
chatLeaveTime = System.currentTimeMillis();
updateInformationForScreenshotDetector();
}
if (undoView != null) {
undoView.hide(true, false);
}
}
private void applyDraftMaybe(boolean canClear) {
@ -10736,7 +10744,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
if (msg.messageOwner.action != null) {
continue;
}
if ((msg.isOut() || canRevokeInbox) || ChatObject.canBlockUsers(currentChat)) {
if ((msg.isOut() || canRevokeInbox) || currentChat != null && ChatObject.canBlockUsers(currentChat)) {
if (!hasOutgoing && (currentDate - msg.messageOwner.date) <= revokeTimeLimit) {
hasOutgoing = true;
}

View File

@ -852,7 +852,9 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
chatId = param;
currentChat = MessagesController.getInstance(currentAccount).getChat(param);
donePressed = false;
info.hidden_prehistory = true;
if (info != null) {
info.hidden_prehistory = true;
}
processDone();
});
return;

View File

@ -1,519 +0,0 @@
/*
* This is the source code of Telegram for Android v. 5.x.x.
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Nikolai Kudashov, 2013-2018.
*/
package org.telegram.ui;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.DataQuery;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessagesController;
import org.telegram.messenger.R;
import org.telegram.messenger.SharedConfig;
import org.telegram.messenger.support.widget.LinearLayoutManager;
import org.telegram.messenger.support.widget.RecyclerView;
import org.telegram.ui.ActionBar.ActionBar;
import org.telegram.ui.ActionBar.AlertDialog;
import org.telegram.ui.ActionBar.BaseFragment;
import org.telegram.ui.ActionBar.BottomSheet;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.ActionBar.ThemeDescription;
import org.telegram.ui.Cells.CheckBoxCell;
import org.telegram.ui.Cells.EmptyCell;
import org.telegram.ui.Cells.HeaderCell;
import org.telegram.ui.Cells.NotificationsCheckCell;
import org.telegram.ui.Cells.ShadowSectionCell;
import org.telegram.ui.Cells.TextCheckCell;
import org.telegram.ui.Cells.TextDetailSettingsCell;
import org.telegram.ui.Cells.TextSettingsCell;
import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.Components.NumberPicker;
import org.telegram.ui.Components.RecyclerListView;
public class ChatSettingsActivity extends BaseFragment {
private RecyclerListView listView;
private ListAdapter listAdapter;
private int rowCount;
private int appearanceRow;
private int nightModeRow;
private int themeRow;
private int backgroundRow;
private int textSizeRow;
private int appearance2Row;
private int settingsRow;
private int customTabsRow;
private int directShareRow;
private int raiseToSpeakRow;
private int sendByEnterRow;
private int autoplayGifsRow;
private int saveToGalleryRow;
private int enableAnimationsRow;
private int settings2Row;
private int stickersRow;
private int stickersSection2Row;
private int emojiRow;
private int contactsReimportRow;
private int contactsSortRow;
@Override
public boolean onFragmentCreate() {
super.onFragmentCreate();
emojiRow = -1;
contactsReimportRow = -1;
contactsSortRow = -1;
rowCount = 0;
appearanceRow = rowCount++;
nightModeRow = rowCount++;
themeRow = rowCount++;
backgroundRow = rowCount++;
textSizeRow = rowCount++;
appearance2Row = rowCount++;
settingsRow = rowCount++;
customTabsRow = rowCount++;
directShareRow = rowCount++;
enableAnimationsRow = rowCount++;
raiseToSpeakRow = rowCount++;
sendByEnterRow = rowCount++;
autoplayGifsRow = rowCount++;
saveToGalleryRow = rowCount++;
settings2Row = rowCount++;
stickersRow = rowCount++;
stickersSection2Row = rowCount++;
return true;
}
@Override
public View createView(Context context) {
actionBar.setBackButtonImage(R.drawable.ic_ab_back);
actionBar.setTitle(LocaleController.getString("ChatSettings", R.string.ChatSettings));
if (AndroidUtilities.isTablet()) {
actionBar.setOccupyStatusBar(false);
}
actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() {
@Override
public void onItemClick(int id) {
if (id == -1) {
finishFragment();
}
}
});
listAdapter = new ListAdapter(context);
fragmentView = new FrameLayout(context);
fragmentView.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
FrameLayout frameLayout = (FrameLayout) fragmentView;
listView = new RecyclerListView(context);
listView.setVerticalScrollBarEnabled(false);
listView.setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false) {
@Override
public boolean supportsPredictiveItemAnimations() {
return false;
}
});
listView.setGlowColor(Theme.getColor(Theme.key_avatar_backgroundActionBarBlue));
listView.setAdapter(listAdapter);
listView.setItemAnimator(null);
listView.setLayoutAnimation(null);
frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT));
listView.setOnItemClickListener((view, position, x, y) -> {
if (position == textSizeRow) {
if (getParentActivity() == null) {
return;
}
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("TextSize", R.string.TextSize));
final NumberPicker numberPicker = new NumberPicker(getParentActivity());
numberPicker.setMinValue(12);
numberPicker.setMaxValue(30);
numberPicker.setValue(SharedConfig.fontSize);
builder.setView(numberPicker);
builder.setNegativeButton(LocaleController.getString("Done", R.string.Done), (dialog, which) -> {
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
SharedPreferences.Editor editor = preferences.edit();
editor.putInt("fons_size", numberPicker.getValue());
SharedConfig.fontSize = numberPicker.getValue();
editor.commit();
if (listAdapter != null) {
listAdapter.notifyItemChanged(position);
}
});
showDialog(builder.create());
} else if (position == enableAnimationsRow) {
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
boolean animations = preferences.getBoolean("view_animations", true);
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean("view_animations", !animations);
editor.commit();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(!animations);
}
} else if (position == backgroundRow) {
presentFragment(new WallpapersListActivity(WallpapersListActivity.TYPE_ALL));
} else if (position == sendByEnterRow) {
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
boolean send = preferences.getBoolean("send_by_enter", false);
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean("send_by_enter", !send);
editor.commit();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(!send);
}
} else if (position == raiseToSpeakRow) {
SharedConfig.toogleRaiseToSpeak();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(SharedConfig.raiseToSpeak);
}
} else if (position == autoplayGifsRow) {
SharedConfig.toggleAutoplayGifs();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(SharedConfig.autoplayGifs);
}
} else if (position == saveToGalleryRow) {
SharedConfig.toggleSaveToGallery();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(SharedConfig.saveToGallery);
}
} else if (position == customTabsRow) {
SharedConfig.toggleCustomTabs();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(SharedConfig.customTabs);
}
} else if(position == directShareRow) {
SharedConfig.toggleDirectShare();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(SharedConfig.directShare);
}
} else if (position == themeRow) {
presentFragment(new ThemeActivity(ThemeActivity.THEME_TYPE_BASIC));
} else if (position == contactsReimportRow) {
//not implemented
} else if (position == contactsSortRow) {
if (getParentActivity() == null) {
return;
}
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("SortBy", R.string.SortBy));
builder.setItems(new CharSequence[]{
LocaleController.getString("Default", R.string.Default),
LocaleController.getString("SortFirstName", R.string.SortFirstName),
LocaleController.getString("SortLastName", R.string.SortLastName)
}, (dialog, which) -> {
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
SharedPreferences.Editor editor = preferences.edit();
editor.putInt("sortContactsBy", which);
editor.commit();
if (listAdapter != null) {
listAdapter.notifyItemChanged(position);
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showDialog(builder.create());
} else if (position == stickersRow) {
presentFragment(new StickersActivity(DataQuery.TYPE_IMAGE));
} else if (position == emojiRow) {
if (getParentActivity() == null) {
return;
}
final boolean maskValues[] = new boolean[2];
BottomSheet.Builder builder = new BottomSheet.Builder(getParentActivity());
builder.setApplyTopPadding(false);
builder.setApplyBottomPadding(false);
LinearLayout linearLayout = new LinearLayout(getParentActivity());
linearLayout.setOrientation(LinearLayout.VERTICAL);
for (int a = 0; a < (Build.VERSION.SDK_INT >= 19 ? 2 : 1); a++) {
String name = null;
if (a == 0) {
maskValues[a] = SharedConfig.allowBigEmoji;
name = LocaleController.getString("EmojiBigSize", R.string.EmojiBigSize);
} else if (a == 1) {
maskValues[a] = SharedConfig.useSystemEmoji;
name = LocaleController.getString("EmojiUseDefault", R.string.EmojiUseDefault);
}
CheckBoxCell checkBoxCell = new CheckBoxCell(getParentActivity(), 1, 21);
checkBoxCell.setTag(a);
checkBoxCell.setBackgroundDrawable(Theme.getSelectorDrawable(false));
linearLayout.addView(checkBoxCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50));
checkBoxCell.setText(name, "", maskValues[a], true);
checkBoxCell.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));
checkBoxCell.setOnClickListener(v -> {
CheckBoxCell cell = (CheckBoxCell) v;
int num = (Integer) cell.getTag();
maskValues[num] = !maskValues[num];
cell.setChecked(maskValues[num], true);
});
}
BottomSheet.BottomSheetCell cell = new BottomSheet.BottomSheetCell(getParentActivity(), 1);
cell.setBackgroundDrawable(Theme.getSelectorDrawable(false));
cell.setTextAndIcon(LocaleController.getString("Save", R.string.Save).toUpperCase(), 0);
cell.setTextColor(Theme.getColor(Theme.key_dialogTextBlue2));
cell.setOnClickListener(v -> {
try {
if (visibleDialog != null) {
visibleDialog.dismiss();
}
} catch (Exception e) {
FileLog.e(e);
}
SharedPreferences.Editor editor = MessagesController.getGlobalMainSettings().edit();
editor.putBoolean("allowBigEmoji", SharedConfig.allowBigEmoji = maskValues[0]);
editor.putBoolean("useSystemEmoji", SharedConfig.useSystemEmoji = maskValues[1]);
editor.commit();
if (listAdapter != null) {
listAdapter.notifyItemChanged(position);
}
});
linearLayout.addView(cell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50));
builder.setCustomView(linearLayout);
showDialog(builder.create());
} else if (position == nightModeRow) {
if (LocaleController.isRTL && x <= AndroidUtilities.dp(76) || !LocaleController.isRTL && x >= view.getMeasuredWidth() - AndroidUtilities.dp(76)) {
NotificationsCheckCell checkCell = (NotificationsCheckCell) view;
if (Theme.selectedAutoNightType == Theme.AUTO_NIGHT_TYPE_NONE) {
Theme.selectedAutoNightType = Theme.AUTO_NIGHT_TYPE_AUTOMATIC;
checkCell.setChecked(true);
} else {
Theme.selectedAutoNightType = Theme.AUTO_NIGHT_TYPE_NONE;
checkCell.setChecked(false);
}
Theme.saveAutoNightThemeConfig();
Theme.checkAutoNightThemeConditions();
boolean enabled = Theme.selectedAutoNightType != Theme.AUTO_NIGHT_TYPE_NONE;
String value = enabled ? Theme.getCurrentNightThemeName() : LocaleController.getString("NotificationsOff", R.string.NotificationsOff);
checkCell.setTextAndValueAndCheck(LocaleController.getString("AutoNightTheme", R.string.AutoNightTheme), value, enabled, true);
} else {
presentFragment(new ThemeActivity(ThemeActivity.THEME_TYPE_NIGHT));
}
}
});
return fragmentView;
}
@Override
public void onResume() {
super.onResume();
if (listAdapter != null) {
listAdapter.notifyDataSetChanged();
}
}
private class ListAdapter extends RecyclerListView.SelectionAdapter {
private Context mContext;
public ListAdapter(Context context) {
mContext = context;
}
@Override
public int getItemCount() {
return rowCount;
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
switch (holder.getItemViewType()) {
case 2: {
TextSettingsCell textCell = (TextSettingsCell) holder.itemView;
if (position == textSizeRow) {
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
int size = preferences.getInt("fons_size", AndroidUtilities.isTablet() ? 18 : 16);
textCell.setTextAndValue(LocaleController.getString("TextSize", R.string.TextSize), String.format("%d", size), false);
} else if (position == contactsSortRow) {
String value;
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
int sort = preferences.getInt("sortContactsBy", 0);
if (sort == 0) {
value = LocaleController.getString("Default", R.string.Default);
} else if (sort == 1) {
value = LocaleController.getString("FirstName", R.string.SortFirstName);
} else {
value = LocaleController.getString("LastName", R.string.SortLastName);
}
textCell.setTextAndValue(LocaleController.getString("SortBy", R.string.SortBy), value, true);
} else if (position == backgroundRow) {
textCell.setText(LocaleController.getString("ChatBackground", R.string.ChatBackground), true);
} else if (position == contactsReimportRow) {
textCell.setText(LocaleController.getString("ImportContacts", R.string.ImportContacts), true);
} else if (position == stickersRow) {
textCell.setText(LocaleController.getString("StickersAndMasks", R.string.StickersAndMasks), false);
} else if (position == emojiRow) {
textCell.setText(LocaleController.getString("Emoji", R.string.Emoji), true);
}
break;
}
case 3: {
TextCheckCell textCell = (TextCheckCell) holder.itemView;
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
if (position == enableAnimationsRow) {
textCell.setTextAndCheck(LocaleController.getString("EnableAnimations", R.string.EnableAnimations), preferences.getBoolean("view_animations", true), true);
} else if (position == sendByEnterRow) {
textCell.setTextAndCheck(LocaleController.getString("SendByEnter", R.string.SendByEnter), preferences.getBoolean("send_by_enter", false), true);
} else if (position == saveToGalleryRow) {
textCell.setTextAndCheck(LocaleController.getString("SaveToGallerySettings", R.string.SaveToGallerySettings), SharedConfig.saveToGallery, false);
} else if (position == autoplayGifsRow) {
textCell.setTextAndCheck(LocaleController.getString("AutoplayGifs", R.string.AutoplayGifs), SharedConfig.autoplayGifs, true);
} else if (position == raiseToSpeakRow) {
textCell.setTextAndCheck(LocaleController.getString("RaiseToSpeak", R.string.RaiseToSpeak), SharedConfig.raiseToSpeak, true);
} else if (position == customTabsRow) {
textCell.setTextAndValueAndCheck(LocaleController.getString("ChromeCustomTabs", R.string.ChromeCustomTabs), LocaleController.getString("ChromeCustomTabsInfo", R.string.ChromeCustomTabsInfo), SharedConfig.customTabs, false, true);
} else if (position == directShareRow) {
textCell.setTextAndValueAndCheck(LocaleController.getString("DirectShare", R.string.DirectShare), LocaleController.getString("DirectShareInfo", R.string.DirectShareInfo), SharedConfig.directShare, false, true);
}
break;
}
case 4: {
HeaderCell headerCell = (HeaderCell) holder.itemView;
if (position == settingsRow) {
headerCell.setText(LocaleController.getString("SETTINGS", R.string.SETTINGS));
} else if (position == appearanceRow) {
headerCell.setText(LocaleController.getString("Appearance", R.string.Appearance));
}
break;
}
case 5: {
NotificationsCheckCell checkCell = (NotificationsCheckCell) holder.itemView;
if (position == nightModeRow) {
boolean enabled = Theme.selectedAutoNightType != Theme.AUTO_NIGHT_TYPE_NONE;
String value = enabled ? Theme.getCurrentNightThemeName() : LocaleController.getString("NotificationsOff", R.string.NotificationsOff);
checkCell.setTextAndValueAndCheck(LocaleController.getString("AutoNightTheme", R.string.AutoNightTheme), value, enabled, true);
}
break;
}
case 6: {
TextDetailSettingsCell textCell = (TextDetailSettingsCell) holder.itemView;
if (position == themeRow) {
textCell.setTextAndValue(LocaleController.getString("Theme", R.string.Theme), LocaleController.getString("ThemeInfo", R.string.ThemeInfo), true);
}
break;
}
}
}
@Override
public boolean isEnabled(RecyclerView.ViewHolder holder) {
int position = holder.getAdapterPosition();
return position == textSizeRow || position == enableAnimationsRow || position == backgroundRow ||
position == sendByEnterRow || position == autoplayGifsRow || position == contactsSortRow ||
position == contactsReimportRow || position == saveToGalleryRow || position == stickersRow ||
position == raiseToSpeakRow || position == customTabsRow || position == directShareRow ||
position == emojiRow || position == themeRow || position == nightModeRow;
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = null;
switch (viewType) {
case 1:
view = new ShadowSectionCell(mContext);
break;
case 2:
view = new TextSettingsCell(mContext);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 3:
view = new TextCheckCell(mContext);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 4:
view = new HeaderCell(mContext);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 5:
view = new NotificationsCheckCell(mContext);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 6:
view = new TextDetailSettingsCell(mContext);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
}
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));
return new RecyclerListView.Holder(view);
}
@Override
public int getItemViewType(int position) {
if (position == stickersSection2Row || position == settings2Row || position == appearance2Row) {
return 1;
} else if (position == backgroundRow || position == contactsReimportRow ||
position == textSizeRow || position == contactsSortRow || position == stickersRow ||
position == emojiRow) {
return 2;
} else if (position == enableAnimationsRow || position == sendByEnterRow || position == saveToGalleryRow ||
position == autoplayGifsRow || position == raiseToSpeakRow || position == customTabsRow ||
position == directShareRow) {
return 3;
} else if (position == appearanceRow || position == settingsRow) {
return 4;
} else if (position == nightModeRow) {
return 5;
}
return 6;
}
}
@Override
public ThemeDescription[] getThemeDescriptions() {
return new ThemeDescription[]{
new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{EmptyCell.class, TextSettingsCell.class, TextCheckCell.class, HeaderCell.class, TextDetailSettingsCell.class, NotificationsCheckCell.class}, null, null, null, Theme.key_windowBackgroundWhite),
new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundGray),
new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue),
new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue),
new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_avatar_actionBarIconBlue),
new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle),
new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_avatar_actionBarSelectorBlue),
new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBMENUBACKGROUND, null, null, null, null, Theme.key_actionBarDefaultSubmenuBackground),
new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBMENUITEM, null, null, null, null, Theme.key_actionBarDefaultSubmenuItem),
new ThemeDescription(listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector),
new ThemeDescription(listView, 0, new Class[]{View.class}, Theme.dividerPaint, null, null, Theme.key_divider),
new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[]{ShadowSectionCell.class}, null, null, null, Theme.key_windowBackgroundGrayShadow),
new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteValueText),
new ThemeDescription(listView, 0, new Class[]{NotificationsCheckCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
new ThemeDescription(listView, 0, new Class[]{NotificationsCheckCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2),
new ThemeDescription(listView, 0, new Class[]{NotificationsCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrack),
new ThemeDescription(listView, 0, new Class[]{NotificationsCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrackChecked),
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2),
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrack),
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrackChecked),
new ThemeDescription(listView, 0, new Class[]{HeaderCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader),
new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
new ThemeDescription(listView, 0, new Class[]{TextDetailSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2),
};
}
}

View File

@ -654,17 +654,13 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
removeUser(user_id);
}
} else {
if (type == TYPE_BANNED) {
createMenuForParticipant(listViewAdapter.getItem(position), false);
return;
}
boolean canEdit = false;
if (type == TYPE_ADMIN) {
canEdit = user_id != UserConfig.getInstance(currentAccount).getClientUserId() && (currentChat.creator || canEditAdmin);
} else if (type == TYPE_BANNED || type == TYPE_KICKED) {
canEdit = ChatObject.canBlockUsers(currentChat);
}
if (type != TYPE_ADMIN && isChannel || type == TYPE_USERS && selectType == 0) {
if (type == TYPE_BANNED || type != TYPE_ADMIN && isChannel || type == TYPE_USERS && selectType == 0) {
Bundle args = new Bundle();
args.putInt("user_id", user_id);
presentFragment(new ProfileActivity(args));
@ -963,7 +959,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
return true;
}
items = new CharSequence[]{
isChannel ? LocaleController.getString("ChannelAddToChannel", R.string.ChannelAddToChannel) : LocaleController.getString("ChannelAddToGroup", R.string.ChannelAddToGroup),
ChatObject.canAddUsers(currentChat) ? (isChannel ? LocaleController.getString("ChannelAddToChannel", R.string.ChannelAddToChannel) : LocaleController.getString("ChannelAddToGroup", R.string.ChannelAddToGroup)) : null,
LocaleController.getString("ChannelDeleteFromList", R.string.ChannelDeleteFromList)};
icons = new int[]{
R.drawable.actions_addmember2,

View File

@ -32,7 +32,6 @@ import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.BuildVars;
import org.telegram.messenger.ChatObject;
import org.telegram.messenger.ContactsController;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessagesController;
import org.telegram.messenger.MessagesStorage;
@ -674,9 +673,9 @@ public class AlertsCreator {
if (clear) {
if (user != null) {
if (secret) {
messageTextView.setText(AndroidUtilities.replaceTags(LocaleController.formatString("AreYouSureClearHistoryWithSecretUser", R.string.AreYouSureClearHistoryWithSecretUser, ContactsController.formatName(user.first_name, user.last_name))));
messageTextView.setText(AndroidUtilities.replaceTags(LocaleController.formatString("AreYouSureClearHistoryWithSecretUser", R.string.AreYouSureClearHistoryWithSecretUser, UserObject.getUserName(user))));
} else {
messageTextView.setText(AndroidUtilities.replaceTags(LocaleController.formatString("AreYouSureClearHistoryWithUser", R.string.AreYouSureClearHistoryWithUser, ContactsController.formatName(user.first_name, user.last_name))));
messageTextView.setText(AndroidUtilities.replaceTags(LocaleController.formatString("AreYouSureClearHistoryWithUser", R.string.AreYouSureClearHistoryWithUser, UserObject.getUserName(user))));
}
} else if (chat != null) {
if (!ChatObject.isChannel(chat) || chat.megagroup && TextUtils.isEmpty(chat.username)) {
@ -690,9 +689,9 @@ public class AlertsCreator {
} else {
if (user != null) {
if (secret) {
messageTextView.setText(AndroidUtilities.replaceTags(LocaleController.formatString("AreYouSureDeleteThisChatWithSecretUser", R.string.AreYouSureDeleteThisChatWithSecretUser, ContactsController.formatName(user.first_name, user.last_name))));
messageTextView.setText(AndroidUtilities.replaceTags(LocaleController.formatString("AreYouSureDeleteThisChatWithSecretUser", R.string.AreYouSureDeleteThisChatWithSecretUser, UserObject.getUserName(user))));
} else {
messageTextView.setText(AndroidUtilities.replaceTags(LocaleController.formatString("AreYouSureDeleteThisChatWithUser", R.string.AreYouSureDeleteThisChatWithUser, ContactsController.formatName(user.first_name, user.last_name))));
messageTextView.setText(AndroidUtilities.replaceTags(LocaleController.formatString("AreYouSureDeleteThisChatWithUser", R.string.AreYouSureDeleteThisChatWithUser, UserObject.getUserName(user))));
}
} else if (ChatObject.isChannel(chat)) {
if (chat.megagroup) {
@ -727,7 +726,9 @@ public class AlertsCreator {
AlertDialog alertDialog = builder.create();
fragment.showDialog(alertDialog);
TextView button = (TextView) alertDialog.getButton(DialogInterface.BUTTON_POSITIVE);
button.setTextColor(Theme.getColor(Theme.key_dialogTextRed2));
if (button != null) {
button.setTextColor(Theme.getColor(Theme.key_dialogTextRed2));
}
}
public interface DatePickerDelegate {

View File

@ -48,50 +48,54 @@ public class BackupImageView extends View {
}
public void setImage(SecureDocument path, String filter) {
setImage(path, null, filter, null, null, null, null, null, 0, null);
setImage(path, filter, null, null, null, null, null, 0, null);
}
public void setImage(TLObject path, String filter, String ext, Drawable thumb, Object parentObject) {
setImage(path, null, filter, thumb, null, null, null, ext, 0, parentObject);
setImage(path, filter, thumb, null, null, null, ext, 0, parentObject);
}
public void setImage(TLObject path, String filter, Drawable thumb, Object parentObject) {
setImage(path, null, filter, thumb, null, null, null, null, 0, parentObject);
setImage(path, filter, thumb, null, null, null, null, 0, parentObject);
}
public void setImage(TLObject path, String filter, Bitmap thumb, Object parentObject) {
setImage(path, null, filter, null, thumb, null, null, null, 0, parentObject);
setImage(path, filter, null, thumb, null, null, null, 0, parentObject);
}
public void setImage(TLObject path, String filter, Drawable thumb, int size, Object parentObject) {
setImage(path, null, filter, thumb, null, null, null, null, size, parentObject);
setImage(path, filter, thumb, null, null, null, null, size, parentObject);
}
public void setImage(TLObject path, String filter, Bitmap thumb, int size, Object parentObject) {
setImage(path, null, filter, null, thumb, null, null, null, size, parentObject);
setImage(path, filter, null, thumb, null, null, null, size, parentObject);
}
public void setImage(TLObject path, String filter, TLObject thumb, int size, Object parentObject) {
setImage(path, null, filter, null, null, thumb, null, null, size, parentObject);
setImage(path, filter, null, null, thumb, null, null, size, parentObject);
}
public void setImage(String path, String filter, Drawable thumb) {
setImage(null, path, filter, thumb, null, null, null, null, 0, null);
setImage(path, filter, thumb, null, null, null, null, 0, null);
}
public void setImage(String path, String filter, String thumbPath, String thumbFilter) {
setImage(path, filter, null, null, thumbPath, thumbFilter, null, 0, null);
}
public void setOrientation(int angle, boolean center) {
imageReceiver.setOrientation(angle, center);
}
public void setImage(TLObject path, String httpUrl, String filter, Drawable thumb, Bitmap thumbBitmap, TLObject thumbLocation, String thumbFilter, String ext, int size, Object parentObject) {
public void setImage(Object path, String filter, Drawable thumb, Bitmap thumbBitmap, Object thumbLocation, String thumbFilter, String ext, int size, Object parentObject) {
if (thumbBitmap != null) {
thumb = new BitmapDrawable(null, thumbBitmap);
}
imageReceiver.setImage(path, httpUrl, filter, thumb, thumbLocation, thumbFilter, size, ext, parentObject, 0);
imageReceiver.setImage(path, filter, thumb, thumbLocation, thumbFilter, size, ext, parentObject, 0);
}
public void setImage(TLObject path, String filter, TLObject thumbLocation, String thumbFilter, String ext, int size, int cacheType, Object parentObject) {
imageReceiver.setImage(path, null, filter, null, thumbLocation, thumbFilter, size, ext, parentObject, cacheType);
imageReceiver.setImage(path, filter, null, thumbLocation, thumbFilter, size, ext, parentObject, cacheType);
}
public void setImageBitmap(Bitmap bitmap) {

View File

@ -405,6 +405,8 @@ public class EditTextBoldCursor extends EditText {
if (supportRtlHint && LocaleController.isRTL) {
canvas.translate((hintWidth + lineLeft) - (hintWidth + lineLeft) * scale, 0);
} else if (lineLeft != 0) {
canvas.translate(lineLeft * (1.0f - scale), 0);
}
canvas.scale(scale, scale);
canvas.translate(0, translation);

View File

@ -107,7 +107,7 @@ public class GroupCreateSpan extends View {
if (user != null && user.photo != null) {
photo = user.photo.photo_small;
}
imageReceiver.setImage(photo, null, "50_50", avatarDrawable, null, null, 0, null, user, 1);
imageReceiver.setImage(photo, "50_50", avatarDrawable, null, null, 0, null, user, 1);
updateColors();
}

View File

@ -335,7 +335,7 @@ public class GroupedPhotosListView extends View implements GestureDetector.OnGes
} else {
parent = "avatar_" + delegate.getAvatarsDialogId();
}
receiver.setImage(null, null, null, null, location, "80_80", 0, null, parent, 1);
receiver.setImage(null, null, null, location, "80_80", 0, null, parent, 1);
receiver.setParam(a);
} else {
break;
@ -357,7 +357,7 @@ public class GroupedPhotosListView extends View implements GestureDetector.OnGes
} else {
parent = "avatar_" + delegate.getAvatarsDialogId();
}
receiver.setImage(null, null, null, null, location, "80_80", 0, null, parent, 1);
receiver.setImage(null, null, null, location, "80_80", 0, null, parent, 1);
receiver.setParam(a);
} else {
break;

View File

@ -10,6 +10,7 @@ package org.telegram.ui.Components;
import android.graphics.Path;
import android.graphics.RectF;
import android.os.Build;
import android.text.StaticLayout;
import org.telegram.messenger.AndroidUtilities;
@ -24,6 +25,7 @@ public class LinkPath extends Path {
private RectF rect;
private boolean allowReset = true;
private int baselineShift;
private int lineHeight;
public LinkPath() {
super();
@ -39,6 +41,12 @@ public class LinkPath extends Path {
currentLine = layout.getLineForOffset(start);
lastTop = -1;
heightOffset = yOffset;
if (Build.VERSION.SDK_INT >= 28) {
int lineCount = layout.getLineCount();
if (lineCount > 0) {
lineHeight = layout.getLineBottom(lineCount - 1) - layout.getLineTop(lineCount - 1);
}
}
}
public void setAllowReset(boolean value) {
@ -79,7 +87,15 @@ public class LinkPath extends Path {
left = lineLeft;
}
float y = top;
float y2 = bottom - (bottom != currentLayout.getHeight() ? currentLayout.getSpacingAdd() : 0);
float y2;
if (Build.VERSION.SDK_INT >= 28) {
y2 = bottom;
if (bottom - top > lineHeight) {
y2 -= (bottom != currentLayout.getHeight() ? currentLayout.getSpacingAdd() : 0);
}
} else {
y2 = bottom - (bottom != currentLayout.getHeight() ? currentLayout.getSpacingAdd() : 0);
}
if (baselineShift < 0) {
y2 += baselineShift;
} else if (baselineShift > 0) {

View File

@ -60,6 +60,8 @@ public class MediaActionDrawable extends Drawable {
private String percentString;
private int percentStringWidth;
private float overrideAlpha = 1.0f;
private int currentIcon;
private int nextIcon;
private float transitionProgress = 1.0f;
@ -104,9 +106,11 @@ public class MediaActionDrawable extends Drawable {
@Override
public void setAlpha(int alpha) {
paint.setAlpha(alpha);
paint2.setAlpha(alpha);
textPaint.setAlpha(alpha);
}
public void setOverrideAlpha(float alpha) {
overrideAlpha = alpha;
}
@Override
@ -148,7 +152,7 @@ public class MediaActionDrawable extends Drawable {
}
if (icon == ICON_CANCEL) {
transitionAnimationTime = 400.0f;
} else if (icon == ICON_CHECK) {
} else if (currentIcon != ICON_NONE && icon == ICON_CHECK) {
transitionAnimationTime = 360.0f;
} else {
transitionAnimationTime = 220.0f;
@ -180,6 +184,10 @@ public class MediaActionDrawable extends Drawable {
return nextIcon;
}
public int getPreviousIcon() {
return currentIcon;
}
public void setProgress(float value, boolean animated) {
if (!animated) {
animatedDownloadProgress = value;
@ -235,6 +243,9 @@ public class MediaActionDrawable extends Drawable {
float progress = 1.0f - transitionProgress;
canvas.save();
canvas.scale(progress, progress, cx, cy);
} else if ((nextIcon == ICON_CHECK || nextIcon == ICON_EMPTY) && currentIcon == ICON_NONE) {
canvas.save();
canvas.scale(transitionProgress, transitionProgress, cx, cy);
}
int width = AndroidUtilities.dp(3);
@ -399,9 +410,9 @@ public class MediaActionDrawable extends Drawable {
rect.set(bounds.left + diff, bounds.top + diff, bounds.right - diff, bounds.bottom - diff);
canvas.drawArc(rect, downloadRadOffset, rad, false, paint);
}
} else if (currentIcon == ICON_EMPTY || currentIcon == ICON_CANCEL_PERCENT) {
} else if (currentIcon == ICON_EMPTY || nextIcon == ICON_EMPTY || currentIcon == ICON_CANCEL_PERCENT) {
int alpha;
if (nextIcon == ICON_NONE) {
if (nextIcon == ICON_NONE || nextIcon == ICON_CHECK) {
float progress = transitionProgress;
float backProgress = 1.0f - progress;
alpha = (int) (255 * backProgress);
@ -410,7 +421,7 @@ public class MediaActionDrawable extends Drawable {
}
if (alpha != 0) {
paint.setAlpha(alpha);
paint.setAlpha((int) (alpha * overrideAlpha));
float rad = Math.max(4, 360 * animatedDownloadProgress);
int diff = AndroidUtilities.dp(isMini ? 2 : 4);
rect.set(bounds.left + diff, bounds.top + diff, bounds.right - diff, bounds.bottom - diff);
@ -707,7 +718,7 @@ public class MediaActionDrawable extends Drawable {
invalidateSelf();
}
}
if (nextIcon == ICON_NONE) {
if (nextIcon == ICON_NONE || (nextIcon == ICON_CHECK || nextIcon == ICON_EMPTY) && currentIcon == ICON_NONE) {
canvas.restore();
}
}

View File

@ -217,7 +217,15 @@ public class RadialProgress2 {
return;
}
float wholeAlpha = mediaActionDrawable.getCurrentIcon() != MediaActionDrawable.ICON_NONE ? 1.0f : 1.0f - mediaActionDrawable.getTransitionProgress();
int currentIcon = mediaActionDrawable.getCurrentIcon();
int prevIcon = mediaActionDrawable.getPreviousIcon();
float wholeAlpha;
if ((currentIcon == MediaActionDrawable.ICON_CHECK || currentIcon == MediaActionDrawable.ICON_EMPTY) && prevIcon == MediaActionDrawable.ICON_NONE) {
wholeAlpha = mediaActionDrawable.getTransitionProgress();
} else {
wholeAlpha = currentIcon != MediaActionDrawable.ICON_NONE ? 1.0f : 1.0f - mediaActionDrawable.getTransitionProgress();
}
if (isPressedMini) {
if (iconPressedColorKey != null) {
@ -315,7 +323,7 @@ public class RadialProgress2 {
if (drawMiniIcon && miniDrawCanvas != null) {
miniDrawCanvas.drawCircle(centerX, centerY, circleRadius, circlePaint);
} else {
if (mediaActionDrawable.getCurrentIcon() != MediaActionDrawable.ICON_NONE || wholeAlpha != 0) {
if (currentIcon != MediaActionDrawable.ICON_NONE || wholeAlpha != 0) {
canvas.drawCircle(centerX, centerY, circleRadius * wholeAlpha, circlePaint);
}
}
@ -333,13 +341,13 @@ public class RadialProgress2 {
}
mediaActionDrawable.setBounds(centerX - circleRadius, centerY - circleRadius, centerX + circleRadius, centerY + circleRadius);
if (drawMiniIcon) {
mediaActionDrawable.setAlpha((int) (255 * wholeAlpha * overrideAlpha));
if (miniDrawCanvas != null) {
mediaActionDrawable.draw(miniDrawCanvas);
} else {
mediaActionDrawable.draw(canvas);
}
} else {
mediaActionDrawable.setOverrideAlpha(overrideAlpha);
mediaActionDrawable.draw(canvas);
}
@ -370,7 +378,6 @@ public class RadialProgress2 {
miniDrawCanvas.drawCircle(AndroidUtilities.dp(18 + size + offset), AndroidUtilities.dp(18 + size + offset), AndroidUtilities.dp(halfSize + 1) * alpha, Theme.checkboxSquare_eraserPaint);
} else {
miniProgressBackgroundPaint.setColor(progressColor);
miniProgressBackgroundPaint.setAlpha((int) (255 * alpha * wholeAlpha * overrideAlpha));
canvas.drawCircle(cx, cy, AndroidUtilities.dp(12), miniProgressBackgroundPaint);
}
@ -379,7 +386,6 @@ public class RadialProgress2 {
}
canvas.drawCircle(cx, cy, AndroidUtilities.dp(halfSize) * alpha, circleMiniPaint);
miniMediaActionDrawable.setAlpha((int) (255 * wholeAlpha * overrideAlpha));
miniMediaActionDrawable.setBounds((int) (cx - AndroidUtilities.dp(halfSize) * alpha), (int) (cy - AndroidUtilities.dp(halfSize) * alpha), (int) (cx + AndroidUtilities.dp(halfSize) * alpha), (int) (cy + AndroidUtilities.dp(halfSize) * alpha));
miniMediaActionDrawable.draw(canvas);
}

View File

@ -55,7 +55,6 @@ import org.telegram.messenger.support.widget.GridLayoutManager;
import org.telegram.messenger.support.widget.RecyclerView;
import org.telegram.tgnet.ConnectionsManager;
import org.telegram.tgnet.NativeByteBuffer;
import org.telegram.tgnet.RequestDelegate;
import org.telegram.tgnet.TLObject;
import org.telegram.tgnet.TLRPC;
import org.telegram.ui.ActionBar.BottomSheet;
@ -65,7 +64,6 @@ import org.telegram.ui.DialogsActivity;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Locale;
import java.util.Timer;
import java.util.TimerTask;
@ -134,23 +132,15 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi
TLRPC.TL_channels_exportMessageLink req = new TLRPC.TL_channels_exportMessageLink();
req.id = messages.get(0).getId();
req.channel = MessagesController.getInstance(currentAccount).getInputChannel(messages.get(0).messageOwner.to_id.channel_id);
ConnectionsManager.getInstance(currentAccount).sendRequest(req, new RequestDelegate() {
@Override
public void run(final TLObject response, TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
if (response != null) {
exportedMessageLink = (TLRPC.TL_exportedMessageLink) response;
if (copyLinkOnEnd) {
copyLink(context);
}
}
loadingLink = false;
}
});
ConnectionsManager.getInstance(currentAccount).sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> {
if (response != null) {
exportedMessageLink = (TLRPC.TL_exportedMessageLink) response;
if (copyLinkOnEnd) {
copyLink(context);
}
}
});
loadingLink = false;
}));
}
containerView = new FrameLayout(context) {
@ -213,49 +203,41 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi
frameLayout = new FrameLayout(context);
frameLayout.setBackgroundColor(Theme.getColor(Theme.key_dialogBackground));
frameLayout.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return true;
}
});
frameLayout.setOnTouchListener((v, event) -> true);
doneButton = new LinearLayout(context);
doneButton.setOrientation(LinearLayout.HORIZONTAL);
doneButton.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_dialogButtonSelector), 0));
doneButton.setPadding(AndroidUtilities.dp(21), 0, AndroidUtilities.dp(21), 0);
frameLayout.addView(doneButton, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.RIGHT));
doneButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (selectedDialogs.size() == 0 && (isPublicChannel || linkToCopy != null)) {
if (linkToCopy == null && loadingLink) {
copyLinkOnEnd = true;
Toast.makeText(ShareAlert.this.getContext(), LocaleController.getString("Loading", R.string.Loading), Toast.LENGTH_SHORT).show();
} else {
copyLink(ShareAlert.this.getContext());
}
dismiss();
doneButton.setOnClickListener(v -> {
if (selectedDialogs.size() == 0 && (isPublicChannel || linkToCopy != null)) {
if (linkToCopy == null && loadingLink) {
copyLinkOnEnd = true;
Toast.makeText(ShareAlert.this.getContext(), LocaleController.getString("Loading", R.string.Loading), Toast.LENGTH_SHORT).show();
} else {
if (sendingMessageObjects != null) {
for (int a = 0; a < selectedDialogs.size(); a++) {
long key = selectedDialogs.keyAt(a);
if (frameLayout2.getTag() != null && commentTextView.length() > 0) {
SendMessagesHelper.getInstance(currentAccount).sendMessage(commentTextView.getText().toString(), key, null, null, true, null, null, null);
}
SendMessagesHelper.getInstance(currentAccount).sendMessage(sendingMessageObjects, key);
}
} else if (sendingText != null) {
for (int a = 0; a < selectedDialogs.size(); a++) {
long key = selectedDialogs.keyAt(a);
if (frameLayout2.getTag() != null && commentTextView.length() > 0) {
SendMessagesHelper.getInstance(currentAccount).sendMessage(commentTextView.getText().toString(), key, null, null, true, null, null, null);
}
SendMessagesHelper.getInstance(currentAccount).sendMessage(sendingText, key, null, null, true, null, null, null);
}
}
dismiss();
copyLink(ShareAlert.this.getContext());
}
dismiss();
} else {
if (sendingMessageObjects != null) {
for (int a = 0; a < selectedDialogs.size(); a++) {
long key = selectedDialogs.keyAt(a);
if (frameLayout2.getTag() != null && commentTextView.length() > 0) {
SendMessagesHelper.getInstance(currentAccount).sendMessage(commentTextView.getText().toString(), key, null, null, true, null, null, null);
}
SendMessagesHelper.getInstance(currentAccount).sendMessage(sendingMessageObjects, key);
}
} else if (sendingText != null) {
for (int a = 0; a < selectedDialogs.size(); a++) {
long key = selectedDialogs.keyAt(a);
if (frameLayout2.getTag() != null && commentTextView.length() > 0) {
SendMessagesHelper.getInstance(currentAccount).sendMessage(commentTextView.getText().toString(), key, null, null, true, null, null, null);
}
SendMessagesHelper.getInstance(currentAccount).sendMessage(sendingText, key, null, null, true, null, null, null);
}
}
dismiss();
}
});
@ -362,31 +344,28 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi
containerView.addView(gridView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, 48, 0, 0));
gridView.setAdapter(listAdapter = new ShareDialogsAdapter(context));
gridView.setGlowColor(Theme.getColor(Theme.key_dialogScrollGlow));
gridView.setOnItemClickListener(new RecyclerListView.OnItemClickListener() {
@Override
public void onItemClick(View view, int position) {
if (position < 0) {
return;
}
TLRPC.TL_dialog dialog;
if (gridView.getAdapter() == listAdapter) {
dialog = listAdapter.getItem(position);
} else {
dialog = searchAdapter.getItem(position);
}
if (dialog == null) {
return;
}
ShareDialogCell cell = (ShareDialogCell) view;
if (selectedDialogs.indexOfKey(dialog.id) >= 0) {
selectedDialogs.remove(dialog.id);
cell.setChecked(false, true);
} else {
selectedDialogs.put(dialog.id, dialog);
cell.setChecked(true, true);
}
updateSelectedCount();
gridView.setOnItemClickListener((view, position) -> {
if (position < 0) {
return;
}
TLRPC.TL_dialog dialog;
if (gridView.getAdapter() == listAdapter) {
dialog = listAdapter.getItem(position);
} else {
dialog = searchAdapter.getItem(position);
}
if (dialog == null) {
return;
}
ShareDialogCell cell = (ShareDialogCell) view;
if (selectedDialogs.indexOfKey(dialog.id) >= 0) {
selectedDialogs.remove(dialog.id);
cell.setChecked(false, true);
} else {
selectedDialogs.put(dialog.id, dialog);
cell.setChecked(true, true);
}
updateSelectedCount();
});
gridView.setOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
@ -412,12 +391,7 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi
frameLayout2.setBackgroundColor(Theme.getColor(Theme.key_dialogBackground));
frameLayout2.setTranslationY(AndroidUtilities.dp(53));
containerView.addView(frameLayout2, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.LEFT | Gravity.BOTTOM));
frameLayout2.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return true;
}
});
frameLayout2.setOnTouchListener((v, event) -> true);
commentTextView = new EditTextBoldCursor(context);
commentTextView.setHint(LocaleController.getString("ShareComment", R.string.ShareComment));
@ -588,9 +562,16 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi
public void fetchDialogs() {
dialogs.clear();
for (int a = 0; a < MessagesController.getInstance(currentAccount).dialogsForward.size(); a++) {
TLRPC.TL_dialog dialog = MessagesController.getInstance(currentAccount).dialogsForward.get(a);
int selfUserId = UserConfig.getInstance(currentAccount).clientUserId;
if (!MessagesController.getInstance(currentAccount).dialogsForward.isEmpty()) {
dialogs.add(MessagesController.getInstance(currentAccount).dialogsForward.get(0));
}
for (int a = 0; a < MessagesController.getInstance(currentAccount).dialogs.size(); a++) {
TLRPC.TL_dialog dialog = MessagesController.getInstance(currentAccount).dialogs.get(a);
int lower_id = (int) dialog.id;
if (lower_id == selfUserId) {
continue;
}
int high_id = (int) (dialog.id >> 32);
if (lower_id != 0 && high_id != 1) {
if (lower_id > 0) {
@ -665,143 +646,55 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi
}
private void searchDialogsInternal(final String query, final int searchId) {
MessagesStorage.getInstance(currentAccount).getStorageQueue().postRunnable(new Runnable() {
@Override
public void run() {
try {
String search1 = query.trim().toLowerCase();
if (search1.length() == 0) {
lastSearchId = -1;
updateSearchResults(new ArrayList<DialogSearchResult>(), lastSearchId);
return;
}
String search2 = LocaleController.getInstance().getTranslitString(search1);
if (search1.equals(search2) || search2.length() == 0) {
search2 = null;
}
String search[] = new String[1 + (search2 != null ? 1 : 0)];
search[0] = search1;
if (search2 != null) {
search[1] = search2;
}
MessagesStorage.getInstance(currentAccount).getStorageQueue().postRunnable(() -> {
try {
String search1 = query.trim().toLowerCase();
if (search1.length() == 0) {
lastSearchId = -1;
updateSearchResults(new ArrayList<>(), lastSearchId);
return;
}
String search2 = LocaleController.getInstance().getTranslitString(search1);
if (search1.equals(search2) || search2.length() == 0) {
search2 = null;
}
String search[] = new String[1 + (search2 != null ? 1 : 0)];
search[0] = search1;
if (search2 != null) {
search[1] = search2;
}
ArrayList<Integer> usersToLoad = new ArrayList<>();
ArrayList<Integer> chatsToLoad = new ArrayList<>();
int resultCount = 0;
ArrayList<Integer> usersToLoad = new ArrayList<>();
ArrayList<Integer> chatsToLoad = new ArrayList<>();
int resultCount = 0;
LongSparseArray<DialogSearchResult> dialogsResult = new LongSparseArray<>();
SQLiteCursor cursor = MessagesStorage.getInstance(currentAccount).getDatabase().queryFinalized("SELECT did, date FROM dialogs ORDER BY date DESC LIMIT 400");
LongSparseArray<DialogSearchResult> dialogsResult = new LongSparseArray<>();
SQLiteCursor cursor = MessagesStorage.getInstance(currentAccount).getDatabase().queryFinalized("SELECT did, date FROM dialogs ORDER BY date DESC LIMIT 400");
while (cursor.next()) {
long id = cursor.longValue(0);
DialogSearchResult dialogSearchResult = new DialogSearchResult();
dialogSearchResult.date = cursor.intValue(1);
dialogsResult.put(id, dialogSearchResult);
int lower_id = (int) id;
int high_id = (int) (id >> 32);
if (lower_id != 0 && high_id != 1) {
if (lower_id > 0) {
if (!usersToLoad.contains(lower_id)) {
usersToLoad.add(lower_id);
}
} else {
if (!chatsToLoad.contains(-lower_id)) {
chatsToLoad.add(-lower_id);
}
}
}
}
cursor.dispose();
if (!usersToLoad.isEmpty()) {
cursor = MessagesStorage.getInstance(currentAccount).getDatabase().queryFinalized(String.format(Locale.US, "SELECT data, status, name FROM users WHERE uid IN(%s)", TextUtils.join(",", usersToLoad)));
while (cursor.next()) {
long id = cursor.longValue(0);
DialogSearchResult dialogSearchResult = new DialogSearchResult();
dialogSearchResult.date = cursor.intValue(1);
dialogsResult.put(id, dialogSearchResult);
int lower_id = (int) id;
int high_id = (int) (id >> 32);
if (lower_id != 0 && high_id != 1) {
if (lower_id > 0) {
if (!usersToLoad.contains(lower_id)) {
usersToLoad.add(lower_id);
}
} else {
if (!chatsToLoad.contains(-lower_id)) {
chatsToLoad.add(-lower_id);
}
}
}
}
cursor.dispose();
if (!usersToLoad.isEmpty()) {
cursor = MessagesStorage.getInstance(currentAccount).getDatabase().queryFinalized(String.format(Locale.US, "SELECT data, status, name FROM users WHERE uid IN(%s)", TextUtils.join(",", usersToLoad)));
while (cursor.next()) {
String name = cursor.stringValue(2);
String tName = LocaleController.getInstance().getTranslitString(name);
if (name.equals(tName)) {
tName = null;
}
String username = null;
int usernamePos = name.lastIndexOf(";;;");
if (usernamePos != -1) {
username = name.substring(usernamePos + 3);
}
int found = 0;
for (String q : search) {
if (name.startsWith(q) || name.contains(" " + q) || tName != null && (tName.startsWith(q) || tName.contains(" " + q))) {
found = 1;
} else if (username != null && username.startsWith(q)) {
found = 2;
}
if (found != 0) {
NativeByteBuffer data = cursor.byteBufferValue(0);
if (data != null) {
TLRPC.User user = TLRPC.User.TLdeserialize(data, data.readInt32(false), false);
data.reuse();
DialogSearchResult dialogSearchResult = dialogsResult.get((long) user.id);
if (user.status != null) {
user.status.expires = cursor.intValue(1);
}
if (found == 1) {
dialogSearchResult.name = AndroidUtilities.generateSearchName(user.first_name, user.last_name, q);
} else {
dialogSearchResult.name = AndroidUtilities.generateSearchName("@" + user.username, null, "@" + q);
}
dialogSearchResult.object = user;
dialogSearchResult.dialog.id = user.id;
resultCount++;
}
break;
}
}
}
cursor.dispose();
}
if (!chatsToLoad.isEmpty()) {
cursor = MessagesStorage.getInstance(currentAccount).getDatabase().queryFinalized(String.format(Locale.US, "SELECT data, name FROM chats WHERE uid IN(%s)", TextUtils.join(",", chatsToLoad)));
while (cursor.next()) {
String name = cursor.stringValue(1);
String tName = LocaleController.getInstance().getTranslitString(name);
if (name.equals(tName)) {
tName = null;
}
for (int a = 0; a < search.length; a++) {
String q = search[a];
if (name.startsWith(q) || name.contains(" " + q) || tName != null && (tName.startsWith(q) || tName.contains(" " + q))) {
NativeByteBuffer data = cursor.byteBufferValue(0);
if (data != null) {
TLRPC.Chat chat = TLRPC.Chat.TLdeserialize(data, data.readInt32(false), false);
data.reuse();
if (!(chat == null || ChatObject.isNotInChat(chat) || ChatObject.isChannel(chat) && !chat.creator && (chat.admin_rights == null || !chat.admin_rights.post_messages) && !chat.megagroup)) {
DialogSearchResult dialogSearchResult = dialogsResult.get(-(long) chat.id);
dialogSearchResult.name = AndroidUtilities.generateSearchName(chat.title, null, q);
dialogSearchResult.object = chat;
dialogSearchResult.dialog.id = -chat.id;
resultCount++;
}
}
break;
}
}
}
cursor.dispose();
}
ArrayList<DialogSearchResult> searchResults = new ArrayList<>(resultCount);
for (int a = 0; a < dialogsResult.size(); a++) {
DialogSearchResult dialogSearchResult = dialogsResult.valueAt(a);
if (dialogSearchResult.object != null && dialogSearchResult.name != null) {
searchResults.add(dialogSearchResult);
}
}
cursor = MessagesStorage.getInstance(currentAccount).getDatabase().queryFinalized("SELECT u.data, u.status, u.name, u.uid FROM users as u INNER JOIN contacts as c ON u.uid = c.uid");
while (cursor.next()) {
int uid = cursor.intValue(3);
if (dialogsResult.indexOfKey((long) uid) >= 0) {
continue;
}
String name = cursor.stringValue(2);
String tName = LocaleController.getInstance().getTranslitString(name);
if (name.equals(tName)) {
@ -824,74 +717,153 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi
if (data != null) {
TLRPC.User user = TLRPC.User.TLdeserialize(data, data.readInt32(false), false);
data.reuse();
DialogSearchResult dialogSearchResult = new DialogSearchResult();
DialogSearchResult dialogSearchResult = dialogsResult.get((long) user.id);
if (user.status != null) {
user.status.expires = cursor.intValue(1);
}
dialogSearchResult.dialog.id = user.id;
dialogSearchResult.object = user;
if (found == 1) {
dialogSearchResult.name = AndroidUtilities.generateSearchName(user.first_name, user.last_name, q);
} else {
dialogSearchResult.name = AndroidUtilities.generateSearchName("@" + user.username, null, "@" + q);
}
searchResults.add(dialogSearchResult);
dialogSearchResult.object = user;
dialogSearchResult.dialog.id = user.id;
resultCount++;
}
break;
}
}
}
cursor.dispose();
Collections.sort(searchResults, new Comparator<DialogSearchResult>() {
@Override
public int compare(DialogSearchResult lhs, DialogSearchResult rhs) {
if (lhs.date < rhs.date) {
return 1;
} else if (lhs.date > rhs.date) {
return -1;
}
return 0;
}
});
updateSearchResults(searchResults, searchId);
} catch (Exception e) {
FileLog.e(e);
}
if (!chatsToLoad.isEmpty()) {
cursor = MessagesStorage.getInstance(currentAccount).getDatabase().queryFinalized(String.format(Locale.US, "SELECT data, name FROM chats WHERE uid IN(%s)", TextUtils.join(",", chatsToLoad)));
while (cursor.next()) {
String name = cursor.stringValue(1);
String tName = LocaleController.getInstance().getTranslitString(name);
if (name.equals(tName)) {
tName = null;
}
for (int a = 0; a < search.length; a++) {
String q = search[a];
if (name.startsWith(q) || name.contains(" " + q) || tName != null && (tName.startsWith(q) || tName.contains(" " + q))) {
NativeByteBuffer data = cursor.byteBufferValue(0);
if (data != null) {
TLRPC.Chat chat = TLRPC.Chat.TLdeserialize(data, data.readInt32(false), false);
data.reuse();
if (!(chat == null || ChatObject.isNotInChat(chat) || ChatObject.isChannel(chat) && !chat.creator && (chat.admin_rights == null || !chat.admin_rights.post_messages) && !chat.megagroup)) {
DialogSearchResult dialogSearchResult = dialogsResult.get(-(long) chat.id);
dialogSearchResult.name = AndroidUtilities.generateSearchName(chat.title, null, q);
dialogSearchResult.object = chat;
dialogSearchResult.dialog.id = -chat.id;
resultCount++;
}
}
break;
}
}
}
cursor.dispose();
}
ArrayList<DialogSearchResult> searchResults = new ArrayList<>(resultCount);
for (int a = 0; a < dialogsResult.size(); a++) {
DialogSearchResult dialogSearchResult = dialogsResult.valueAt(a);
if (dialogSearchResult.object != null && dialogSearchResult.name != null) {
searchResults.add(dialogSearchResult);
}
}
cursor = MessagesStorage.getInstance(currentAccount).getDatabase().queryFinalized("SELECT u.data, u.status, u.name, u.uid FROM users as u INNER JOIN contacts as c ON u.uid = c.uid");
while (cursor.next()) {
int uid = cursor.intValue(3);
if (dialogsResult.indexOfKey((long) uid) >= 0) {
continue;
}
String name = cursor.stringValue(2);
String tName = LocaleController.getInstance().getTranslitString(name);
if (name.equals(tName)) {
tName = null;
}
String username = null;
int usernamePos = name.lastIndexOf(";;;");
if (usernamePos != -1) {
username = name.substring(usernamePos + 3);
}
int found = 0;
for (String q : search) {
if (name.startsWith(q) || name.contains(" " + q) || tName != null && (tName.startsWith(q) || tName.contains(" " + q))) {
found = 1;
} else if (username != null && username.startsWith(q)) {
found = 2;
}
if (found != 0) {
NativeByteBuffer data = cursor.byteBufferValue(0);
if (data != null) {
TLRPC.User user = TLRPC.User.TLdeserialize(data, data.readInt32(false), false);
data.reuse();
DialogSearchResult dialogSearchResult = new DialogSearchResult();
if (user.status != null) {
user.status.expires = cursor.intValue(1);
}
dialogSearchResult.dialog.id = user.id;
dialogSearchResult.object = user;
if (found == 1) {
dialogSearchResult.name = AndroidUtilities.generateSearchName(user.first_name, user.last_name, q);
} else {
dialogSearchResult.name = AndroidUtilities.generateSearchName("@" + user.username, null, "@" + q);
}
searchResults.add(dialogSearchResult);
}
break;
}
}
}
cursor.dispose();
Collections.sort(searchResults, (lhs, rhs) -> {
if (lhs.date < rhs.date) {
return 1;
} else if (lhs.date > rhs.date) {
return -1;
}
return 0;
});
updateSearchResults(searchResults, searchId);
} catch (Exception e) {
FileLog.e(e);
}
});
}
private void updateSearchResults(final ArrayList<DialogSearchResult> result, final int searchId) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
if (searchId != lastSearchId) {
return;
}
for (int a = 0; a < result.size(); a++) {
DialogSearchResult obj = result.get(a);
if (obj.object instanceof TLRPC.User) {
TLRPC.User user = (TLRPC.User) obj.object;
MessagesController.getInstance(currentAccount).putUser(user, true);
} else if (obj.object instanceof TLRPC.Chat) {
TLRPC.Chat chat = (TLRPC.Chat) obj.object;
MessagesController.getInstance(currentAccount).putChat(chat, true);
}
}
boolean becomeEmpty = !searchResult.isEmpty() && result.isEmpty();
boolean isEmpty = searchResult.isEmpty() && result.isEmpty();
if (becomeEmpty) {
topBeforeSwitch = getCurrentTop();
}
searchResult = result;
notifyDataSetChanged();
if (!isEmpty && !becomeEmpty && topBeforeSwitch > 0) {
layoutManager.scrollToPositionWithOffset(0, -topBeforeSwitch);
topBeforeSwitch = -1000;
AndroidUtilities.runOnUIThread(() -> {
if (searchId != lastSearchId) {
return;
}
for (int a = 0; a < result.size(); a++) {
DialogSearchResult obj = result.get(a);
if (obj.object instanceof TLRPC.User) {
TLRPC.User user = (TLRPC.User) obj.object;
MessagesController.getInstance(currentAccount).putUser(user, true);
} else if (obj.object instanceof TLRPC.Chat) {
TLRPC.Chat chat = (TLRPC.Chat) obj.object;
MessagesController.getInstance(currentAccount).putChat(chat, true);
}
}
boolean becomeEmpty = !searchResult.isEmpty() && result.isEmpty();
boolean isEmpty = searchResult.isEmpty() && result.isEmpty();
if (becomeEmpty) {
topBeforeSwitch = getCurrentTop();
}
searchResult = result;
notifyDataSetChanged();
if (!isEmpty && !becomeEmpty && topBeforeSwitch > 0) {
layoutManager.scrollToPositionWithOffset(0, -topBeforeSwitch);
topBeforeSwitch = -1000;
}
});
}

View File

@ -34,6 +34,7 @@ public class SizeNotifierFrameLayout extends FrameLayout {
private float translationX;
private float translationY;
private float parallaxScale = 1.0f;
private boolean paused = true;
public interface SizeNotifierFrameLayoutDelegate {
void onSizeChanged(int keyboardHeight, boolean isWidthGreater);
@ -58,10 +59,13 @@ public class SizeNotifierFrameLayout extends FrameLayout {
parallaxScale = parallaxEffect.getScale(getMeasuredWidth(), getMeasuredHeight());
}
}
if (!paused) {
parallaxEffect.setEnabled(true);
}
} else if (parallaxEffect != null) {
parallaxEffect.setEnabled(false);
parallaxEffect = null;
parallaxScale = 0;
parallaxScale = 1.0f;
translationX = 0;
translationY = 0;
}
@ -84,12 +88,14 @@ public class SizeNotifierFrameLayout extends FrameLayout {
if (parallaxEffect != null) {
parallaxEffect.setEnabled(false);
}
paused = true;
}
public void onResume() {
if (parallaxEffect != null) {
parallaxEffect.setEnabled(true);
}
paused = false;
}
@Override

View File

@ -30,6 +30,8 @@ public class TermsOfServiceView extends FrameLayout {
private TextView textView;
private TermsOfServiceViewDelegate delegate;
private TLRPC.TL_help_termsOfService currentTos;
private TextView titleTextView;
private ScrollView scrollView;
private int currentAccount;
public interface TermsOfServiceViewDelegate {
@ -52,7 +54,7 @@ public class TermsOfServiceView extends FrameLayout {
imageView.setImageResource(R.drawable.logo_middle);
addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER_HORIZONTAL | Gravity.TOP, 0, 30 + top, 0, 0));
TextView titleTextView = new TextView(context);
titleTextView = new TextView(context);
titleTextView.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
titleTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 17);
titleTextView.setGravity(Gravity.LEFT | Gravity.TOP);
@ -60,7 +62,7 @@ public class TermsOfServiceView extends FrameLayout {
titleTextView.setText(LocaleController.getString("PrivacyPolicyAndTerms", R.string.PrivacyPolicyAndTerms));
addView(titleTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 27, 126 + top, 27, 75));
ScrollView scrollView = new ScrollView(context);
scrollView = new ScrollView(context);
AndroidUtilities.setScrollViewEdgeEffectColor(scrollView, Theme.getColor(Theme.key_actionBarDefault));
addView(scrollView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP, 27, 160 + top, 27, 75));
@ -173,6 +175,14 @@ public class TermsOfServiceView extends FrameLayout {
currentAccount = account;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
measureChildWithMargins(titleTextView, widthMeasureSpec, 0, heightMeasureSpec, 0);
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) scrollView.getLayoutParams();
layoutParams.topMargin = AndroidUtilities.dp(126 + 30) + titleTextView.getMeasuredHeight();
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
public void setDelegate(TermsOfServiceViewDelegate termsOfServiceViewDelegate) {
delegate = termsOfServiceViewDelegate;
}

View File

@ -192,7 +192,7 @@ public class ThemeEditorView {
linearLayout = new LinearLayout(context);
linearLayout.setOrientation(LinearLayout.HORIZONTAL);
addView(linearLayout, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER_HORIZONTAL | Gravity.TOP));
for (int a = 0; a < 4; a++){
for (int a = 0; a < 4; a++) {
colorEditText[a] = new EditTextBoldCursor(context);
colorEditText[a].setInputType(InputType.TYPE_CLASS_NUMBER);
colorEditText[a].setTextColor(0xff212121);

View File

@ -102,7 +102,7 @@ public class UndoView extends FrameLayout {
}
public void hide(boolean apply, boolean animated) {
if (getVisibility() != VISIBLE) {
if (getVisibility() != VISIBLE || currentActionRunnable == null) {
return;
}
if (currentActionRunnable != null) {
@ -159,6 +159,9 @@ public class UndoView extends FrameLayout {
infoTextView.setText(LocaleController.getString("ChatDeletedUndo", R.string.ChatDeletedUndo));
}
}
if (currentActionRunnable != null) {
currentActionRunnable.run();
}
currentActionRunnable = actionRunnable;
currentCancelRunnable = cancelRunnable;
currentDialogId = did;
@ -166,13 +169,15 @@ public class UndoView extends FrameLayout {
timeLeft = 5000;
lastUpdateTime = SystemClock.uptimeMillis();
MessagesController.getInstance(currentAccount).addDialogAction(did, clear);
setVisibility(VISIBLE);
setTranslationY(AndroidUtilities.dp(48));
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(ObjectAnimator.ofFloat(this, View.TRANSLATION_Y, AndroidUtilities.dp(48), 0));
animatorSet.setInterpolator(new DecelerateInterpolator());
animatorSet.setDuration(180);
animatorSet.start();
if (getVisibility() != VISIBLE) {
setVisibility(VISIBLE);
setTranslationY(AndroidUtilities.dp(48));
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(ObjectAnimator.ofFloat(this, View.TRANSLATION_Y, AndroidUtilities.dp(48), 0));
animatorSet.setInterpolator(new DecelerateInterpolator());
animatorSet.setDuration(180);
animatorSet.start();
}
}
@Override

View File

@ -65,8 +65,8 @@ public class WallpaperParallaxEffect implements SensorEventListener {
float z = event.values[2] / SensorManager.GRAVITY_EARTH;
float roll = (float) (Math.atan2(y, z) / Math.PI * 2.0);
float pitch = (float) (Math.atan2(-x, Math.sqrt(y * y + z * z)) / Math.PI * 2.0);
float pitch=(float)(Math.atan2(x, Math.sqrt(y*y+z*z))/Math.PI*2.0);
float roll=(float)(Math.atan2(y, Math.sqrt(x*x+z*z))/Math.PI*2.0);
switch (rotation) {
case Surface.ROTATION_0:

View File

@ -54,7 +54,6 @@ public class WallpaperUpdater {
parentActivity = activity;
parentFragment = fragment;
delegate = wallpaperUpdaterDelegate;
currentWallpaperPath = new File(FileLoader.getDirectory(FileLoader.MEDIA_DIR_CACHE), Utilities.random.nextInt() + ".jpg");
}
public void showAlert(final boolean fromTheme) {
@ -147,6 +146,7 @@ public class WallpaperUpdater {
if (!photos.isEmpty()) {
SendMessagesHelper.SendingMediaInfo info = photos.get(0);
if (info.path != null) {
currentWallpaperPath = new File(FileLoader.getDirectory(FileLoader.MEDIA_DIR_CACHE), Utilities.random.nextInt() + ".jpg");
Point screenSize = AndroidUtilities.getRealScreenSize();
Bitmap bitmap = ImageLoader.loadBitmap(info.path, null, screenSize.x, screenSize.y, true);
FileOutputStream stream = new FileOutputStream(currentWallpaperPath);
@ -160,11 +160,9 @@ public class WallpaperUpdater {
}
public void cleanup() {
currentWallpaperPath.delete();
}
public File getCurrentWallpaperPath() {
return currentWallpaperPath;
/*if (currentWallpaperPath != null) {
currentWallpaperPath.delete();
}*/
}
public String getCurrentPicturePath() {
@ -181,6 +179,7 @@ public class WallpaperUpdater {
AndroidUtilities.addMediaToGallery(currentPicturePath);
FileOutputStream stream = null;
try {
currentWallpaperPath = new File(FileLoader.getDirectory(FileLoader.MEDIA_DIR_CACHE), Utilities.random.nextInt() + ".jpg");
Point screenSize = AndroidUtilities.getRealScreenSize();
Bitmap bitmap = ImageLoader.loadBitmap(currentPicturePath, null, screenSize.x, screenSize.y, true);
stream = new FileOutputStream(currentWallpaperPath);
@ -203,6 +202,7 @@ public class WallpaperUpdater {
return;
}
try {
currentWallpaperPath = new File(FileLoader.getDirectory(FileLoader.MEDIA_DIR_CACHE), Utilities.random.nextInt() + ".jpg");
Point screenSize = AndroidUtilities.getRealScreenSize();
Bitmap bitmap = ImageLoader.loadBitmap(null, data.getData(), screenSize.x, screenSize.y, true);
FileOutputStream stream = new FileOutputStream(currentWallpaperPath);

View File

@ -146,7 +146,6 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.updateInterfaces);
NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.encryptedChatCreated);
NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.closeChats);
MessagesController.getGlobalNotificationsSettings().getBoolean("askAboutContacts", true);
checkPermission = UserConfig.getInstance(currentAccount).syncContacts;
if (arguments != null) {
onlyUsers = getArguments().getBoolean("onlyUsers", false);
@ -375,7 +374,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
if (row < 0 || section < 0) {
return;
}
if ((!onlyUsers || chat_id != 0) && section == 0) {
if ((!onlyUsers || chat_id != 0 && inviteViaLink) && section == 0) {
if (needPhonebook) {
if (row == 0) {
presentFragment(new InviteContactsActivity());
@ -671,7 +670,9 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
if (activity.shouldShowRequestPermissionRationale(Manifest.permission.READ_CONTACTS)) {
AlertDialog.Builder builder = AlertsCreator.createContactsPermissionDialog(activity, param -> {
askAboutContacts = param != 0;
MessagesController.getGlobalNotificationsSettings().edit().putBoolean("askAboutContacts", askAboutContacts).commit();
if (param == 0) {
return;
}
askForPermissons(false);
});
showDialog(permissionDialog = builder.create());
@ -703,7 +704,7 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
@Override
protected void onDialogDismiss(Dialog dialog) {
super.onDialogDismiss(dialog);
if (permissionDialog != null && dialog == permissionDialog && getParentActivity() != null) {
if (permissionDialog != null && dialog == permissionDialog && getParentActivity() != null && askAboutContacts) {
askForPermissons(false);
}
}
@ -717,7 +718,9 @@ public class ContactsActivity extends BaseFragment implements NotificationCenter
if (alert && askAboutContacts) {
AlertDialog.Builder builder = AlertsCreator.createContactsPermissionDialog(activity, param -> {
askAboutContacts = param != 0;
MessagesController.getGlobalNotificationsSettings().edit().putBoolean("askAboutContacts", askAboutContacts).commit();
if (param == 0) {
return;
}
askForPermissons(false);
});
showDialog(builder.create());

View File

@ -938,10 +938,11 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
TLRPC.Chat chat = isChat ? MessagesController.getInstance(currentAccount).getChat(-lower_id) : null;
if (lower_id == 0) {
TLRPC.EncryptedChat encryptedChat = MessagesController.getInstance(currentAccount).getEncryptedChat(high_id);
if (encryptedChat == null) {
return false;
if (encryptedChat != null) {
user = MessagesController.getInstance(currentAccount).getUser(encryptedChat.user_id);
} else {
user = new TLRPC.TL_userEmpty();
}
user = MessagesController.getInstance(currentAccount).getUser(encryptedChat.user_id);
} else {
user = !isChat && lower_id > 0 && high_id != 1 ? MessagesController.getInstance(currentAccount).getUser(lower_id) : null;
}
@ -1476,7 +1477,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
if (activity != null) {
checkPermission = false;
if (activity.checkSelfPermission(Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED || activity.checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
if (UserConfig.getInstance(currentAccount).syncContacts && activity.shouldShowRequestPermissionRationale(Manifest.permission.READ_CONTACTS)) {
if (askAboutContacts && UserConfig.getInstance(currentAccount).syncContacts && activity.shouldShowRequestPermissionRationale(Manifest.permission.READ_CONTACTS)) {
AlertDialog.Builder builder = AlertsCreator.createContactsPermissionDialog(activity, param -> {
askAboutContacts = param != 0;
MessagesController.getGlobalNotificationsSettings().edit().putBoolean("askAboutContacts", askAboutContacts).commit();
@ -1531,6 +1532,9 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
if (commentView != null) {
commentView.onResume();
}
if (undoView != null) {
undoView.hide(true, false);
}
}
@Override
@ -1758,7 +1762,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
@Override
protected void onDialogDismiss(Dialog dialog) {
super.onDialogDismiss(dialog);
if (permissionDialog != null && dialog == permissionDialog && getParentActivity() != null) {
if (permissionDialog != null && dialog == permissionDialog && getParentActivity() != null && askAboutContacts) {
askForPermissons(false);
}
}
@ -1948,6 +1952,10 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
return MessagesController.getInstance(currentAccount).dialogsGroupsOnly;
} else if (dialogsType == 3) {
return MessagesController.getInstance(currentAccount).dialogsForward;
} else if (dialogsType == 4) {
return MessagesController.getInstance(currentAccount).dialogsUsersOnly;
} else if (dialogsType == 5) {
return MessagesController.getInstance(currentAccount).dialogsChannelsOnly;
}
return null;
}

View File

@ -1040,7 +1040,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
String username = null;
String group = null;
String sticker = null;
String instantView[] = null;
HashMap<String, String> auth = null;
String unsupportedUrl = null;
String botUser = null;
@ -1051,8 +1050,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
String phoneHash = null;
String lang = null;
String code = null;
String wallpaper = null;
int wallpaperModes = 0;
TLRPC.TL_wallPaper wallPaper = null;
Integer messageId = null;
boolean hasUrl = false;
String scheme = data.getScheme();
@ -1064,20 +1062,40 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
if (path != null && path.length() > 1) {
path = path.substring(1);
if (path.startsWith("bg/")) {
wallpaper = path.replace("bg/", "");
String mode = data.getQueryParameter("mode");
if (mode != null) {
mode = mode.toLowerCase();
String[] modes = mode.split(" ");
if (modes != null && modes.length > 0) {
for (int a = 0; a < modes.length; a++) {
if ("blur".equals(modes[a])) {
wallpaperModes |= 1;
} else if ("motion".equals(modes[a])) {
wallpaperModes |= 2;
wallPaper = new TLRPC.TL_wallPaper();
wallPaper.settings = new TLRPC.TL_wallPaperSettings();
wallPaper.slug = path.replace("bg/", "");
if (wallPaper.slug != null && wallPaper.slug.length() == 6) {
try {
wallPaper.settings.background_color = Integer.parseInt(wallPaper.slug, 16) | 0xff000000;
} catch (Exception ignore) {
}
wallPaper.slug = null;
} else {
String mode = data.getQueryParameter("mode");
if (mode != null) {
mode = mode.toLowerCase();
String[] modes = mode.split(" ");
if (modes != null && modes.length > 0) {
for (int a = 0; a < modes.length; a++) {
if ("blur".equals(modes[a])) {
wallPaper.settings.blur = true;
} else if ("motion".equals(modes[a])) {
wallPaper.settings.motion = true;
}
}
}
}
wallPaper.settings.intensity = Utilities.parseInt(data.getQueryParameter("intensity"));
try {
String bgColor = data.getQueryParameter("bg_color");
if (!TextUtils.isEmpty(bgColor)) {
wallPaper.settings.background_color = Integer.parseInt(bgColor, 16) | 0xff000000;
}
} catch (Exception ignore) {
}
}
} else if (path.startsWith("login/")) {
code = path.replace("login/", "");
@ -1085,12 +1103,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
group = path.replace("joinchat/", "");
} else if (path.startsWith("addstickers/")) {
sticker = path.replace("addstickers/", "");
} else if (path.startsWith("iv/")) {
instantView[0] = data.getQueryParameter("url");
instantView[1] = data.getQueryParameter("rhash");
if (TextUtils.isEmpty(instantView[0]) || TextUtils.isEmpty(instantView[1])) {
instantView = null;
}
} else if (path.startsWith("msg/") || path.startsWith("share/")) {
message = data.getQueryParameter("url");
if (message == null) {
@ -1162,20 +1174,43 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
} else if (url.startsWith("tg:bg") || url.startsWith("tg://bg")) {
url = url.replace("tg:bg", "tg://telegram.org").replace("tg://bg", "tg://telegram.org");
data = Uri.parse(url);
wallpaper = data.getQueryParameter("slug");
String mode = data.getQueryParameter("mode");
if (mode != null) {
mode = mode.toLowerCase();
String[] modes = mode.split(" ");
if (modes != null && modes.length > 0) {
for (int a = 0; a < modes.length; a++) {
if ("blur".equals(modes[a])) {
wallpaperModes |= 1;
} else if ("motion".equals(modes[a])) {
wallpaperModes |= 2;
wallPaper = new TLRPC.TL_wallPaper();
wallPaper.settings = new TLRPC.TL_wallPaperSettings();
wallPaper.slug = data.getQueryParameter("slug");
if (wallPaper.slug == null) {
wallPaper.slug = data.getQueryParameter("color");
}
if (wallPaper.slug != null && wallPaper.slug.length() == 6) {
try {
wallPaper.settings.background_color = Integer.parseInt(wallPaper.slug, 16) | 0xff000000;
} catch (Exception ignore) {
}
wallPaper.slug = null;
} else {
String mode = data.getQueryParameter("mode");
if (mode != null) {
mode = mode.toLowerCase();
String[] modes = mode.split(" ");
if (modes != null && modes.length > 0) {
for (int a = 0; a < modes.length; a++) {
if ("blur".equals(modes[a])) {
wallPaper.settings.blur = true;
} else if ("motion".equals(modes[a])) {
wallPaper.settings.motion = true;
}
}
}
}
wallPaper.settings.intensity = Utilities.parseInt(data.getQueryParameter("intensity"));
try {
String bgColor = data.getQueryParameter("bg_color");
if (!TextUtils.isEmpty(bgColor)) {
wallPaper.settings.background_color = Integer.parseInt(bgColor, 16) | 0xff000000;
}
} catch (Exception ignore) {
}
}
} else if (url.startsWith("tg:join") || url.startsWith("tg://join")) {
url = url.replace("tg:join", "tg://telegram.org").replace("tg://join", "tg://telegram.org");
@ -1273,11 +1308,11 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
args.putString("phone", phone);
args.putString("hash", phoneHash);
AndroidUtilities.runOnUIThread(() -> presentFragment(new CancelAccountDeletionActivity(args)));
} else if (username != null || group != null || sticker != null || message != null || game != null || instantView != null || auth != null || unsupportedUrl != null || lang != null || code != null || wallpaper != null) {
} else if (username != null || group != null || sticker != null || message != null || game != null || auth != null || unsupportedUrl != null || lang != null || code != null || wallPaper != null) {
if (message != null && message.startsWith("@")) {
message = " " + message;
}
runLinkRequest(intentAccount[0], username, group, sticker, botUser, botChat, message, hasUrl, messageId, game, instantView, auth, lang, unsupportedUrl, code, wallpaper, wallpaperModes, 0);
runLinkRequest(intentAccount[0], username, group, sticker, botUser, botChat, message, hasUrl, messageId, game, auth, lang, unsupportedUrl, code, wallPaper, 0);
} else {
try (Cursor cursor = getContentResolver().query(intent.getData(), null, null, null, null)) {
if (cursor != null) {
@ -1518,20 +1553,18 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
final boolean hasUrl,
final Integer messageId,
final String game,
final String[] instantView,
final HashMap<String, String> auth,
final String lang,
final String unsupportedUrl,
final String code,
final String wallpaper,
final int wallpaperModes,
final TLRPC.TL_wallPaper wallPaper,
final int state) {
if (state == 0 && UserConfig.getActivatedAccountsCount() >= 2 && auth != null) {
AlertsCreator.createAccountSelectDialog(this, account -> {
if (account != intentAccount) {
switchToAccount(account, true);
}
runLinkRequest(account, username, group, sticker, botUser, botChat, message, hasUrl, messageId, game, instantView, auth, lang, unsupportedUrl, code, wallpaper, wallpaperModes, 1);
runLinkRequest(account, username, group, sticker, botUser, botChat, message, hasUrl, messageId, game, auth, lang, unsupportedUrl, code, wallPaper, 1);
}).show();
return;
} else if (code != null) {
@ -1720,7 +1753,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
AlertDialog.Builder builder = new AlertDialog.Builder(LaunchActivity.this);
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
builder.setMessage(LocaleController.formatString("ChannelJoinTo", R.string.ChannelJoinTo, invite.chat != null ? invite.chat.title : invite.title));
builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), (dialogInterface, i) -> runLinkRequest(intentAccount, username, group, sticker, botUser, botChat, message, hasUrl, messageId, game, instantView, auth, lang, unsupportedUrl, code, wallpaper, wallpaperModes, 1));
builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), (dialogInterface, i) -> runLinkRequest(intentAccount, username, group, sticker, botUser, botChat, message, hasUrl, messageId, game, auth, lang, unsupportedUrl, code, wallPaper, 1));
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showAlertDialog(builder);
}
@ -1827,8 +1860,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
}
});
presentFragment(fragment, false, true);
} else if (instantView != null) {
} else if (auth != null) {
final int bot_id = Utilities.parseInt(auth.get("bot_id"));
if (bot_id == 0) {
@ -1908,25 +1939,47 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
}
}
}));
} else if (wallpaper != null) {
TLRPC.TL_account_getWallPaper req = new TLRPC.TL_account_getWallPaper();
TLRPC.TL_inputWallPaperSlug inputWallPaperSlug = new TLRPC.TL_inputWallPaperSlug();
inputWallPaperSlug.slug = wallpaper;
req.wallpaper = inputWallPaperSlug;
requestId[0] = ConnectionsManager.getInstance(currentAccount).sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> {
} else if (wallPaper != null) {
boolean ok = false;
if (TextUtils.isEmpty(wallPaper.slug)) {
try {
progressDialog.dismiss();
WallpapersListActivity.ColorWallpaper colorWallpaper = new WallpapersListActivity.ColorWallpaper(-100, wallPaper.settings.background_color);
WallpaperActivity wallpaperActivity = new WallpaperActivity(colorWallpaper, null);
AndroidUtilities.runOnUIThread(() -> presentFragment(wallpaperActivity));
ok = true;
} catch (Exception e) {
FileLog.e(e);
}
if (response instanceof TLRPC.TL_wallPaper) {
WallpaperActivity wallpaperActivity = new WallpaperActivity(response, null);
wallpaperActivity.setInitialModes(wallpaperModes);
presentFragment(wallpaperActivity);
} else {
showAlertDialog(AlertsCreator.createSimpleAlert(LaunchActivity.this, LocaleController.getString("ErrorOccurred", R.string.ErrorOccurred) + "\n" + error.text));
}
}));
}
if (!ok) {
TLRPC.TL_account_getWallPaper req = new TLRPC.TL_account_getWallPaper();
TLRPC.TL_inputWallPaperSlug inputWallPaperSlug = new TLRPC.TL_inputWallPaperSlug();
inputWallPaperSlug.slug = wallPaper.slug;
req.wallpaper = inputWallPaperSlug;
requestId[0] = ConnectionsManager.getInstance(currentAccount).sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> {
try {
progressDialog.dismiss();
} catch (Exception e) {
FileLog.e(e);
}
if (response instanceof TLRPC.TL_wallPaper) {
TLRPC.TL_wallPaper res = (TLRPC.TL_wallPaper) response;
Object object;
if (wallPaper.settings.background_color != 0) {
WallpapersListActivity.ColorWallpaper colorWallpaper = new WallpapersListActivity.ColorWallpaper(-1, wallPaper.settings.background_color, res.id, wallPaper.settings.intensity / 100.0f, wallPaper.settings.motion, null);
colorWallpaper.pattern = res;
object = colorWallpaper;
} else {
object = res;
}
WallpaperActivity wallpaperActivity = new WallpaperActivity(object, null);
wallpaperActivity.setInitialModes(wallPaper.settings.blur, wallPaper.settings.motion);
presentFragment(wallpaperActivity);
} else {
showAlertDialog(AlertsCreator.createSimpleAlert(LaunchActivity.this, LocaleController.getString("ErrorOccurred", R.string.ErrorOccurred) + "\n" + error.text));
}
}));
}
}
if (requestId[0] != 0) {
@ -2587,10 +2640,11 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
}
} else if (id == NotificationCenter.needSetDayNightTheme) {
Theme.ThemeInfo theme = (Theme.ThemeInfo) args[0];
actionBarLayout.animateThemedValues(theme);
boolean nigthTheme = (Boolean) args[1];
actionBarLayout.animateThemedValues(theme, nigthTheme);
if (AndroidUtilities.isTablet()) {
layersActionBarLayout.animateThemedValues(theme);
rightActionBarLayout.animateThemedValues(theme);
layersActionBarLayout.animateThemedValues(theme, nigthTheme);
rightActionBarLayout.animateThemedValues(theme, nigthTheme);
}
} else if (id == NotificationCenter.notificationsCountUpdated) {
if (sideMenu != null) {

View File

@ -110,9 +110,6 @@ import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
//SmsManager mgr = SmsManager.getDefault();
//String token = mgr.createAppSpecificSmsToken(PendingIntent.getBroadcast(ApplicationLoader.applicationContext, 0, new Intent("SMS_RECEIVED"), PendingIntent.FLAG_UPDATE_CURRENT));
@SuppressLint("HardwareIds")
public class LoginActivity extends BaseFragment {
@ -205,7 +202,9 @@ public class LoginActivity extends BaseFragment {
views[currentViewNum].onNextPressed();
}
} else if (id == -1) {
onBackPressed();
if (onBackPressed()) {
finishFragment();
}
}
}
});

View File

@ -20,12 +20,12 @@ import android.net.Uri;
import android.os.Vibrator;
import android.telephony.TelephonyManager;
import android.text.Editable;
import android.text.InputFilter;
import android.text.InputType;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.AdapterView;
@ -337,9 +337,6 @@ public class NewContactActivity extends BaseFragment implements AdapterView.OnIt
codeField.setMaxLines(1);
codeField.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
codeField.setImeOptions(EditorInfo.IME_ACTION_NEXT | EditorInfo.IME_FLAG_NO_EXTRACT_UI);
InputFilter[] inputFilters = new InputFilter[1];
inputFilters[0] = new InputFilter.LengthFilter(5);
codeField.setFilters(inputFilters);
linearLayout2.addView(codeField, LayoutHelper.createLinear(55, 36, -9, 0, 16, 0));
codeField.addTextChangedListener(new TextWatcher() {
@Override
@ -521,6 +518,15 @@ public class NewContactActivity extends BaseFragment implements AdapterView.OnIt
}
return false;
});
phoneField.setOnKeyListener((v, keyCode, event) -> {
if (keyCode == KeyEvent.KEYCODE_DEL && phoneField.length() == 0) {
codeField.requestFocus();
codeField.setSelection(codeField.length());
codeField.dispatchKeyEvent(event);
return true;
}
return false;
});
HashMap<String, String> languageMap = new HashMap<>();
try {

View File

@ -20,6 +20,7 @@ import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.view.View;
import android.view.ViewGroup;
@ -46,11 +47,12 @@ import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.ActionBar.ThemeDescription;
import org.telegram.ui.Cells.HeaderCell;
import org.telegram.ui.Cells.NotificationsCheckCell;
import org.telegram.ui.Cells.ProfileSearchCell;
import org.telegram.ui.Cells.ShadowSectionCell;
import org.telegram.ui.Cells.TextCell;
import org.telegram.ui.Cells.TextCheckCell;
import org.telegram.ui.Cells.TextColorCell;
import org.telegram.ui.Cells.TextSettingsCell;
import org.telegram.ui.Cells.UserCell;
import org.telegram.ui.Components.AlertsCreator;
import org.telegram.ui.Components.EmptyTextProgressView;
import org.telegram.ui.Components.LayoutHelper;
@ -83,7 +85,7 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
private int messagePopupNotificationRow;
private int messagePriorityRow;
private int groupSection2Row;
private int exceptionsSectionRow;
private int exceptionsAddRow;
private int exceptionsStartRow;
private int exceptionsEndRow;
private int exceptionsSection2Row;
@ -213,14 +215,11 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
}
}
arrayList.remove(exception);
if (arrayList.isEmpty() && arrayList == exceptions) {
listView.getAdapter().notifyItemRemoved(exceptionsSection2Row);
listView.getAdapter().notifyItemChanged(groupSection2Row);
if (exceptionsAddRow != -1 && arrayList.isEmpty() && arrayList == exceptions) {
listView.getAdapter().notifyItemChanged(exceptionsAddRow);
}
listView.getAdapter().notifyItemRemoved(position);
if (arrayList.isEmpty() && arrayList == exceptions) {
listView.getAdapter().notifyItemRemoved(exceptionsSectionRow);
}
updateRows();
checkRowsEnabled();
} else {
@ -238,7 +237,30 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
});
return;
}
if (position == alertRow) {
if (position == exceptionsAddRow) {
Bundle args = new Bundle();
args.putBoolean("onlySelect", true);
if (currentType == NotificationsController.TYPE_GROUP) {
args.putInt("dialogsType", 2);
} else if (currentType == NotificationsController.TYPE_CHANNEL) {
args.putInt("dialogsType", 5);
} else {
args.putInt("dialogsType", 4);
}
DialogsActivity activity = new DialogsActivity(args);
activity.setDelegate((fragment, dids, message, param) -> {
Bundle args2 = new Bundle();
args2.putLong("dialog_id", dids.get(0));
args2.putBoolean("exception", true);
ProfileNotificationsActivity profileNotificationsActivity = new ProfileNotificationsActivity(args2);
profileNotificationsActivity.setDelegate(exception -> {
exceptions.add(0, exception);
updateRows();
});
presentFragment(profileNotificationsActivity, true);
});
presentFragment(activity);
} else if (position == alertRow) {
enabled = NotificationsController.getInstance(currentAccount).isGlobalNotificationsEnabled(currentType);
NotificationsCheckCell checkCell = (NotificationsCheckCell) view;
@ -481,6 +503,7 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
messagePriorityRow = -1;
}
groupSection2Row = rowCount++;
exceptionsAddRow = rowCount++;
} else {
alertRow = -1;
alertSection2Row = -1;
@ -492,21 +515,19 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
messageSoundRow = -1;
messagePriorityRow = -1;
groupSection2Row = -1;
exceptionsAddRow = -1;
}
if (exceptions != null && !exceptions.isEmpty()) {
if (currentType != -1) {
exceptionsSectionRow = rowCount++;
} else {
exceptionsSectionRow = -1;
}
exceptionsStartRow = rowCount;
rowCount += exceptions.size();
exceptionsEndRow = rowCount;
exceptionsSection2Row = rowCount++;
} else {
exceptionsSectionRow = -1;
exceptionsStartRow = -1;
exceptionsEndRow = -1;
}
if (currentType != -1 || exceptions != null && !exceptions.isEmpty()) {
exceptionsSection2Row = rowCount++;
} else {
exceptionsSection2Row = -1;
}
}
@ -725,7 +746,7 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = new ProfileSearchCell(mContext);
View view = new UserCell(mContext, 9, 0, false);
view.setPadding(AndroidUtilities.dp(6), 0, AndroidUtilities.dp(6), 0);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
return new RecyclerListView.Holder(view);
@ -733,8 +754,8 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
ProfileSearchCell cell = (ProfileSearchCell) holder.itemView;
cell.setException(searchResult.get(position), searchResultNames.get(position));
UserCell cell = (UserCell) holder.itemView;
cell.setException(searchResult.get(position), searchResultNames.get(position), position != searchResult.size() - 1);
}
@Override
@ -775,8 +796,7 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 2:
view = new ProfileSearchCell(mContext);
view.setPadding(AndroidUtilities.dp(6), 0, AndroidUtilities.dp(6), 0);
view = new UserCell(mContext, 6, 0, false);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 3:
@ -791,10 +811,14 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 6:
default:
view = new NotificationsCheckCell(mContext);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 7:
default:
view = new TextCell(mContext);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
}
return new RecyclerListView.Holder(view);
}
@ -806,8 +830,6 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
HeaderCell headerCell = (HeaderCell) holder.itemView;
if (position == messageSectionRow) {
headerCell.setText(LocaleController.getString("SETTINGS", R.string.SETTINGS));
} else if (position == exceptionsSectionRow) {
headerCell.setText(LocaleController.getString("NotificationsExceptions", R.string.NotificationsExceptions));
}
break;
}
@ -828,9 +850,9 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
break;
}
case 2: {
ProfileSearchCell cell = (ProfileSearchCell) holder.itemView;
UserCell cell = (UserCell) holder.itemView;
NotificationsSettingsActivity.NotificationException exception = exceptions.get(position - exceptionsStartRow);
cell.setException(exception, null);
cell.setException(exception, null, position != exceptionsEndRow - 1);
break;
}
case 3: {
@ -972,6 +994,14 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
checkCell.setTextAndValueAndCheck(text, builder, enabled, iconType, false);
break;
}
case 7: {
TextCell textCell = (TextCell) holder.itemView;
textCell.setColors(Theme.key_windowBackgroundWhiteBlueIcon, Theme.key_windowBackgroundWhiteBlueButton);
if (position == exceptionsAddRow) {
textCell.setTextAndIcon(LocaleController.getString("NotificationsAddAnException", R.string.NotificationsAddAnException), R.drawable.actions_addmember2, exceptionsStartRow != -1);
}
break;
}
}
}
@ -1011,7 +1041,7 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
@Override
public int getItemViewType(int position) {
if (position == messageSectionRow || position == exceptionsSectionRow) {
if (position == messageSectionRow) {
return 0;
} else if (position == previewRow) {
return 1;
@ -1023,6 +1053,8 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
return 4;
} else if (position == alertRow) {
return 6;
} else if (position == exceptionsAddRow) {
return 7;
} else {
return 5;
}
@ -1036,15 +1068,15 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
int count = listView.getChildCount();
for (int a = 0; a < count; a++) {
View child = listView.getChildAt(a);
if (child instanceof ProfileSearchCell) {
((ProfileSearchCell) child).update(0);
if (child instanceof UserCell) {
((UserCell) child).update(0);
}
}
}
};
return new ThemeDescription[]{
new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{HeaderCell.class, TextCheckCell.class, TextColorCell.class, TextSettingsCell.class, ProfileSearchCell.class, NotificationsCheckCell.class}, null, null, null, Theme.key_windowBackgroundWhite),
new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{HeaderCell.class, TextCheckCell.class, TextColorCell.class, TextSettingsCell.class, UserCell.class, NotificationsCheckCell.class}, null, null, null, Theme.key_windowBackgroundWhite),
new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundGray),
new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault),
@ -1064,11 +1096,18 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrack),
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrackChecked),
new ThemeDescription(listView, 0, new Class[]{ProfileSearchCell.class}, Theme.dialogs_namePaint, null, cellDelegate, Theme.key_chats_name),
new ThemeDescription(listView, 0, new Class[]{ProfileSearchCell.class}, Theme.dialogs_nameEncryptedPaint, null, cellDelegate, Theme.key_chats_secretName),
new ThemeDescription(listView, 0, new Class[]{ProfileSearchCell.class}, null, new Drawable[]{Theme.dialogs_lockDrawable}, cellDelegate, Theme.key_chats_secretIcon),
new ThemeDescription(listView, 0, new Class[]{ProfileSearchCell.class}, null, new Drawable[]{Theme.dialogs_groupDrawable, Theme.dialogs_broadcastDrawable, Theme.dialogs_botDrawable}, cellDelegate, Theme.key_chats_nameIcon),
new ThemeDescription(listView, 0, new Class[]{ProfileSearchCell.class}, Theme.dialogs_offlinePaint, null, cellDelegate, Theme.key_windowBackgroundWhiteGrayText3),
new ThemeDescription(listView, 0, new Class[]{UserCell.class}, new String[]{"imageView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayIcon),
new ThemeDescription(listView, 0, new Class[]{UserCell.class}, new String[]{"nameTextView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
new ThemeDescription(listView, 0, new Class[]{UserCell.class}, new String[]{"statusColor"}, null, null, cellDelegate, Theme.key_windowBackgroundWhiteGrayText),
new ThemeDescription(listView, 0, new Class[]{UserCell.class}, new String[]{"statusOnlineColor"}, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlueText),
new ThemeDescription(listView, 0, new Class[]{UserCell.class}, null, new Drawable[]{Theme.avatar_broadcastDrawable, Theme.avatar_savedDrawable}, null, Theme.key_avatar_text),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundRed),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundOrange),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundViolet),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundGreen),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundCyan),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundBlue),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundPink),
new ThemeDescription(listView, 0, new Class[]{NotificationsCheckCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
new ThemeDescription(listView, 0, new Class[]{NotificationsCheckCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2),
@ -1081,6 +1120,9 @@ public class NotificationsCustomSettingsActivity extends BaseFragment {
new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteValueText),
new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[]{ShadowSectionCell.class}, null, null, null, Theme.key_windowBackgroundGrayShadow),
new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[]{TextCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlueButton),
new ThemeDescription(listView, ThemeDescription.FLAG_CHECKTAG, new Class[]{TextCell.class}, new String[]{"imageView"}, null, null, null, Theme.key_windowBackgroundWhiteBlueIcon),
};
}
}

View File

@ -114,6 +114,57 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
@Override
public boolean onFragmentCreate() {
MessagesController.getInstance(currentAccount).loadSignUpNotificationsSettings();
loadExceptions();
notificationsSectionRow = rowCount++;
privateRow = rowCount++;
groupRow = rowCount++;
channelsRow = rowCount++;
notificationsSection2Row = rowCount++;
callsSectionRow = rowCount++;
callsVibrateRow = rowCount++;
callsRingtoneRow = rowCount++;
eventsSection2Row = rowCount++;
badgeNumberSection = rowCount++;
badgeNumberShowRow = rowCount++;
badgeNumberMutedRow = rowCount++;
badgeNumberMessagesRow = rowCount++;
badgeNumberSection2Row = rowCount++;
inappSectionRow = rowCount++;
inappSoundRow = rowCount++;
inappVibrateRow = rowCount++;
inappPreviewRow = rowCount++;
inchatSoundRow = rowCount++;
if (Build.VERSION.SDK_INT >= 21) {
inappPriorityRow = rowCount++;
} else {
inappPriorityRow = -1;
}
callsSection2Row = rowCount++;
eventsSectionRow = rowCount++;
contactJoinedRow = rowCount++;
pinnedMessageRow = rowCount++;
otherSection2Row = rowCount++;
otherSectionRow = rowCount++;
notificationsServiceRow = rowCount++;
notificationsServiceConnectionRow = rowCount++;
androidAutoAlertRow = -1;
repeatRow = rowCount++;
resetSection2Row = rowCount++;
resetSectionRow = rowCount++;
resetNotificationsRow = rowCount++;
NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.notificationsSettingsUpdated);
return super.onFragmentCreate();
}
private void loadExceptions() {
MessagesStorage.getInstance(currentAccount).getStorageQueue().postRunnable(() -> {
ArrayList<NotificationException> usersResult = new ArrayList<>();
ArrayList<NotificationException> chatsResult = new ArrayList<>();
@ -258,53 +309,6 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
adapter.notifyItemChanged(channelsRow);
});
});
notificationsSectionRow = rowCount++;
privateRow = rowCount++;
groupRow = rowCount++;
channelsRow = rowCount++;
notificationsSection2Row = rowCount++;
callsSectionRow = rowCount++;
callsVibrateRow = rowCount++;
callsRingtoneRow = rowCount++;
eventsSection2Row = rowCount++;
badgeNumberSection = rowCount++;
badgeNumberShowRow = rowCount++;
badgeNumberMutedRow = rowCount++;
badgeNumberMessagesRow = rowCount++;
badgeNumberSection2Row = rowCount++;
inappSectionRow = rowCount++;
inappSoundRow = rowCount++;
inappVibrateRow = rowCount++;
inappPreviewRow = rowCount++;
inchatSoundRow = rowCount++;
if (Build.VERSION.SDK_INT >= 21) {
inappPriorityRow = rowCount++;
} else {
inappPriorityRow = -1;
}
callsSection2Row = rowCount++;
eventsSectionRow = rowCount++;
contactJoinedRow = rowCount++;
pinnedMessageRow = rowCount++;
otherSection2Row = rowCount++;
otherSectionRow = rowCount++;
notificationsServiceRow = rowCount++;
notificationsServiceConnectionRow = rowCount++;
androidAutoAlertRow = -1;
repeatRow = rowCount++;
resetSection2Row = rowCount++;
resetSectionRow = rowCount++;
resetNotificationsRow = rowCount++;
NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.notificationsSettingsUpdated);
return super.onFragmentCreate();
}
@Override
@ -376,24 +380,22 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
try {
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
Intent tmpIntent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
tmpIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, position == callsRingtoneRow ? RingtoneManager.TYPE_RINGTONE : RingtoneManager.TYPE_NOTIFICATION);
tmpIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_RINGTONE);
tmpIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
tmpIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, RingtoneManager.getDefaultUri(position == callsRingtoneRow ? RingtoneManager.TYPE_RINGTONE : RingtoneManager.TYPE_NOTIFICATION));
tmpIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE));
Uri currentSound = null;
String defaultPath = null;
Uri defaultUri = position == callsRingtoneRow ? Settings.System.DEFAULT_RINGTONE_URI : Settings.System.DEFAULT_NOTIFICATION_URI;
Uri defaultUri = Settings.System.DEFAULT_RINGTONE_URI;
if (defaultUri != null) {
defaultPath = defaultUri.getPath();
}
if (position == callsRingtoneRow) {
String path = preferences.getString("CallsRingtonfePath", defaultPath);
if (path != null && !path.equals("NoSound")) {
if (path.equals(defaultPath)) {
currentSound = defaultUri;
} else {
currentSound = Uri.parse(path);
}
String path = preferences.getString("CallsRingtonePath", defaultPath);
if (path != null && !path.equals("NoSound")) {
if (path.equals(defaultPath)) {
currentSound = defaultUri;
} else {
currentSound = Uri.parse(path);
}
}
tmpIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, currentSound);

View File

@ -967,8 +967,8 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
return;
}
int addedCount = 0;
int oldCount = searchResult.size();
if (response != null) {
boolean added = false;
TLRPC.TL_messages_foundGifs res = (TLRPC.TL_messages_foundGifs) response;
nextGiphySearchOffset = res.next_offset;
for (int a = 0; a < res.results.size(); a++) {
@ -976,7 +976,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
if (searchResultKeys.containsKey(gif.url)) {
continue;
}
added = true;
MediaController.SearchImage bingImage = new MediaController.SearchImage();
bingImage.id = gif.url;
if (gif.document != null) {
@ -1009,11 +1008,11 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
addedCount++;
searchResultKeys.put(bingImage.id, bingImage);
}
giphySearchEndReached = !added;
giphySearchEndReached = oldCount == searchResult.size();
}
searching = false;
if (addedCount != 0) {
listAdapter.notifyItemRangeInserted(searchResult.size(), addedCount);
listAdapter.notifyItemRangeInserted(oldCount, addedCount);
} else if (giphySearchEndReached) {
listAdapter.notifyItemRemoved(searchResult.size() - 1);
}
@ -1097,10 +1096,10 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
return;
}
int addedCount = 0;
int oldCount = searchResult.size();
if (response != null) {
TLRPC.messages_BotResults res = (TLRPC.messages_BotResults) response;
nextImagesSearchOffset = res.next_offset;
boolean added = false;
for (int a = 0, count = res.results.size(); a < count; a++) {
TLRPC.BotInlineResult result = res.results.get(a);
@ -1111,7 +1110,6 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
continue;
}
added = true;
MediaController.SearchImage bingImage = new MediaController.SearchImage();
if (result.photo != null) {
TLRPC.PhotoSize size = FileLoader.getClosestPhotoSizeWithSize(result.photo.sizes, AndroidUtilities.getPhotoSize());
@ -1154,13 +1152,12 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen
searchResultKeys.put(bingImage.id, bingImage);
addedCount++;
added = true;
}
bingSearchEndReached = !added || nextImagesSearchOffset == null;
bingSearchEndReached = oldCount == searchResult.size() || nextImagesSearchOffset == null;
}
searching = false;
if (addedCount != 0) {
listAdapter.notifyItemRangeInserted(searchResult.size(), addedCount);
listAdapter.notifyItemRangeInserted(oldCount, addedCount);
} else if (bingSearchEndReached) {
listAdapter.notifyItemRemoved(searchResult.size() - 1);
}

View File

@ -5952,7 +5952,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
}
SecureDocument document = secureDocuments.get(index);
int imageSize = document.secureFile.size;
imageReceiver.setImage(document, null, "d", placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, null, null, imageSize, null, null, 0);
imageReceiver.setImage(document, "d", placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, null, null, imageSize, null, null, 0);
}
} else if (!imagesArrLocals.isEmpty()) {
if (index >= 0 && index < imagesArrLocals.size()) {
@ -6036,9 +6036,9 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
}
if (document != null) {
TLRPC.PhotoSize thumb = FileLoader.getClosestPhotoSizeWithSize(document.thumbs, 90);
imageReceiver.setImage(document, null, "d", placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, placeHolder == null ? thumb : null, String.format(Locale.US, "%d_%d", size, size), imageSize, null, object, cacheType);
imageReceiver.setImage(document, "d", placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, placeHolder == null ? thumb : null, String.format(Locale.US, "%d_%d", size, size), imageSize, null, object, cacheType);
} else if (photo != null) {
imageReceiver.setImage(photo, null, filter, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, null, String.format(Locale.US, "%d_%d", size, size), imageSize, null, object, cacheType);
imageReceiver.setImage(photo, filter, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, null, String.format(Locale.US, "%d_%d", size, size), imageSize, null, object, cacheType);
} else if (webDocument != null) {
imageReceiver.setImage(webDocument, filter, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : (isVideo && parentActivity != null ? parentActivity.getResources().getDrawable(R.drawable.nophotos) : null), null, object, cacheType);
} else {
@ -6065,7 +6065,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
placeHolder = currentThumb;
}
TLRPC.PhotoSize thumbLocation = FileLoader.getClosestPhotoSizeWithSize(messageObject.photoThumbs, 100);
imageReceiver.setImage(null, null, null, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, placeHolder == null ? thumbLocation : null, "b", 0, null, messageObject, 1);
imageReceiver.setImage(null, null, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, placeHolder == null ? thumbLocation : null, "b", 0, null, messageObject, 1);
} else {
imageReceiver.setImageBitmap(parentActivity.getResources().getDrawable(R.drawable.photoview_placeholder));
}
@ -6083,7 +6083,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
placeHolder = currentThumb;
}
TLRPC.PhotoSize thumbLocation = messageObject != null ? FileLoader.getClosestPhotoSizeWithSize(messageObject.photoThumbs, 100) : null;
imageReceiver.setImage(document, null, null, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, placeHolder == null ? thumbLocation : null, "b", document.size, null, messageObject, 0);
imageReceiver.setImage(document, null, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, placeHolder == null ? thumbLocation : null, "b", document.size, null, messageObject, 0);
} else {
OtherDocumentPlaceholderDrawable drawable = new OtherDocumentPlaceholderDrawable(parentActivity, containerView, messageObject);
imageReceiver.setImageBitmap(drawable);
@ -6108,7 +6108,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
thumbLocation = null;
}
boolean cacheOnly = messageObject != null && messageObject.isWebpage() || avatarsDialogId != 0 || isEvent;
imageReceiver.setImage(fileLocation, null, null, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, placeHolder == null ? thumbLocation : null, "b", size[0], null, messageObject, cacheOnly ? 1 : 0);
imageReceiver.setImage(fileLocation, null, placeHolder != null ? new BitmapDrawable(placeHolder.bitmap) : null, placeHolder == null ? thumbLocation : null, "b", size[0], null, messageObject, cacheOnly ? 1 : 0);
} else {
imageReceiver.setNeedsQualityThumb(true);
if (size[0] == 0) {

View File

@ -1045,6 +1045,10 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
nameTextView[a].setPivotX(0);
nameTextView[a].setPivotY(0);
nameTextView[a].setAlpha(a == 0 ? 0.0f : 1.0f);
if (a == 1) {
nameTextView[a].setScrollNonFitText(true);
nameTextView[a].setBackgroundColor(AvatarDrawable.getProfileBackColorForId(user_id != 0 || ChatObject.isChannel(chat_id, currentAccount) && !currentChat.megagroup ? 5 : chat_id));
}
frameLayout.addView(nameTextView[a], LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 118, 0, a == 0 ? 48 : 0, 0));
onlineTextView[a] = new SimpleTextView(context);
@ -2791,7 +2795,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
if (chat_id > 0) {
TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(chat_id);
if (ChatObject.isChannel(chat)) {
if (ChatObject.hasAdminRights(chat)) {
if (ChatObject.hasAdminRights(chat) || ChatObject.canChangeChatInfo(chat)) {
editItem = menu.addItem(edit_channel, R.drawable.group_edit_profile);
}
if (!chat.megagroup && chatInfo != null && chatInfo.can_view_stats) {
@ -3253,6 +3257,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
new ThemeDescription(topView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue),
new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_avatar_actionBarSelectorBlue),
new ThemeDescription(nameTextView[1], ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_profile_title),
new ThemeDescription(nameTextView[1], ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_avatar_backgroundActionBarBlue),
new ThemeDescription(onlineTextView[1], ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_avatar_subtitleInProfileBlue),
new ThemeDescription(listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector),

View File

@ -15,6 +15,7 @@ import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.drawable.Drawable;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
@ -35,23 +36,28 @@ import org.telegram.messenger.MessagesController;
import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessagesStorage;
import org.telegram.messenger.NotificationCenter;
import org.telegram.messenger.NotificationsController;
import org.telegram.messenger.R;
import org.telegram.messenger.support.widget.LinearLayoutManager;
import org.telegram.messenger.support.widget.RecyclerView;
import org.telegram.tgnet.TLObject;
import org.telegram.tgnet.TLRPC;
import org.telegram.ui.ActionBar.AlertDialog;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.ActionBar.ThemeDescription;
import org.telegram.ui.Cells.HeaderCell;
import org.telegram.ui.Cells.RadioCell;
import org.telegram.ui.Cells.ShadowSectionCell;
import org.telegram.ui.Cells.TextCheckBoxCell;
import org.telegram.ui.Cells.TextCheckCell;
import org.telegram.ui.Cells.TextColorCell;
import org.telegram.ui.ActionBar.ActionBar;
import org.telegram.ui.ActionBar.BaseFragment;
import org.telegram.ui.Cells.TextInfoPrivacyCell;
import org.telegram.ui.Cells.TextSettingsCell;
import org.telegram.ui.Cells2.UserCell;
import org.telegram.ui.Components.AlertsCreator;
import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.Components.RecyclerListView;
@ -66,12 +72,19 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
private long dialog_id;
private boolean addingException;
private boolean customEnabled;
private boolean notificationsEnabled;
private ProfileNotificationsActivityDelegate delegate;
private int customRow;
private int customInfoRow;
private int generalRow;
private int avatarRow;
private int avatarSectionRow;
private int enableRow;
private int soundRow;
private int vibrateRow;
private int smartRow;
@ -90,17 +103,38 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
private int ledInfoRow;
private int rowCount;
private final static int done_button = 1;
public interface ProfileNotificationsActivityDelegate {
void didCreateNewException(NotificationsSettingsActivity.NotificationException exception);
}
public ProfileNotificationsActivity(Bundle args) {
super(args);
dialog_id = args.getLong("dialog_id");
addingException = args.getBoolean("exception", false);
}
@Override
public boolean onFragmentCreate() {
rowCount = 0;
customRow = rowCount++;
customInfoRow = rowCount++;
if (addingException) {
avatarRow = rowCount++;
avatarSectionRow = rowCount++;
customRow = -1;
customInfoRow = -1;
} else {
avatarRow = -1;
avatarSectionRow = -1;
customRow = rowCount++;
customInfoRow = rowCount++;
}
generalRow = rowCount++;
if (addingException) {
enableRow = rowCount++;
} else {
enableRow = -1;
}
soundRow = rowCount++;
vibrateRow = rowCount++;
if ((int) dialog_id < 0) {
@ -151,7 +185,7 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
ledInfoRow = rowCount++;
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
customEnabled = preferences.getBoolean("custom_" + dialog_id, false);
customEnabled = preferences.getBoolean("custom_" + dialog_id, false) || addingException;
boolean hasOverride = preferences.contains("notify2_" + dialog_id);
int value = preferences.getInt("notify2_" + dialog_id, 0);
@ -183,19 +217,59 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
public View createView(final Context context) {
actionBar.setBackButtonImage(R.drawable.ic_ab_back);
actionBar.setAllowOverlayTitle(true);
actionBar.setTitle(LocaleController.getString("CustomNotifications", R.string.CustomNotifications));
actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() {
@Override
public void onItemClick(int id) {
if (id == -1) {
if (notificationsEnabled && customEnabled) {
if (!addingException && notificationsEnabled && customEnabled) {
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
preferences.edit().putInt("notify2_" + dialog_id, 0).commit();
}
finishFragment();
} else if (id == done_button) {
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean("custom_" + dialog_id, true);
TLRPC.TL_dialog dialog = MessagesController.getInstance(currentAccount).dialogs_dict.get(dialog_id);
if (notificationsEnabled) {
editor.putInt("notify2_" + dialog_id, 0);
MessagesStorage.getInstance(currentAccount).setDialogFlags(dialog_id, 0);
if (dialog != null) {
dialog.notify_settings = new TLRPC.TL_peerNotifySettings();
}
} else {
editor.putInt("notify2_" + dialog_id, 2);
NotificationsController.getInstance(currentAccount).removeNotificationsForDialog(dialog_id);
MessagesStorage.getInstance(currentAccount).setDialogFlags(dialog_id, 1);
if (dialog != null) {
dialog.notify_settings = new TLRPC.TL_peerNotifySettings();
dialog.notify_settings.mute_until = Integer.MAX_VALUE;
}
}
editor.commit();
NotificationsController.getInstance(currentAccount).updateServerNotificationsSettings(dialog_id);
if (delegate != null) {
NotificationsSettingsActivity.NotificationException exception = new NotificationsSettingsActivity.NotificationException();
exception.did = dialog_id;
exception.hasCustom = true;
exception.notify = preferences.getInt("notify2_" + dialog_id, 0);
if (exception.notify != 0) {
exception.muteUntil = preferences.getInt("notifyuntil_" + dialog_id, 0);
}
delegate.didCreateNewException(exception);
}
}
finishFragment();
}
});
if (addingException) {
actionBar.setTitle(LocaleController.getString("NotificationsNewException", R.string.NotificationsNewException));
actionBar.createMenu().addItemWithWidth(done_button, R.drawable.ic_done, AndroidUtilities.dp(56));
} else {
actionBar.setTitle(LocaleController.getString("CustomNotifications", R.string.CustomNotifications));
}
fragmentView = new FrameLayout(context);
FrameLayout frameLayout = (FrameLayout) fragmentView;
@ -335,6 +409,10 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
adapter.notifyItemChanged(vibrateRow);
}
}));
} else if (position == enableRow) {
TextCheckCell checkCell = (TextCheckCell) view;
notificationsEnabled = !checkCell.isChecked();
checkCell.setChecked(notificationsEnabled);
} else if (position == callsVibrateRow) {
showDialog(AlertsCreator.createVibrationSelectDialog(getParentActivity(), dialog_id, "calls_vibrate_", () -> {
if (adapter != null) {
@ -525,6 +603,10 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
}
}
public void setDelegate(ProfileNotificationsActivityDelegate profileNotificationsActivityDelegate) {
delegate = profileNotificationsActivityDelegate;
}
private class ListAdapter extends RecyclerView.Adapter {
private Context context;
@ -562,10 +644,21 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 5:
default:
view = new TextCheckBoxCell(context);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 6:
view = new UserCell(context, 4, 0);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 7:
view = new ShadowSectionCell(context);
break;
case 8:
default:
view = new TextCheckCell(context);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
}
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));
return new RecyclerListView.Holder(view);
@ -722,6 +815,26 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
cell.setTextAndCheck(LocaleController.getString("NotificationsEnableCustom", R.string.NotificationsEnableCustom), customEnabled && notificationsEnabled, false);
break;
}
case 6: {
UserCell userCell = (UserCell) holder.itemView;
int lower_id = (int) dialog_id;
TLObject object;
if (lower_id > 0) {
object = MessagesController.getInstance(currentAccount).getUser(lower_id);
} else {
object = MessagesController.getInstance(currentAccount).getChat(-lower_id);
}
userCell.setData(object, null, null, 0);
break;
}
case 8: {
TextCheckCell checkCell = (TextCheckCell) holder.itemView;
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
if (position == enableRow) {
checkCell.setTextAndCheck(LocaleController.getString("Notifications", R.string.Notifications), notificationsEnabled, true);
}
break;
}
}
}
@ -767,6 +880,12 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
return 4;
} else if (position == customRow) {
return 5;
} else if (position == avatarRow) {
return 6;
} else if (position == avatarSectionRow) {
return 7;
} else if (position == enableRow) {
return 8;
}
return 0;
}
@ -774,8 +893,20 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
@Override
public ThemeDescription[] getThemeDescriptions() {
ThemeDescription.ThemeDescriptionDelegate cellDelegate = () -> {
if (listView != null) {
int count = listView.getChildCount();
for (int a = 0; a < count; a++) {
View child = listView.getChildAt(a);
if (child instanceof UserCell) {
((UserCell) child).update(0);
}
}
}
};
return new ThemeDescription[]{
new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{HeaderCell.class, TextSettingsCell.class, TextColorCell.class, RadioCell.class, TextCheckBoxCell.class}, null, null, null, Theme.key_windowBackgroundWhite),
new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{HeaderCell.class, TextSettingsCell.class, TextColorCell.class, RadioCell.class, UserCell.class, TextCheckCell.class, TextCheckBoxCell.class}, null, null, null, Theme.key_windowBackgroundWhite),
new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundGray),
new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault),
@ -803,6 +934,25 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi
new ThemeDescription(listView, ThemeDescription.FLAG_CHECKBOX, new Class[]{RadioCell.class}, new String[]{"radioButton"}, null, null, null, Theme.key_radioBackground),
new ThemeDescription(listView, ThemeDescription.FLAG_CHECKBOXCHECK, new Class[]{RadioCell.class}, new String[]{"radioButton"}, null, null, null, Theme.key_radioBackgroundChecked),
new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[]{ShadowSectionCell.class}, null, null, null, Theme.key_windowBackgroundGrayShadow),
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2),
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrack),
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrackChecked),
new ThemeDescription(listView, 0, new Class[]{UserCell.class}, new String[]{"nameTextView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
new ThemeDescription(listView, 0, new Class[]{UserCell.class}, new String[]{"statusColor"}, null, null, cellDelegate, Theme.key_windowBackgroundWhiteGrayText),
new ThemeDescription(listView, 0, new Class[]{UserCell.class}, new String[]{"statusOnlineColor"}, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlueText),
new ThemeDescription(listView, 0, new Class[]{UserCell.class}, null, new Drawable[]{Theme.avatar_broadcastDrawable, Theme.avatar_savedDrawable}, null, Theme.key_avatar_text),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundRed),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundOrange),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundViolet),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundGreen),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundCyan),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundBlue),
new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundPink),
new ThemeDescription(listView, 0, new Class[]{TextCheckBoxCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
new ThemeDescription(listView, 0, new Class[]{TextCheckBoxCell.class}, null, null, null, Theme.key_checkboxSquareUnchecked),
new ThemeDescription(listView, 0, new Class[]{TextCheckBoxCell.class}, null, null, null, Theme.key_checkboxSquareDisabled),

View File

@ -356,7 +356,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
} else if (position == dataRow) {
presentFragment(new DataSettingsActivity());
} else if (position == chatRow) {
presentFragment(new ChatSettingsActivity());
presentFragment(new ThemeActivity(ThemeActivity.THEME_TYPE_BASIC));
} else if (position == helpRow) {
BottomSheet.Builder builder = new BottomSheet.Builder(context);
builder.setApplyTopPadding(false);

View File

@ -15,6 +15,12 @@ import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Shader;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.location.Address;
import android.location.Geocoder;
import android.location.Location;
@ -26,8 +32,10 @@ import android.os.Bundle;
import android.os.Vibrator;
import android.support.v4.content.FileProvider;
import android.text.InputType;
import android.text.TextPaint;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
@ -39,24 +47,33 @@ import android.widget.Toast;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.BuildConfig;
import org.telegram.messenger.DataQuery;
import org.telegram.messenger.FileLoader;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessageObject;
import org.telegram.messenger.MessagesController;
import org.telegram.messenger.NotificationCenter;
import org.telegram.messenger.R;
import org.telegram.messenger.SharedConfig;
import org.telegram.messenger.UserConfig;
import org.telegram.messenger.Utilities;
import org.telegram.messenger.support.widget.DefaultItemAnimator;
import org.telegram.messenger.support.widget.LinearLayoutManager;
import org.telegram.messenger.support.widget.RecyclerView;
import org.telegram.messenger.time.SunDate;
import org.telegram.tgnet.TLRPC;
import org.telegram.ui.ActionBar.ActionBar;
import org.telegram.ui.ActionBar.ActionBarMenu;
import org.telegram.ui.ActionBar.ActionBarMenuItem;
import org.telegram.ui.ActionBar.AlertDialog;
import org.telegram.ui.ActionBar.BaseFragment;
import org.telegram.ui.ActionBar.BottomSheet;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.ActionBar.ThemeDescription;
import org.telegram.ui.Cells.BrightnessControlCell;
import org.telegram.ui.Cells.ChatMessageCell;
import org.telegram.ui.Cells.CheckBoxCell;
import org.telegram.ui.Cells.HeaderCell;
import org.telegram.ui.Cells.ShadowSectionCell;
import org.telegram.ui.Cells.TextCheckCell;
@ -67,6 +84,7 @@ import org.telegram.ui.Cells.ThemeTypeCell;
import org.telegram.ui.Components.EditTextBoldCursor;
import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.Components.RecyclerListView;
import org.telegram.ui.Components.SeekBarView;
import org.telegram.ui.Components.ThemeEditorView;
import java.io.File;
@ -84,6 +102,25 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
private ListAdapter listAdapter;
private RecyclerListView listView;
private int backgroundRow;
private int textSizeHeaderRow;
private int textSizeRow;
private int settingsRow;
private int customTabsRow;
private int directShareRow;
private int raiseToSpeakRow;
private int sendByEnterRow;
private int autoplayGifsRow;
private int saveToGalleryRow;
private int enableAnimationsRow;
private int settings2Row;
private int stickersRow;
private int stickersSection2Row;
private int emojiRow;
private int contactsReimportRow;
private int contactsSortRow;
private int nightThemeRow;
private int nightDisabledRow;
private int nightScheduledRow;
@ -100,8 +137,8 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
private int automaticBrightnessRow;
private int automaticBrightnessInfoRow;
private int preferedHeaderRow;
private int newThemeRow;
private int newThemeInfoRow;
private int themeHeaderRow;
private int themeStartRow;
private int themeEndRow;
private int themeInfoRow;
@ -115,6 +152,8 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
private GpsLocationListener gpsLocationListener = new GpsLocationListener();
private GpsLocationListener networkLocationListener = new GpsLocationListener();
private final static int create_theme = 1;
private class GpsLocationListener implements LocationListener {
@Override
@ -142,6 +181,207 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
}
}
public interface SizeChooseViewDelegate {
void onSizeChanged();
}
private class TextSizeCell extends FrameLayout {
private LinearLayout messagesContainer;
private ChatMessageCell[] cells = new ChatMessageCell[2];
private SeekBarView sizeBar;
private Drawable shadowDrawable;
private int startFontSize = 12;
private int endFontSize = 30;
private int lastWidth;
private TextPaint textPaint;
public TextSizeCell(Context context) {
super(context);
setWillNotDraw(false);
textPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
textPaint.setTextSize(AndroidUtilities.dp(16));
shadowDrawable = Theme.getThemedDrawable(context, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow);
sizeBar = new SeekBarView(context);
sizeBar.setReportChanges(true);
sizeBar.setDelegate(progress -> {
int fontSize = Math.round(startFontSize + (endFontSize - startFontSize) * progress);
if (fontSize != SharedConfig.fontSize) {
SharedConfig.fontSize = fontSize;
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
SharedPreferences.Editor editor = preferences.edit();
editor.putInt("fons_size", SharedConfig.fontSize);
editor.commit();
Theme.chat_msgTextPaint.setTextSize(AndroidUtilities.dp(SharedConfig.fontSize));
for (int a = 0; a < cells.length; a++) {
cells[a].getMessageObject().resetLayout();
cells[a].requestLayout();
}
}
});
addView(sizeBar, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 38, Gravity.LEFT | Gravity.TOP, 9, 5, 43, 0));
messagesContainer = new LinearLayout(context) {
private Drawable backgroundDrawable;
@Override
protected void onDraw(Canvas canvas) {
Drawable newDrawable = Theme.getCachedWallpaperNonBlocking();
if (newDrawable != null) {
backgroundDrawable = newDrawable;
}
if (backgroundDrawable instanceof ColorDrawable) {
backgroundDrawable.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
backgroundDrawable.draw(canvas);
} else if (backgroundDrawable instanceof BitmapDrawable) {
BitmapDrawable bitmapDrawable = (BitmapDrawable) backgroundDrawable;
if (bitmapDrawable.getTileModeX() == Shader.TileMode.REPEAT) {
canvas.save();
float scale = 2.0f / AndroidUtilities.density;
canvas.scale(scale, scale);
backgroundDrawable.setBounds(0, 0, (int) Math.ceil(getMeasuredWidth() / scale), (int) Math.ceil(getMeasuredHeight() / scale));
backgroundDrawable.draw(canvas);
canvas.restore();
} else {
int viewHeight = getMeasuredHeight();
float scaleX = (float) getMeasuredWidth() / (float) backgroundDrawable.getIntrinsicWidth();
float scaleY = (float) (viewHeight) / (float) backgroundDrawable.getIntrinsicHeight();
float scale = scaleX < scaleY ? scaleY : scaleX;
int width = (int) Math.ceil(backgroundDrawable.getIntrinsicWidth() * scale);
int height = (int) Math.ceil(backgroundDrawable.getIntrinsicHeight() * scale);
int x = (getMeasuredWidth() - width) / 2;
int y = (viewHeight - height) / 2;
canvas.save();
canvas.clipRect(0, 0, width, getMeasuredHeight());
backgroundDrawable.setBounds(x, y, x + width, y + height);
backgroundDrawable.draw(canvas);
canvas.restore();
}
} else {
super.onDraw(canvas);
}
shadowDrawable.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
shadowDrawable.draw(canvas);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
return false;
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
return false;
}
@Override
protected void dispatchSetPressed(boolean pressed) {
}
@Override
public boolean onTouchEvent(MotionEvent event) {
return false;
}
};
messagesContainer.setOrientation(LinearLayout.VERTICAL);
messagesContainer.setWillNotDraw(false);
messagesContainer.setPadding(0, AndroidUtilities.dp(11), 0, AndroidUtilities.dp(11));
addView(messagesContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 0, 53, 0, 0));
int date = (int) (System.currentTimeMillis() / 1000) - 60 * 60;
TLRPC.Message message = new TLRPC.TL_message();
message.message = LocaleController.getString("FontSizePreviewReply", R.string.FontSizePreviewReply);
message.date = date + 60;
message.dialog_id = 1;
message.flags = 259;
message.from_id = UserConfig.getInstance(currentAccount).getClientUserId();
message.id = 1;
message.media = new TLRPC.TL_messageMediaEmpty();
message.out = true;
message.to_id = new TLRPC.TL_peerUser();
message.to_id.user_id = 0;
MessageObject replyMessageObject = new MessageObject(currentAccount, message, true);
message = new TLRPC.TL_message();
message.message = LocaleController.getString("FontSizePreviewLine2", R.string.FontSizePreviewLine2);
message.date = date + 960;
message.dialog_id = 1;
message.flags = 259;
message.from_id = UserConfig.getInstance(currentAccount).getClientUserId();
message.id = 1;
message.media = new TLRPC.TL_messageMediaEmpty();
message.out = true;
message.to_id = new TLRPC.TL_peerUser();
message.to_id.user_id = 0;
MessageObject message1 = new MessageObject(currentAccount, message, true);
message1.resetLayout();
message1.eventId = 1;
message = new TLRPC.TL_message();
message.message = LocaleController.getString("FontSizePreviewLine1", R.string.FontSizePreviewLine1);
message.date = date + 60;
message.dialog_id = 1;
message.flags = 257 + 8;
message.from_id = 0;
message.id = 1;
message.reply_to_msg_id = 5;
message.media = new TLRPC.TL_messageMediaEmpty();
message.out = false;
message.to_id = new TLRPC.TL_peerUser();
message.to_id.user_id = UserConfig.getInstance(currentAccount).getClientUserId();
MessageObject message2 = new MessageObject(currentAccount, message, true);
message2.customReplyName = "Lucio";
message2.eventId = 1;
message2.resetLayout();
message2.replyMessageObject = replyMessageObject;
for (int a = 0; a < cells.length; a++) {
cells[a] = new ChatMessageCell(context);
cells[a].setDelegate(new ChatMessageCell.ChatMessageCellDelegate() {
});
cells[a].isChat = false;
cells[a].setFullyDraw(true);
cells[a].setMessageObject(a == 0 ? message2 : message1, null, false, false);
messagesContainer.addView(cells[a], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
}
}
@Override
protected void onDraw(Canvas canvas) {
textPaint.setColor(Theme.getColor(Theme.key_windowBackgroundWhiteValueText));
canvas.drawText("" + SharedConfig.fontSize, getMeasuredWidth() - AndroidUtilities.dp(39), AndroidUtilities.dp(28), textPaint);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int w = MeasureSpec.getSize(widthMeasureSpec);
if (lastWidth != w) {
sizeBar.setProgress((SharedConfig.fontSize - startFontSize) / (float) (endFontSize - startFontSize));
lastWidth = w;
}
}
@Override
public void invalidate() {
super.invalidate();
messagesContainer.invalidate();
sizeBar.invalidate();
for (int a = 0; a < cells.length; a++) {
cells[a].invalidate();
}
}
}
private int currentType;
public ThemeActivity(int type) {
@ -154,6 +394,9 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
int oldRowCount = rowCount;
rowCount = 0;
emojiRow = -1;
contactsReimportRow = -1;
contactsSortRow = -1;
scheduleLocationRow = -1;
scheduleUpdateLocationRow = -1;
scheduleLocationInfoRow = -1;
@ -163,7 +406,6 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
nightTypeInfoRow = -1;
scheduleHeaderRow = -1;
nightThemeRow = -1;
newThemeRow = -1;
newThemeInfoRow = -1;
scheduleFromRow = -1;
scheduleToRow = -1;
@ -175,15 +417,46 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
automaticHeaderRow = -1;
automaticBrightnessRow = -1;
automaticBrightnessInfoRow = -1;
textSizeHeaderRow = -1;
themeHeaderRow = -1;
textSizeRow = -1;
backgroundRow = -1;
settingsRow = -1;
customTabsRow = -1;
directShareRow = -1;
enableAnimationsRow = -1;
raiseToSpeakRow = -1;
sendByEnterRow = -1;
autoplayGifsRow = -1;
saveToGalleryRow = -1;
settings2Row = -1;
stickersRow = -1;
stickersSection2Row = -1;
if (currentType == THEME_TYPE_BASIC) {
textSizeHeaderRow = rowCount++;
textSizeRow = rowCount++;
backgroundRow = rowCount++;
nightThemeRow = rowCount++;
newThemeRow = rowCount++;
newThemeInfoRow = rowCount++;
themeHeaderRow = rowCount++;
themeStartRow = rowCount;
rowCount += Theme.themes.size();
themeEndRow = rowCount;
themeInfoRow = rowCount++;
settingsRow = rowCount++;
customTabsRow = rowCount++;
directShareRow = rowCount++;
enableAnimationsRow = rowCount++;
raiseToSpeakRow = rowCount++;
sendByEnterRow = rowCount++;
autoplayGifsRow = rowCount++;
saveToGalleryRow = rowCount++;
settings2Row = rowCount++;
stickersRow = rowCount++;
stickersSection2Row = rowCount++;
} else {
nightDisabledRow = rowCount++;
nightScheduledRow = rowCount++;
@ -262,6 +535,7 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
@Override
public boolean onFragmentCreate() {
NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.locationPermissionGranted);
NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.didSetNewWallpapper);
return super.onFragmentCreate();
}
@ -270,6 +544,7 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
super.onFragmentDestroy();
stopLocationUpdate();
NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.locationPermissionGranted);
NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.didSetNewWallpapper);
Theme.saveAutoNightThemeConfig();
}
@ -277,6 +552,10 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
public void didReceivedNotification(int id, int account, Object... args) {
if (id == NotificationCenter.locationPermissionGranted) {
updateSunTime(null, true);
} else if (id == NotificationCenter.didSetNewWallpapper) {
if (listView != null) {
listView.invalidateViews();
}
}
}
@ -284,8 +563,14 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
public View createView(Context context) {
actionBar.setBackButtonImage(R.drawable.ic_ab_back);
actionBar.setAllowOverlayTitle(false);
if (AndroidUtilities.isTablet()) {
actionBar.setOccupyStatusBar(false);
}
if (currentType == THEME_TYPE_BASIC) {
actionBar.setTitle(LocaleController.getString("Theme", R.string.Theme));
actionBar.setTitle(LocaleController.getString("ChatSettings", R.string.ChatSettings));
ActionBarMenu menu = actionBar.createMenu();
ActionBarMenuItem item = menu.addItem(0, R.drawable.ic_ab_other);
item.addSubItem(create_theme, LocaleController.getString("CreateNewThemeMenu", R.string.CreateNewThemeMenu));
} else {
actionBar.setTitle(LocaleController.getString("AutoNightTheme", R.string.AutoNightTheme));
}
@ -295,6 +580,16 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
public void onItemClick(int id) {
if (id == -1) {
finishFragment();
} else if (id == create_theme) {
if (getParentActivity() == null) {
return;
}
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("NewTheme", R.string.NewTheme));
builder.setMessage(LocaleController.getString("CreateNewThemeAlert", R.string.CreateNewThemeAlert));
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
builder.setPositiveButton(LocaleController.getString("CreateTheme", R.string.CreateTheme), (dialog, which) -> openThemeCreate());
showDialog(builder.create());
}
}
});
@ -312,99 +607,149 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
((DefaultItemAnimator) listView.getItemAnimator()).setDelayAnimations(false);
frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
listView.setOnItemClickListener((view, position) -> {
if (position == newThemeRow) {
if (position == enableAnimationsRow) {
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
boolean animations = preferences.getBoolean("view_animations", true);
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean("view_animations", !animations);
editor.commit();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(!animations);
}
} else if (position == backgroundRow) {
presentFragment(new WallpapersListActivity(WallpapersListActivity.TYPE_ALL));
} else if (position == sendByEnterRow) {
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
boolean send = preferences.getBoolean("send_by_enter", false);
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean("send_by_enter", !send);
editor.commit();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(!send);
}
} else if (position == raiseToSpeakRow) {
SharedConfig.toogleRaiseToSpeak();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(SharedConfig.raiseToSpeak);
}
} else if (position == autoplayGifsRow) {
SharedConfig.toggleAutoplayGifs();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(SharedConfig.autoplayGifs);
}
} else if (position == saveToGalleryRow) {
SharedConfig.toggleSaveToGallery();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(SharedConfig.saveToGallery);
}
} else if (position == customTabsRow) {
SharedConfig.toggleCustomTabs();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(SharedConfig.customTabs);
}
} else if (position == directShareRow) {
SharedConfig.toggleDirectShare();
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(SharedConfig.directShare);
}
} else if (position == contactsReimportRow) {
//not implemented
} else if (position == contactsSortRow) {
if (getParentActivity() == null) {
return;
}
final EditTextBoldCursor editText = new EditTextBoldCursor(getParentActivity());
editText.setBackgroundDrawable(Theme.createEditTextDrawable(getParentActivity(), true));
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("NewTheme", R.string.NewTheme));
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), (dialog, which) -> {
builder.setTitle(LocaleController.getString("SortBy", R.string.SortBy));
builder.setItems(new CharSequence[]{
LocaleController.getString("Default", R.string.Default),
LocaleController.getString("SortFirstName", R.string.SortFirstName),
LocaleController.getString("SortLastName", R.string.SortLastName)
}, (dialog, which) -> {
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
SharedPreferences.Editor editor = preferences.edit();
editor.putInt("sortContactsBy", which);
editor.commit();
if (listAdapter != null) {
listAdapter.notifyItemChanged(position);
}
});
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
showDialog(builder.create());
} else if (position == stickersRow) {
presentFragment(new StickersActivity(DataQuery.TYPE_IMAGE));
} else if (position == emojiRow) {
if (getParentActivity() == null) {
return;
}
final boolean maskValues[] = new boolean[2];
BottomSheet.Builder builder = new BottomSheet.Builder(getParentActivity());
builder.setApplyTopPadding(false);
builder.setApplyBottomPadding(false);
LinearLayout linearLayout = new LinearLayout(getParentActivity());
linearLayout.setOrientation(LinearLayout.VERTICAL);
builder.setView(linearLayout);
final TextView message = new TextView(getParentActivity());
message.setText(LocaleController.formatString("EnterThemeName", R.string.EnterThemeName));
message.setTextSize(16);
message.setPadding(AndroidUtilities.dp(23), AndroidUtilities.dp(12), AndroidUtilities.dp(23), AndroidUtilities.dp(6));
message.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));
linearLayout.addView(message, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
editText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
editText.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));
editText.setMaxLines(1);
editText.setLines(1);
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES);
editText.setGravity(Gravity.LEFT | Gravity.TOP);
editText.setSingleLine(true);
editText.setImeOptions(EditorInfo.IME_ACTION_DONE);
editText.setCursorColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
editText.setCursorSize(AndroidUtilities.dp(20));
editText.setCursorWidth(1.5f);
editText.setPadding(0, AndroidUtilities.dp(4), 0, 0);
linearLayout.addView(editText, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 36, Gravity.TOP | Gravity.LEFT, 24, 6, 24, 0));
editText.setOnEditorActionListener((textView, i, keyEvent) -> {
AndroidUtilities.hideKeyboard(textView);
return false;
});
final AlertDialog alertDialog = builder.create();
alertDialog.setOnShowListener(dialog -> AndroidUtilities.runOnUIThread(() -> {
editText.requestFocus();
AndroidUtilities.showKeyboard(editText);
}));
showDialog(alertDialog);
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(v -> {
if (editText.length() == 0) {
Vibrator vibrator = (Vibrator) ApplicationLoader.applicationContext.getSystemService(Context.VIBRATOR_SERVICE);
if (vibrator != null) {
vibrator.vibrate(200);
}
AndroidUtilities.shakeView(editText, 2, 0);
return;
for (int a = 0; a < (Build.VERSION.SDK_INT >= 19 ? 2 : 1); a++) {
String name = null;
if (a == 0) {
maskValues[a] = SharedConfig.allowBigEmoji;
name = LocaleController.getString("EmojiBigSize", R.string.EmojiBigSize);
} else if (a == 1) {
maskValues[a] = SharedConfig.useSystemEmoji;
name = LocaleController.getString("EmojiUseDefault", R.string.EmojiUseDefault);
}
ThemeEditorView themeEditorView = new ThemeEditorView();
String name = editText.getText().toString() + ".attheme";
themeEditorView.show(getParentActivity(), name);
Theme.saveCurrentTheme(name, true);
updateRows();
alertDialog.dismiss();
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
if (preferences.getBoolean("themehint", false)) {
return;
}
preferences.edit().putBoolean("themehint", true).commit();
CheckBoxCell checkBoxCell = new CheckBoxCell(getParentActivity(), 1, 21);
checkBoxCell.setTag(a);
checkBoxCell.setBackgroundDrawable(Theme.getSelectorDrawable(false));
linearLayout.addView(checkBoxCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50));
checkBoxCell.setText(name, "", maskValues[a], true);
checkBoxCell.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));
checkBoxCell.setOnClickListener(v -> {
CheckBoxCell cell = (CheckBoxCell) v;
int num = (Integer) cell.getTag();
maskValues[num] = !maskValues[num];
cell.setChecked(maskValues[num], true);
});
}
BottomSheet.BottomSheetCell cell = new BottomSheet.BottomSheetCell(getParentActivity(), 1);
cell.setBackgroundDrawable(Theme.getSelectorDrawable(false));
cell.setTextAndIcon(LocaleController.getString("Save", R.string.Save).toUpperCase(), 0);
cell.setTextColor(Theme.getColor(Theme.key_dialogTextBlue2));
cell.setOnClickListener(v -> {
try {
Toast.makeText(getParentActivity(), LocaleController.getString("CreateNewThemeHelp", R.string.CreateNewThemeHelp), Toast.LENGTH_LONG).show();
if (visibleDialog != null) {
visibleDialog.dismiss();
}
} catch (Exception e) {
FileLog.e(e);
}
SharedPreferences.Editor editor = MessagesController.getGlobalMainSettings().edit();
editor.putBoolean("allowBigEmoji", SharedConfig.allowBigEmoji = maskValues[0]);
editor.putBoolean("useSystemEmoji", SharedConfig.useSystemEmoji = maskValues[1]);
editor.commit();
if (listAdapter != null) {
listAdapter.notifyItemChanged(position);
}
});
linearLayout.addView(cell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50));
builder.setCustomView(linearLayout);
showDialog(builder.create());
} else if (position >= themeStartRow && position < themeEndRow) {
int p = position - themeStartRow;
if (p >= 0 && p < Theme.themes.size()) {
Theme.ThemeInfo themeInfo = Theme.themes.get(p);
if (currentType == THEME_TYPE_BASIC) {
Theme.applyTheme(themeInfo);
if (parentLayout != null) {
parentLayout.rebuildAllFragmentViews(false, false);
if (themeInfo == Theme.getCurrentTheme()) {
return;
}
finishFragment();
NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.needSetDayNightTheme, themeInfo, false);
} else {
Theme.setCurrentNightTheme(themeInfo);
int count = listView.getChildCount();
for (int a = 0; a < count; a++) {
View child = listView.getChildAt(a);
if (child instanceof ThemeCell) {
((ThemeCell) child).updateCurrentThemeCheck();
}
}
int count = listView.getChildCount();
for (int a = 0; a < count; a++) {
View child = listView.getChildAt(a);
if (child instanceof ThemeCell) {
((ThemeCell) child).updateCurrentThemeCheck();
}
}
}
@ -475,6 +820,80 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
}
}
private void openThemeCreate() {
final EditTextBoldCursor editText = new EditTextBoldCursor(getParentActivity());
editText.setBackgroundDrawable(Theme.createEditTextDrawable(getParentActivity(), true));
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("NewTheme", R.string.NewTheme));
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), (dialog, which) -> {
});
LinearLayout linearLayout = new LinearLayout(getParentActivity());
linearLayout.setOrientation(LinearLayout.VERTICAL);
builder.setView(linearLayout);
final TextView message = new TextView(getParentActivity());
message.setText(LocaleController.formatString("EnterThemeName", R.string.EnterThemeName));
message.setTextSize(16);
message.setPadding(AndroidUtilities.dp(23), AndroidUtilities.dp(12), AndroidUtilities.dp(23), AndroidUtilities.dp(6));
message.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));
linearLayout.addView(message, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
editText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
editText.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));
editText.setMaxLines(1);
editText.setLines(1);
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES);
editText.setGravity(Gravity.LEFT | Gravity.TOP);
editText.setSingleLine(true);
editText.setImeOptions(EditorInfo.IME_ACTION_DONE);
editText.setCursorColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
editText.setCursorSize(AndroidUtilities.dp(20));
editText.setCursorWidth(1.5f);
editText.setPadding(0, AndroidUtilities.dp(4), 0, 0);
linearLayout.addView(editText, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 36, Gravity.TOP | Gravity.LEFT, 24, 6, 24, 0));
editText.setOnEditorActionListener((textView, i, keyEvent) -> {
AndroidUtilities.hideKeyboard(textView);
return false;
});
final AlertDialog alertDialog = builder.create();
alertDialog.setOnShowListener(dialog -> AndroidUtilities.runOnUIThread(() -> {
editText.requestFocus();
AndroidUtilities.showKeyboard(editText);
}));
showDialog(alertDialog);
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(v -> {
if (editText.length() == 0) {
Vibrator vibrator = (Vibrator) ApplicationLoader.applicationContext.getSystemService(Context.VIBRATOR_SERVICE);
if (vibrator != null) {
vibrator.vibrate(200);
}
AndroidUtilities.shakeView(editText, 2, 0);
return;
}
ThemeEditorView themeEditorView = new ThemeEditorView();
String name = editText.getText().toString() + ".attheme";
themeEditorView.show(getParentActivity(), name);
Theme.saveCurrentTheme(name, true);
updateRows();
alertDialog.dismiss();
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
if (preferences.getBoolean("themehint", false)) {
return;
}
preferences.edit().putBoolean("themehint", true).commit();
try {
Toast.makeText(getParentActivity(), LocaleController.getString("CreateNewThemeHelp", R.string.CreateNewThemeHelp), Toast.LENGTH_LONG).show();
} catch (Exception e) {
FileLog.e(e);
}
});
}
private void updateSunTime(Location lastKnownLocation, boolean forceUpdate) {
LocationManager locationManager = (LocationManager) ApplicationLoader.applicationContext.getSystemService(Context.LOCATION_SERVICE);
if (Build.VERSION.SDK_INT >= 23) {
@ -800,10 +1219,14 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 7:
default:
view = new TextCheckCell(mContext);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
case 8:
default:
view = new TextSizeCell(mContext);
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
break;
}
return new RecyclerListView.Holder(view);
@ -820,13 +1243,11 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
}
case 1: {
TextSettingsCell cell = (TextSettingsCell) holder.itemView;
if (position == newThemeRow) {
cell.setText(LocaleController.getString("CreateNewTheme", R.string.CreateNewTheme), false);
} else if (position == nightThemeRow) {
if (position == nightThemeRow) {
if (Theme.selectedAutoNightType == Theme.AUTO_NIGHT_TYPE_NONE || Theme.getCurrentNightTheme() == null) {
cell.setText(LocaleController.getString("AutoNightTheme", R.string.AutoNightTheme), true);
cell.setTextAndValue(LocaleController.getString("AutoNightTheme", R.string.AutoNightTheme), LocaleController.getString("AutoNightThemeOff", R.string.AutoNightThemeOff), false);
} else {
cell.setTextAndValue(LocaleController.getString("AutoNightTheme", R.string.AutoNightTheme), Theme.getCurrentNightThemeName(), true);
cell.setTextAndValue(LocaleController.getString("AutoNightTheme", R.string.AutoNightTheme), Theme.getCurrentNightThemeName(), false);
}
} else if (position == scheduleFromRow) {
int currentHour = Theme.autoNightDayStartTime / 60;
@ -838,14 +1259,32 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
cell.setTextAndValue(LocaleController.getString("AutoNightTo", R.string.AutoNightTo), String.format("%02d:%02d", currentHour, currentMinute), false);
} else if (position == scheduleUpdateLocationRow) {
cell.setTextAndValue(LocaleController.getString("AutoNightUpdateLocation", R.string.AutoNightUpdateLocation), Theme.autoNightCityName, false);
} else if (position == contactsSortRow) {
String value;
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
int sort = preferences.getInt("sortContactsBy", 0);
if (sort == 0) {
value = LocaleController.getString("Default", R.string.Default);
} else if (sort == 1) {
value = LocaleController.getString("FirstName", R.string.SortFirstName);
} else {
value = LocaleController.getString("LastName", R.string.SortLastName);
}
cell.setTextAndValue(LocaleController.getString("SortBy", R.string.SortBy), value, true);
} else if (position == backgroundRow) {
cell.setText(LocaleController.getString("ChatBackground", R.string.ChatBackground), true);
} else if (position == contactsReimportRow) {
cell.setText(LocaleController.getString("ImportContacts", R.string.ImportContacts), true);
} else if (position == stickersRow) {
cell.setText(LocaleController.getString("StickersAndMasks", R.string.StickersAndMasks), false);
} else if (position == emojiRow) {
cell.setText(LocaleController.getString("Emoji", R.string.Emoji), true);
}
break;
}
case 2: {
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
if (position == newThemeInfoRow) {
cell.setText(LocaleController.getString("CreateNewThemeInfo", R.string.CreateNewThemeInfo));
} else if (position == automaticBrightnessInfoRow) {
if (position == automaticBrightnessInfoRow) {
cell.setText(LocaleController.formatString("AutoNightBrightnessInfo", R.string.AutoNightBrightnessInfo, (int) (100 * Theme.autoNightBrighnessThreshold)));
} else if (position == scheduleLocationInfoRow) {
cell.setText(getLocationSunString());
@ -871,6 +1310,12 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
headerCell.setText(LocaleController.getString("AutoNightBrightness", R.string.AutoNightBrightness));
} else if (position == preferedHeaderRow) {
headerCell.setText(LocaleController.getString("AutoNightPreferred", R.string.AutoNightPreferred));
} else if (position == settingsRow) {
headerCell.setText(LocaleController.getString("SETTINGS", R.string.SETTINGS));
} else if (position == themeHeaderRow) {
headerCell.setText(LocaleController.getString("ColorTheme", R.string.ColorTheme));
} else if (position == textSizeHeaderRow) {
headerCell.setText(LocaleController.getString("TextSizeHeader", R.string.TextSizeHeader));
}
break;
}
@ -883,6 +1328,22 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
TextCheckCell textCheckCell = (TextCheckCell) holder.itemView;
if (position == scheduleLocationRow) {
textCheckCell.setTextAndCheck(LocaleController.getString("AutoNightLocation", R.string.AutoNightLocation), Theme.autoNightScheduleByLocation, true);
} else if (position == enableAnimationsRow) {
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
textCheckCell.setTextAndCheck(LocaleController.getString("EnableAnimations", R.string.EnableAnimations), preferences.getBoolean("view_animations", true), true);
} else if (position == sendByEnterRow) {
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
textCheckCell.setTextAndCheck(LocaleController.getString("SendByEnter", R.string.SendByEnter), preferences.getBoolean("send_by_enter", false), true);
} else if (position == saveToGalleryRow) {
textCheckCell.setTextAndCheck(LocaleController.getString("SaveToGallerySettings", R.string.SaveToGallerySettings), SharedConfig.saveToGallery, false);
} else if (position == autoplayGifsRow) {
textCheckCell.setTextAndCheck(LocaleController.getString("AutoplayGifs", R.string.AutoplayGifs), SharedConfig.autoplayGifs, true);
} else if (position == raiseToSpeakRow) {
textCheckCell.setTextAndCheck(LocaleController.getString("RaiseToSpeak", R.string.RaiseToSpeak), SharedConfig.raiseToSpeak, true);
} else if (position == customTabsRow) {
textCheckCell.setTextAndValueAndCheck(LocaleController.getString("ChromeCustomTabs", R.string.ChromeCustomTabs), LocaleController.getString("ChromeCustomTabsInfo", R.string.ChromeCustomTabsInfo), SharedConfig.customTabs, false, true);
} else if (position == directShareRow) {
textCheckCell.setTextAndValueAndCheck(LocaleController.getString("DirectShare", R.string.DirectShare), LocaleController.getString("DirectShareInfo", R.string.DirectShareInfo), SharedConfig.directShare, false, true);
}
break;
}
@ -903,21 +1364,29 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
}
@Override
public int getItemViewType(int i) {
if (i == newThemeRow || i == nightThemeRow || i == scheduleFromRow || i == scheduleToRow || i == scheduleUpdateLocationRow) {
public int getItemViewType(int position) {
if (position == nightThemeRow || position == scheduleFromRow || position == emojiRow ||
position == scheduleToRow || position == scheduleUpdateLocationRow || position == backgroundRow ||
position == contactsReimportRow || position == contactsSortRow || position == stickersRow) {
return 1;
} else if (i == newThemeInfoRow || i == automaticBrightnessInfoRow || i == scheduleLocationInfoRow) {
} else if (position == automaticBrightnessInfoRow || position == scheduleLocationInfoRow) {
return 2;
} else if (i == themeInfoRow || i == nightTypeInfoRow || i == scheduleFromToInfoRow) {
} else if (position == themeInfoRow || position == nightTypeInfoRow || position == scheduleFromToInfoRow ||
position == stickersSection2Row || position == settings2Row || position == newThemeInfoRow) {
return 3;
} else if (i == nightDisabledRow || i == nightScheduledRow || i == nightAutomaticRow) {
} else if (position == nightDisabledRow || position == nightScheduledRow || position == nightAutomaticRow) {
return 4;
} else if (i == scheduleHeaderRow || i == automaticHeaderRow || i == preferedHeaderRow) {
} else if (position == scheduleHeaderRow || position == automaticHeaderRow || position == preferedHeaderRow ||
position == settingsRow || position == themeHeaderRow || position == textSizeHeaderRow) {
return 5;
} else if (i == automaticBrightnessRow) {
} else if (position == automaticBrightnessRow) {
return 6;
} else if (i == scheduleLocationRow) {
} else if (position == scheduleLocationRow || position == enableAnimationsRow || position == sendByEnterRow ||
position == saveToGalleryRow || position == autoplayGifsRow || position == raiseToSpeakRow ||
position == customTabsRow || position == directShareRow) {
return 7;
} else if (position == textSizeRow) {
return 8;
}
return 0;
}
@ -926,7 +1395,7 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
@Override
public ThemeDescription[] getThemeDescriptions() {
return new ThemeDescription[]{
new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{TextSettingsCell.class, TextCheckCell.class, HeaderCell.class, BrightnessControlCell.class, ThemeTypeCell.class, ThemeCell.class}, null, null, null, Theme.key_windowBackgroundWhite),
new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{TextSettingsCell.class, TextCheckCell.class, HeaderCell.class, BrightnessControlCell.class, ThemeTypeCell.class, ThemeCell.class, TextSizeCell.class}, null, null, null, Theme.key_windowBackgroundWhite),
new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundGray),
new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault),
@ -949,6 +1418,7 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
new ThemeDescription(listView, 0, new Class[]{TextInfoPrivacyCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText4),
new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteValueText),
new ThemeDescription(listView, 0, new Class[]{HeaderCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader),
@ -963,6 +1433,33 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No
new ThemeDescription(listView, 0, new Class[]{ThemeTypeCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
new ThemeDescription(listView, 0, new Class[]{ThemeTypeCell.class}, new String[]{"checkImage"}, null, null, null, Theme.key_featuredStickers_addedIcon),
new ThemeDescription(listView, ThemeDescription.FLAG_PROGRESSBAR, new Class[]{TextSizeCell.class}, new String[]{"sizeBar"}, null, null, null, Theme.key_player_progress),
new ThemeDescription(listView, 0, new Class[]{TextSizeCell.class}, new String[]{"sizeBar"}, null, null, null, Theme.key_player_progressBackground),
new ThemeDescription(listView, 0, null, null, new Drawable[]{Theme.chat_msgInDrawable, Theme.chat_msgInMediaDrawable}, null, Theme.key_chat_inBubble),
new ThemeDescription(listView, 0, null, null, new Drawable[]{Theme.chat_msgInSelectedDrawable, Theme.chat_msgInMediaSelectedDrawable}, null, Theme.key_chat_inBubbleSelected),
new ThemeDescription(listView, 0, null, null, new Drawable[]{Theme.chat_msgInShadowDrawable, Theme.chat_msgInMediaShadowDrawable}, null, Theme.key_chat_inBubbleShadow),
new ThemeDescription(listView, 0, null, null, new Drawable[]{Theme.chat_msgOutDrawable, Theme.chat_msgOutMediaDrawable}, null, Theme.key_chat_outBubble),
new ThemeDescription(listView, 0, null, null, new Drawable[]{Theme.chat_msgOutSelectedDrawable, Theme.chat_msgOutMediaSelectedDrawable}, null, Theme.key_chat_outBubbleSelected),
new ThemeDescription(listView, 0, null, null, new Drawable[]{Theme.chat_msgOutShadowDrawable, Theme.chat_msgOutMediaShadowDrawable}, null, Theme.key_chat_outBubbleShadow),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_messageTextIn),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_messageTextOut),
new ThemeDescription(listView, 0, null, null, new Drawable[]{Theme.chat_msgOutCheckDrawable, Theme.chat_msgOutHalfCheckDrawable}, null, Theme.key_chat_outSentCheck),
new ThemeDescription(listView, 0, null, null, new Drawable[]{Theme.chat_msgOutCheckSelectedDrawable, Theme.chat_msgOutHalfCheckSelectedDrawable}, null, Theme.key_chat_outSentCheckSelected),
new ThemeDescription(listView, 0, null, null, new Drawable[]{Theme.chat_msgMediaCheckDrawable, Theme.chat_msgMediaHalfCheckDrawable}, null, Theme.key_chat_mediaSentCheck),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_inReplyLine),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_outReplyLine),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_inReplyNameText),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_outReplyNameText),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_inReplyMessageText),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_outReplyMessageText),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_inReplyMediaMessageSelectedText),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_outReplyMediaMessageSelectedText),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_inTimeText),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_outTimeText),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_inTimeSelectedText),
new ThemeDescription(listView, 0, null, null, null, null, Theme.key_chat_outTimeSelectedText),
};
}
}

View File

@ -49,7 +49,7 @@
<string name="OtherLoginCode">رمز الدخول هو **%1$s**. قم بإدخاله في تطبيق تيليجرام الذي تحاول تسجيل الدخول منه.\n\nلا تعطِ هذا الرمز لأي شخص كان.</string>
<!--signup view-->
<string name="YourName">اسمك</string>
<string name="RegisterText2">Please enter your full name and upload your profile picture.</string>
<string name="RegisterText2">يرجى إدخال اسمك الكامل ورفع صورتك الشخصية.</string>
<string name="FirstName">الاسم الأول (مطلوب)</string>
<string name="LastName">اسم العائلة (اختياري)</string>
<string name="CancelRegistration">إلغاء التسجيل</string>
@ -143,7 +143,7 @@
<string name="EncryptedChatStartedOutgoing">انضم %s لمحادثتك السرية.</string>
<string name="EncryptedChatStartedIncoming">لقد انضممت للمحادثة السرية</string>
<string name="ClearHistory">مسح محتوى المحادثة</string>
<string name="HistoryClearedUndo">History cleared.</string>
<string name="HistoryClearedUndo">تم مسح المحتوى.</string>
<string name="ChatDeletedUndo">تم حذف المحادثة.</string>
<string name="GroupDeletedUndo">تم حذف المجموعة.</string>
<string name="ChannelDeletedUndo">تم حذف القناة.</string>
@ -193,7 +193,7 @@
<!--channels-->
<string name="SetAsAdmin">ترقية إلى مشرف</string>
<string name="EditAdminRights">تعديل صلاحيات المشرف</string>
<string name="NoBlockedUsers">لا يوجد مستخدمون محظورون</string>
<string name="NoBlockedUsers">ما من مستخدمين تمت إزالتهم</string>
<string name="DeleteMega">حذف المجموعة</string>
<string name="LeaveMegaMenu">مغادرة المجموعة</string>
<string name="DeleteMegaMenu">حذف المجموعة</string>
@ -226,8 +226,8 @@
<string name="ActionPinnedMusic">ثبت un1 ملفًا صوتيًا</string>
<string name="ActionMigrateFromGroup">تمّت ترقية هذه المجموعة إلى مجموعة خارقة</string>
<string name="ActionMigrateFromGroupNotify">تمت ترقية %1$s إلى مجموعة خارقة</string>
<string name="NoBlockedGroup2">Users removed from the group by the admins can\'t rejoin via invite links.</string>
<string name="NoBlockedChannel2">Users removed from the channel by the admins can\'t rejoin via invite links.</string>
<string name="NoBlockedGroup2">لن يتمكن المستخدمون الذين أزالهم المشرفون من المجموعة إعادة الإنضمام عبر روابط الدعوة.</string>
<string name="NoBlockedChannel2">لن يتمكن المستخدمون الذين أزالهم المشرفون من القناة إعادة الإنضمام عبر روابط الدعوة.</string>
<string name="NewChannel">قناة جديدة</string>
<string name="EnterChannelName">اسم القناة</string>
<string name="AddMutual">إضافة جهات اتصالك لقناتك</string>
@ -239,8 +239,8 @@
<string name="DescriptionOptionalPlaceholder">الوصف (اختياري)</string>
<string name="DescriptionPlaceholder">الوصف</string>
<string name="DescriptionInfo">يمكنك إضافة وصف اختياري لقناتك.</string>
<string name="GroupSettingsChangedAlert">You have changed some settings in this group. Apply changes?</string>
<string name="ChannelSettingsChangedAlert">You have changed some settings in this channel. Apply changes?</string>
<string name="GroupSettingsChangedAlert">لقد قمت بتغيير بعض الإعدادات في هذه المجموعة. تطبيق التغييرات؟</string>
<string name="ChannelSettingsChangedAlert">لقد قمت بتغيير بعض الإعدادات في هذه القناة. تطبيق التغييرات؟</string>
<string name="ChannelPublic">قناة عامة</string>
<string name="MegaPublic">مجموعة عامة</string>
<string name="ChannelPublicInfo">يمكن العثور على القنوات العامة عبر البحث ويمكن لأي شخص الانضمام لها.</string>
@ -249,7 +249,7 @@
<string name="MegaPrivate">مجموعة خاصة</string>
<string name="ChannelPrivateInfo">يمكن الانضمام للقنوات الخاصة عن طريق رابط الدعوة فقط.</string>
<string name="MegaPrivateInfo">يمكن الانضمام للمجموعات الخاصة فقط في حال تمت دعوتك أو بواسطة رابط دعوة.</string>
<string name="ChannelLinkTitle">الرابط</string>
<string name="ChannelLinkTitle">رابط دائم</string>
<string name="ChannelInviteLinkTitle">رابط الدعوة</string>
<string name="ChannelAddMembers">إضافة أعضاء</string>
<string name="LeaveChannel">مغادرة القناة</string>
@ -272,22 +272,22 @@
<string name="LinkAvailable">%1$s متاح.</string>
<string name="ChannelMembers">أعضاء</string>
<string name="ChannelAddToGroup">إضافة إلى المجموعة</string>
<string name="ChannelAddToChannel">Add to channel</string>
<string name="ChannelAddToChannel">إضافة إلى القناة</string>
<string name="ChannelDeleteFromList">حذف من هذه القائمة</string>
<string name="ChannelSubscribers">"المشتركون "</string>
<string name="ChannelBlacklist">المحظورون</string>
<string name="ChannelBlacklist">مستخدمون تمت إزالتهم</string>
<string name="ChannelPermissions">الصلاحيات</string>
<string name="ChannelPermissionsHeader">ما هي صلاحيات أعضاء هذه المجموعة؟</string>
<string name="ChannelAddException">إضافة استثناء</string>
<string name="ChannelSearchException">Search Exceptions</string>
<string name="ChannelBlockedUsers">المستخدمون المحظورون</string>
<string name="ChannelSearchException">بحث في الاستثناءات</string>
<string name="ChannelBlockedUsers">مستخدمون تمت إزالتهم</string>
<string name="ChannelRestrictedUsers">المستخدمون المقيدون</string>
<string name="ChannelAdministrators">المشرفون</string>
<string name="ChannelDelete">حذف القناة</string>
<string name="ChannelDeleteMenu">حذف القناة</string>
<string name="ChannelDeleteAlert">مهلا! حذف هذه القناة سيزيل كافة أعضائها ويَحذف جميعَ رسائلها، هل ترغب حقًا في حذفها؟</string>
<string name="ChannelLeaveAlert">هل ترغب حقًا في مغادرة القناة؟</string>
<string name="ChannelLeaveAlertWithName">Are you sure you want to leave **%1$s**?</string>
<string name="ChannelLeaveAlertWithName">هل ترغب حقًا في مغادرة **%1$s**؟</string>
<string name="ChannelDeleteInfo">ستَفقد كافة المنشورات في هذه القناة.</string>
<string name="ChannelEdit">تعديل</string>
<string name="ChannelPublicEmptyUsername">فضلًا قم باختيار رابط لقناتك العامة ليتمكن الناس من إيجادها عبر البحث ومشاركتِها مع غيرهم.\n\nإذا لم ترغب بذلك، ننصحك بإنشاء قناة خاصة بدلا منها.</string>
@ -301,12 +301,12 @@
<string name="ChannelMute">كتم</string>
<string name="ChannelUnmute">إلغاء الكتم</string>
<string name="ChannelAddAdmin">إضافة مشرف</string>
<string name="ChannelBlockUser">حظر مستخدم</string>
<string name="ChannelBlockUser">إزالة مستخدم</string>
<string name="Unban">إلغاء الحظر</string>
<string name="UnbanText">اضغط باستمرار على المستخدم لرفع الحظر عنه</string>
<string name="ChannelInviteViaLink">الدعوة عبر رابط خاص</string>
<string name="ChannelRemoveUserAdmin">إزالة المشرف</string>
<string name="ChannelEditPermissions">Edit permissions</string>
<string name="ChannelEditPermissions">تعديل الصلاحيات</string>
<string name="ChannelMembersInfo">يمكن لمشرفي القناة فقط مشاهدة هذه القائمة.</string>
<string name="ChannelLinkInfo">يمكن لمستخدمي تيليجرام الانضمام إلى قناتك عبر هذا الرابط.</string>
<string name="ChannelAdminsInfo">يمكنك إضافة مشرفين لمساعدتك في إدارة القناة، اضغط مطوَّلا على أيٍّ منهم لحذفه.</string>
@ -361,13 +361,15 @@
<string name="EditAdminRemoveAdmin">إزالة المشرف</string>
<string name="EditAdminBanUsers">حظر المستخدمين</string>
<string name="EditAdminAddUsers">إضافة مستخدمين</string>
<string name="EditAdminAddUsersViaLink">دعوة مستخدمين من خلال الرابط</string>
<string name="EditAdminAddUsersViaLink">دعوة المستخدمين عبر الرابط</string>
<string name="EditAdminPinMessages">تثبيت الرسائل</string>
<string name="EditAdminPromotedBy">قام %1$s بإضافته</string>
<string name="EditAdminPromotedBy">تمت ترقيته من قبل %1$s</string>
<string name="EditAdminCantEdit">لا يمكنك تعديل صلاحيات هذا المشرف.</string>
<string name="UserRemovedBy">Removed by %1$s</string>
<string name="EditCantEditPermissions">لا يمكنك تعديل هذه الصلاحية.</string>
<string name="EditCantEditPermissionsPublic">هذه الصلاحية ليست متوفرة في المجموعات العامة.</string>
<string name="UserRemovedBy">تمت إزالته من قبل %1$s</string>
<string name="UserRestrictions">صلاحيات المستخدم</string>
<string name="UserRestrictionsDisabled">This option is disabled for all members in Group Permissions</string>
<string name="UserRestrictionsDisabled">تم تعطيل هذا الخيار لجميع الأعضاء في صلاحيات المجموعة.</string>
<string name="UserRestrictionsCanDo">ما هي صلاحيات هذا المستخدم؟</string>
<string name="UserRestrictionsRead">قراءة الرسائل</string>
<string name="UserRestrictionsSend">إرسال الرسائل</string>
@ -375,18 +377,18 @@
<string name="UserRestrictionsSendPolls">إرسال الاستفتاءات</string>
<string name="UserRestrictionsSendStickers">إرسال الملصقات والصور المتحركة</string>
<string name="UserRestrictionsEmbedLinks">تضمين روابط</string>
<string name="UserRestrictionsChangeInfo">Change Chat Info</string>
<string name="UserRestrictionsPinMessages">Pin Messages</string>
<string name="UserRestrictionsInviteUsers">Add Users</string>
<string name="UserRestrictionsNoRead">can\'t read</string>
<string name="UserRestrictionsNoSend">can\'t send messages</string>
<string name="UserRestrictionsChangeInfo">تغيير معلومات المحادثة</string>
<string name="UserRestrictionsPinMessages">تثبيت الرسائل</string>
<string name="UserRestrictionsInviteUsers">إضافة مستخدمين</string>
<string name="UserRestrictionsNoRead">لا يمكنه قراءة الرسائل</string>
<string name="UserRestrictionsNoSend">لا يمكنه إرسال الرسائل</string>
<string name="UserRestrictionsNoSendMedia">بلا وسائط</string>
<string name="UserRestrictionsNoSendPolls">بلا استفتاءات</string>
<string name="UserRestrictionsNoSendStickers">no stickers &amp; GIFs</string>
<string name="UserRestrictionsNoEmbedLinks">no embed links</string>
<string name="UserRestrictionsNoChangeInfo">can\'t change Info</string>
<string name="UserRestrictionsNoPinMessages">no pins</string>
<string name="UserRestrictionsNoInviteUsers">can\'t add users</string>
<string name="UserRestrictionsNoSendStickers">بلا ملصقات وصور متحركة</string>
<string name="UserRestrictionsNoEmbedLinks">لا يمكنه تضمين روابط</string>
<string name="UserRestrictionsNoChangeInfo">لا يمكنه تغيير معلومات المجموعة</string>
<string name="UserRestrictionsNoPinMessages">بلا تثبيت</string>
<string name="UserRestrictionsNoInviteUsers">لا يمكنه إضافة مستخدمين</string>
<string name="UserRestrictionsDuration">المدة</string>
<string name="UserRestrictionsUntilForever">للأبد</string>
<string name="UserRestrictionsBlock">حظر وإزالة من المجموعة</string>
@ -420,10 +422,10 @@
<string name="SelectFromGallery">اختيار من المعرض</string>
<string name="ChooseFromSearch">البحث في الويب</string>
<string name="Statistics">الإحصائيات</string>
<string name="AddBotAsAdmin">Bots can only be added as administrators.</string>
<string name="CantAddBotAsAdmin">Sorry, bots can only be added to channels as administrators.</string>
<string name="MakeAdmin">MAKE ADMIN</string>
<string name="AdminWillBeRemoved">%1$s will be removed from admins if you restrict them.</string>
<string name="AddBotAsAdmin">يمكن إضافة البوتات فقط كمشرفين.</string>
<string name="CantAddBotAsAdmin">المعذرة، يمكن إضافة البوتات إلى القنوات فقط كمشرفين.</string>
<string name="MakeAdmin">جعله مشرفًا</string>
<string name="AdminWillBeRemoved">سيتم إزالة %1$s من المشرفين إذا قمت بتقييده.</string>
<!--polls-->
<string name="NewPoll">استفتاء جديد</string>
<string name="Poll">استفتاء</string>
@ -507,12 +509,12 @@
<string name="EventLogToggledInvitesOff">un1 عطّل دعوات المجموعة</string>
<string name="EventLogToggledSignaturesOn">فعّل un1 التواقيع</string>
<string name="EventLogToggledSignaturesOff">عطّل un1 التواقيع</string>
<string name="EventLogRestrictedUntil">غير القيود الخاصة بـ %1$s\n\nلمدة: %2$s</string>
<string name="EventLogDefaultPermissions">changed default permissions</string>
<string name="EventLogRestrictedUntil">غيّر صلاحيات %1$s\n\nالمدة: %2$s</string>
<string name="EventLogDefaultPermissions">غيّر الصلاحيات الافتراضية</string>
<string name="EventLogRestrictedSendStickers">إرسال الملصقات والصور المتحركة</string>
<string name="EventLogRestrictedSendMedia">إرسال الوسائط</string>
<string name="EventLogRestrictedChangeInfo">تغيير المعلومات</string>
<string name="EventLogRestrictedInviteUsers">Add users</string>
<string name="EventLogRestrictedInviteUsers">إضافة مستخدمين</string>
<string name="EventLogRestrictedPinMessages">تثبيت الرسائل</string>
<string name="EventLogRestrictedSendPolls">إرسال الاستفتاءات</string>
<string name="EventLogRestrictedSendMessages">إرسال الرسائل</string>
@ -529,7 +531,7 @@
<string name="EventLogPromotedAddUsers">إضافة مستخدمين</string>
<string name="EventLogPromotedPinMessages">تثبيت الرسائل</string>
<string name="EventLogFilterAll">كافة الأحداث</string>
<string name="EventLogFilterNewRestrictions">قيود جديدة</string>
<string name="EventLogFilterNewRestrictions">استثناءات جديدة</string>
<string name="EventLogFilterNewAdmins">مشرفون جدد</string>
<string name="EventLogFilterNewMembers">أعضاء جدد</string>
<string name="EventLogFilterGroupInfo">معلومات المجموعة</string>
@ -701,7 +703,7 @@
<string name="ChatYourSelfName">أنت</string>
<string name="GroupEmptyTitle1">قمت بإنشاء **مجموعة**.</string>
<string name="GroupEmptyTitle2">يمكن للمجموعات:</string>
<string name="GroupDescription1">إحتواء حتى 100,000 عضو</string>
<string name="GroupDescription1">إحتواء حتى 200,000 عضو</string>
<string name="GroupDescription2">إمتلاك سجل محادثة موحّد</string>
<string name="GroupDescription3">إمتلاك روابط t.me عامة</string>
<string name="GroupDescription4">إمتلاك مشرفين بصلاحيات مختلفة</string>
@ -729,9 +731,9 @@
<string name="AttachInlineRestrictedForever">مشرفو هذه المجموعة قيدوك من إرسال محتوى استعلامي إليها</string>
<string name="AttachStickersRestrictedForever">قام مشرفو هذه المجموعة بتقييدك من إرسال الملصقات.</string>
<string name="SendMessageRestrictedForever">قام مشرفو هذه المجموعة بتقييدك من الكتابة هنا.</string>
<string name="GlobalAttachMediaRestricted">Sending media isnt allowed in this group.</string>
<string name="GlobalAttachInlineRestricted">Inline bots arent allowed in this group.</string>
<string name="GlobalAttachStickersRestricted">Stickers arent allowed in this group.</string>
<string name="GlobalAttachMediaRestricted">ليس من المسموح إرسال الوسائط إلى هذه المجموعة.</string>
<string name="GlobalAttachInlineRestricted">ليس من المسموح إرسال أي محتوى استعلامي إلى هذه المجموعة.</string>
<string name="GlobalAttachStickersRestricted">ليس من المسموح إرسال الملصقات إلى هذه المجموعة.</string>
<string name="GlobalSendMessageRestricted">ليس من المسموح إرسال الرسائل إلى هذه المجموعة.</string>
<string name="ChatAdmin">مشرف</string>
<string name="ApkRestricted">"تثبيت ملفات APK محظور لهذا التطبيق، يمكنك السماح بهذا من إعدادات النظام. "</string>
@ -871,8 +873,8 @@
<string name="ShareTelegram">شارك تيليجرام...</string>
<string name="UpdateContactsTitle">هل ترغب في تحديث جهات الاتصال؟</string>
<string name="UpdateContactsMessage">اكتشف تيليجرام العديد من جهات الاتصال غير المزامَنة، هل ترغب في مزامنتها الآن؟ اختر «نعم» إذا كنت تستخدم جهازك الخاص وشريحتك وحساب جوجل الخاص بك.</string>
<string name="SortedByName">مفروزة حسب الاسم</string>
<string name="SortedByLastSeen">مفروزة حسب تاريخ آخر ظهور</string>
<string name="SortedByName">مرتبة حسب الاسم</string>
<string name="SortedByLastSeen">مرتبة حسب تاريخ آخر ظهور</string>
<!--group create view-->
<string name="SendMessageTo">إضافة أشخاص...</string>
<string name="SoftUserLimitAlert">ستتمكن من إضافة أعضاء أكثر إذا انتهيت من إنشاء المجموعة وقمت بتحويلها إلى مجموعة خارقة.</string>
@ -906,7 +908,7 @@
<string name="BanFromTheGroup">حظر من المجموعة</string>
<string name="DeleteAndExit">مغادرة المجموعة وحذفها</string>
<string name="Notifications">الإشعارات</string>
<string name="ChangePermissions">Change permissions</string>
<string name="ChangePermissions">تغيير صلاحيات العضو</string>
<string name="KickFromGroup">إزالة من المجموعة</string>
<string name="UpgradeGroup">قم بالتحديث لمجموعة خارقة</string>
<string name="ConvertGroup">تحويل إلى مجموعة خارقة</string>
@ -975,7 +977,7 @@
<string name="ErrorOccurred">حدث خطأ ما.</string>
<!--stickers view-->
<string name="StickersName">الملصقات والأقنعة</string>
<string name="AddStickers">إضافة ملصق</string>
<string name="AddStickers">إضافة الملصقات</string>
<string name="AddMasks">إضافة أقنعة</string>
<string name="AddToStickers">إضافة إلى الملصقات</string>
<string name="AddToFavorites">إضافة للمفضلة</string>
@ -1020,6 +1022,7 @@
<!--theme view-->
<string name="Theme">النمط</string>
<string name="AutoNightTheme">الوضع الليلي الآلي</string>
<string name="AutoNightThemeOff">Off</string>
<string name="AutoNightDisabled">معطّل</string>
<string name="AutoNightScheduled">مجدول</string>
<string name="AutoNightAutomatic">تلقائي</string>
@ -1041,16 +1044,18 @@
<string name="CloseEditor">أغلق المحرر</string>
<string name="SaveTheme">حفظ النمط</string>
<string name="NewTheme">نمط جديد</string>
<string name="ColorTheme">لون النمط</string>
<string name="CreateTheme">CREATE THEME</string>
<string name="ApplyTheme">تطبيق</string>
<string name="ThemePreview">معاينة النمط</string>
<string name="SelectColor">اختر لونًا</string>
<string name="CreateNewTheme">إنشاء نمط جديد</string>
<string name="CreateNewThemeMenu">Create new theme</string>
<string name="CreateNewThemeHelp">اضغط على أيقونة الألوان لاستعراض قائمة الخيارات في كل شاشة - ثم قم بتعديلها.</string>
<string name="CreateNewThemeInfo">يمكنك إنشاء نمطك الخاص لتغيير الألوان داخل التطبيق. يمكنك العودةُ دائمًا لنمط تيليجرام الافتراضي من هنا.</string>
<string name="CreateNewThemeAlert">You can create your own theme by changing colors within the app.\n\nYou can always switch back to the default Telegram theme here.</string>
<!--settings view-->
<string name="ResetNotificationsText">تم تعيين كل الإشعارات إلى الوضع الافتراضي</string>
<string name="ResetNotificationsAlert">هل ترغب حقًا في إعادة تعيين جميع إعدادات الإشعارات إلى الوضع الافتراضي؟</string>
<string name="TextSize">حجم خط الرسائل</string>
<string name="TextSizeHeader">حجم خط الرسائل</string>
<string name="AskAQuestion">اسأل سؤالًا</string>
<string name="EnableAnimations">تفعيل المؤثرات البصرية</string>
<string name="ChatSettings">إعدادات المحادثات</string>
@ -1108,14 +1113,45 @@
<string name="Default">افتراضي</string>
<string name="Support">الدعم</string>
<string name="OnlyIfSilent">فقط في وضع الصامت</string>
<string name="BackgroundBlurred">Blurred</string>
<string name="BackgroundMotion">Motion</string>
<string name="ChatBackground">خلفية الدردشة</string>
<string name="BackgroundBlurred">تأثير ضبابي</string>
<string name="BackgroundMotion">تأثير حركي</string>
<string name="ChatBackground">خلفية المحادثة</string>
<string name="ResetChatBackgrounds">إعادة تعيين الخلفيات</string>
<string name="ResetChatBackgroundsInfo">لإزالة جميع الخلفيات المرفوعة وإستعادة الخلفيات الإفتراضية لجميع الأنماط.</string>
<string name="ResetChatBackgroundsAlert">هل ترغب حقًا في إعادة تعيين كافة خلفيات المحادثة؟</string>
<string name="DeleteChatBackgroundsAlert">Are you sure you want to delete the selected backgrounds?</string>
<string name="BackgroundPreview">معاينة الخلفية</string>
<string name="BackgroundPreviewLine1">Hint: some background images look better with blur effect.</string>
<string name="BackgroundPreviewLine1">ملحوظة: بعض الخلفيات تصبح أجمل عند إضافة التأثير الضبابي.</string>
<string name="BackgroundPreviewLine2">شكرًا لك!</string>
<string name="SetBackground">SET BACKGROUND</string>
<string name="SelectColorTitle">Select a color</string>
<string name="BackgroundColorPreviewLine1">اسحب لليمين أو لليسار لرؤية المزيد من الألوان.</string>
<string name="BackgroundColorPreviewLine2">يابدع الورد .. يا جمال الورد</string>
<string name="FontSizePreviewReply">Reinhardt, we need to find you some new tunes &#127926;.</string>
<string name="FontSizePreviewLine1">Ah, you kids today with techno music! You should enjoy the classics, like Hasselhoff!</string>
<string name="FontSizePreviewLine2">I can\'t even take you seriously right now.</string>
<string name="BackgroundColorSinglePreviewLine1">Press \'Set\' to apply the background.</string>
<string name="BackgroundColorSinglePreviewLine2">Enjoy the view.</string>
<string name="SetBackground">تعيين كخلفية</string>
<string name="SearchByColor">بحث بواسطة اللون</string>
<string name="SearchBackgrounds">البحث عن خلفيات</string>
<string name="BackgroundSearchColor">اللون:</string>
<string name="BackgroundBrightness">Brightness</string>
<string name="BackgroundHexColorCode">Hex color code</string>
<string name="BackgroundColor">Color</string>
<string name="BackgroundPattern">نقش</string>
<string name="BackgroundIntensity">Intensity</string>
<string name="Blue">الأزرق</string>
<string name="Red">الأحمر</string>
<string name="Orange">البرتقالي</string>
<string name="Yellow">الأصفر</string>
<string name="Green">الأخضر</string>
<string name="Teal">الأخضر الفاتح</string>
<string name="Purple">القرمزي</string>
<string name="Pink">الزهري</string>
<string name="Brown">البني</string>
<string name="Black">الأسود</string>
<string name="Gray">الرمادي</string>
<string name="White">الأبيض</string>
<string name="SelectColorTitle">اختيار لون</string>
<string name="UploadImage">رفع صورة</string>
<string name="SelectImage">تحديد صورة</string>
<string name="LoadingFullImage">يتم تحميل الصورة...</string>
@ -1152,7 +1188,7 @@
<string name="NotificationsServiceInfo">إعادة تشغيل التطبيق عند إيقافه. قم بالتفعيل لضمان ظهور الإشعارات.</string>
<string name="NotificationsServiceConnection">الاتصال في الخلفية</string>
<string name="NotificationsServiceConnectionInfo">البقاء على اتصال طفيف مع تيليجرام في الخلفية لضمان ظهور الإشعارات.</string>
<string name="SortBy">فرز حسب</string>
<string name="SortBy">ترتيب حسب</string>
<string name="ImportContacts">استيراد جهات الاتصال</string>
<string name="SortFirstName">الاسم الأول</string>
<string name="SortLastName">اسم العائلة</string>
@ -1317,7 +1353,7 @@
<string name="PassportRequestedInformation">المعلومات المطلوبة</string>
<string name="PassportProvidedInformation">المعلومات المضافة</string>
<string name="PassportInfoTitle">ماهو جواز تيليجرام؟</string>
<string name="PassportInfo2">With Telegram Passport you can easily sign up for websites and services that require identity verification.\n\nYour information, personal data, and documents are protected by end-to-end encryption. Nobody, including Telegram, can access them without your permission.\n\nYou can visit our *FAQ* to learn more.</string>
<string name="PassportInfo2">مع جواز تيليجرام يمْكنك التسجيل في المواقع والخدمات التي تتطلب توثيق الهوية الشخصية بسهولة.\n\nمعلوماتك، بياناتك الشخصية ووثائقك محمية ومشفرة من البداية للنهاية. لا أحد بما فيهم تيليجرام ذاتُه يمكنه الوصول إليها دون إذنك. \n\nلمزيد من التفاصيل يمكنك زيارة *الأسئلة الشائعة*.</string>
<string name="PassportInfoUrl">https://telegram.org/faq/ar#i7</string>
<string name="TelegramPassportCreatePasswordInfo">"يرجى إنشاء كلمة مرور لحماية بياناتك الشخصية باستخدام التشفير من البداية للنهاية.\n\nستُطلب كلمة المرور هذه في كل مرة تقوم فيها بتسجيل الدخول لجهازٍ جديد. "</string>
<string name="TelegramPassportCreatePassword">إنشاء كلمة مرور</string>
@ -1544,10 +1580,22 @@
<string name="FingerprintHelp">مستشعر اللمس</string>
<string name="FingerprintNotRecognized">لم يتم التعرف على البصمة. حاول مرة أخرى.</string>
<string name="ScreenCapture">عرض المحتوى عند التبديل بين التطبيقات</string>
<string name="ScreenCaptureInfo">إن تم التفعيل، ستتمكن من تصوير الشاشة داخل التطبيق، لكن سيعرض النظام محادثاتك في شاشة تعدد المهام حتى في حال تفعيل رمز القفل.\n\nقد تحتاج لإعادة تشغيل التطبيق ليتم تفعيل هذا الخيار.</string>
<string name="ScreenCaptureAlert">This will hide the contents of your chats or chat list from the task switcher, but you will not be able to take screenshots on Telegram.\n\nYou may need to restart the app for this to take effect.</string>
<string name="ScreenCaptureInfo">إن تم التعطيل، لن تتمكن من تصوير الشاشة داخل التطبيق، لكن سيتم إخفاء محتوى المحادثات في شاشة تعدد المهام.</string>
<string name="ScreenCaptureAlert">سيؤدي هذا لإخفاء محتوى محادثاتك من شاشة تعدد المهام، لكن بالمقابل لن تتمكن من أخذ لقطات الشاشة في تيليجرام.\n\nقد تحتاج لإعادة تشغيل التطبيق ليتم تفعيل هذا الخيار.</string>
<string name="TooManyTries">محاولات عديدة.\nأعد المحاولة خلال %1$s.</string>
<!--media view-->
<string name="January">يناير</string>
<string name="February">فبراير</string>
<string name="March">مارس</string>
<string name="April">أبريل</string>
<string name="May">مايو</string>
<string name="June">يونيو</string>
<string name="July">يوليو</string>
<string name="August">أغسطس</string>
<string name="September">سبتمبر</string>
<string name="October">أكتوبر</string>
<string name="November">نوفمبر</string>
<string name="December">ديسمبر</string>
<string name="SharedFilesTab">ملفات</string>
<string name="SharedMediaTab">وسائط</string>
<string name="SharedLinksTab">روابط</string>
@ -1612,6 +1660,7 @@
<string name="Gallery">المعرض</string>
<string name="AllPhotos">كافة الصور</string>
<string name="AllMedia">كافة الوسائط</string>
<string name="AllVideos">جميع المقاطع المرئية</string>
<string name="NoPhotos">لا توجد صور بعد</string>
<string name="PleaseDownload">فضلًا، قم بتنزيل الوسائط أولًا</string>
<string name="PleaseStreamDownload">يرجى الانتظار إلى حين اكتمال تنزيل المقطع المرئي.</string>
@ -1974,9 +2023,9 @@
<string name="AreYouSureSecretChat">هل ترغب حقًا في إنشاء محادثة سرية؟</string>
<string name="AreYouSureRegistration">هل ترغب حقًا في إلغاء التسجيل؟</string>
<string name="StopVerification">هل ترغب حقًا في إيقاف عملية التحقق من رقم الهاتف؟</string>
<string name="AreYouSureClearHistoryWithUser">هل ترغب حقًا في حذف محتوى المحادثة مع **%1$s**؟</string>
<string name="AreYouSureClearHistoryWithSecretUser">Are you sure you want to clear your secret chat history with **%1$s**?</string>
<string name="AreYouSureClearHistoryWithChat">Are you sure you want to clear the chat history in **%1$s**?</string>
<string name="AreYouSureClearHistoryWithUser">هل ترغب حقًا في مسح محتوى المحادثة مع **%1$s**؟</string>
<string name="AreYouSureClearHistoryWithSecretUser">هل ترغب حقًا في مسح محتوى المحادثة السرية مع **%1$s**؟</string>
<string name="AreYouSureClearHistoryWithChat">هل ترغب حقًا في مسح محتوى محادثة **%1$s**؟</string>
<string name="AreYouSureClearHistory">هل ترغب حقًا في مسح محتوى المحادثة؟</string>
<string name="AreYouSureClearHistoryChannel">حذف كافة المحادثات والوسائط المتعلقة بهذه القناة من الذاكرة المؤقتة؟</string>
<string name="AreYouSureClearHistoryGroup">حذف جميع الرسائل والوسائط المخزنة مؤقتًا من هذه المجموعة؟</string>
@ -2002,9 +2051,9 @@
<string name="ErrorSendRestrictedStickers">المعذرة، مشرفو هذه المجموعة قيدوك من إرسال الملصقات.</string>
<string name="ErrorSendRestrictedMedia">المعذرة، قام مشرفو هذه المجموعة بتقييدك من إرسال الوسائط.</string>
<string name="ErrorSendRestrictedPolls">Sorry, the admins of this group have restricted you from sending polls.</string>
<string name="ErrorSendRestrictedStickersAll">Sorry, sending stickers is not allowed in this group.</string>
<string name="ErrorSendRestrictedMediaAll">Sorry, sending media is not allowed in this group.</string>
<string name="ErrorSendRestrictedPollsAll">Sorry, sending polls is not allowed in this group.</string>
<string name="ErrorSendRestrictedStickersAll">المعذرة، ليس من المسموح إرسال الملصقات إلى هذه المجموعة.</string>
<string name="ErrorSendRestrictedMediaAll">المعذرة، ليس من المسموح إرسال الوسائط إلى هذه المجموعة.</string>
<string name="ErrorSendRestrictedPollsAll">المعذرة، ليس من المسموح إرسال الاستفتاءات إلى هذه المجموعة.</string>
<string name="TosDecline">نحن متأسفون للغاية، ولكن هذا يعني أنه لا يمكنك الاشتراك بتيليجرام.\n\nعلى عكس الآخرين، نحن لا نستخدم بياناتك لاستهدافك بالإعلانات أو لأغراض تجارية أخرى. لا يخزن تيليجرام سوى المعلومات التي يحتاجها ليعمل كخدمة سحابية غنية بالميزات. يمكنك ضبط كيفية استخدامنا لبياناتك (مثل إعدادات حذف الجهات المزامَنة) في إعدادات الخصوصية والأمان.\n\nلكن إن كنت غير موافق على احتياجات تيليجرام المتواضعة بشكل عام، فلن يكون من الممكن لنا تقديم هذه الخدمة.</string>
<string name="TosAgeTitle">التحقق من العمر</string>
<string name="PrivacyPolicyAndTerms">سياسة الخصوصية وشروط الخدمة</string>
@ -2099,7 +2148,7 @@
<string name="CallMessageReportProblem">قيم المكالمة</string>
<string name="CallReportHint">ماذا حدث؟</string>
<string name="CallReportIncludeLogs">تضمين المعلومات التقنية</string>
<string name="CallReportLogsExplain">هذا لن يفصح عن محتوى محادثتك، لكن سيساعد في حل المشكلة بشكل أسرع.</string>
<string name="CallReportLogsExplain">لن تفصح عن محتوى محادثتك وستساعدنا على حل المشكلة بشكل أسرع.</string>
<string name="CallReportSent">شكرًا لمساهمتك في تحسين مكالمات تيليجرام.</string>
<string name="VoipAnsweringAsAccount">سيتم الرد باسم %s</string>
<string name="VoipQuickReplies">الرد برسالة</string>
@ -2112,13 +2161,13 @@
<string name="AllowCustomQuickReply">السماح برسائل مخصصة</string>
<string name="VoipInCallBrandingWithName">مكالمة تيليجرام مع %s</string>
<string name="VoipErrorUnknown">لا يمكن إجراء مكالمة تيليجرام حاليًا.</string>
<string name="RateCallEcho">I heard my own voice</string>
<string name="RateCallNoise">I heard background noise</string>
<string name="RateCallInterruptions">The other side kept disappearing</string>
<string name="RateCallDistorted">Speech was distorted</string>
<string name="RateCallEcho">سمعتُ صوتي</string>
<string name="RateCallNoise">سمعت ضوضاء في الخلفية</string>
<string name="RateCallInterruptions">كان صوت الشخص الآخر يختفي</string>
<string name="RateCallDistorted">لم يكن الكلام واضحًا</string>
<string name="RateCallSilentLocal">لم أتمكن من سماع الطرف الآخر</string>
<string name="RateCallSilentRemote">The other side couldn\'t hear me</string>
<string name="RateCallDropped">Call ended unexpectedly</string>
<string name="RateCallSilentRemote">لم يسمعني الطرف الآخر</string>
<string name="RateCallDropped">انتهت المكالمة فجأة</string>
<!--plural-->
<string name="Recipient_zero">لا يوجد مستقبلون</string>
<string name="Recipient_one">مستقبل واحد</string>
@ -2288,12 +2337,12 @@
<string name="Exception_few">%1$d استثناءات</string>
<string name="Exception_many">%1$d استثناء</string>
<string name="Exception_other">%1$d استثناء</string>
<string name="RemovedUser_zero">%1$d removed users</string>
<string name="RemovedUser_one">%1$d removed user</string>
<string name="RemovedUser_two">%1$d removed users</string>
<string name="RemovedUser_few">%1$d removed users</string>
<string name="RemovedUser_many">%1$d removed users</string>
<string name="RemovedUser_other">%1$d removed users</string>
<string name="RemovedUser_zero">%1$d مستخدم تمت إزالته</string>
<string name="RemovedUser_one">مستخدمٌ واحد تمت إزالته</string>
<string name="RemovedUser_two">مستخدمين إثنين تمت إزالتهم</string>
<string name="RemovedUser_few">%1$d مستخدمين تمت إزالتهم</string>
<string name="RemovedUser_many">%1$d مستخدمًا تمت إزالتهم</string>
<string name="RemovedUser_other">%1$d مستخدم تمت إزالته</string>
<string name="Points_zero">%1$d</string>
<string name="Points_one">%1$d</string>
<string name="Points_two">%1$d</string>

View File

@ -363,8 +363,10 @@
<string name="EditAdminAddUsers">Nutzer hinzufügen</string>
<string name="EditAdminAddUsersViaLink">Nutzer per Link einladen</string>
<string name="EditAdminPinMessages">Nachrichten anheften</string>
<string name="EditAdminPromotedBy">Hinzugefügt von %1$s</string>
<string name="EditAdminPromotedBy">Befördert von %1$s</string>
<string name="EditAdminCantEdit">Du kannst die Rechte dieses Admins nicht bearbeiten.</string>
<string name="EditCantEditPermissions">Diese Berechtigung kannst du nicht bearbeiten.</string>
<string name="EditCantEditPermissionsPublic">Diese Berechtigung ist in öffentlichen Gruppen nicht verfügbar.</string>
<string name="UserRemovedBy">Entfernt von %1$s</string>
<string name="UserRestrictions">Nutzerberechtigungen</string>
<string name="UserRestrictionsDisabled">In den Gruppenberechtigungen ist diese Option für alle deaktiviert worden</string>
@ -529,7 +531,7 @@
<string name="EventLogPromotedAddUsers">Nutzer hinzufügen</string>
<string name="EventLogPromotedPinMessages">Nachrichten anheften</string>
<string name="EventLogFilterAll">Alle Aktionen</string>
<string name="EventLogFilterNewRestrictions">Neue Ausnahme</string>
<string name="EventLogFilterNewRestrictions">Neue Ausnahmen</string>
<string name="EventLogFilterNewAdmins">Neue Admins</string>
<string name="EventLogFilterNewMembers">Neue Mitglieder</string>
<string name="EventLogFilterGroupInfo">Gruppen-Info</string>
@ -701,7 +703,7 @@
<string name="ChatYourSelfName">Du</string>
<string name="GroupEmptyTitle1">Du hast eine **Gruppe** erstellt</string>
<string name="GroupEmptyTitle2">Gruppen bieten:</string>
<string name="GroupDescription1">Platz für bis zu 100.000 Mitglieder</string>
<string name="GroupDescription1">Platz für bis zu 200.000 Mitglieder</string>
<string name="GroupDescription2">Dauerhaften Chat-Verlauf</string>
<string name="GroupDescription3">Öffentliche Links, wie t.me/title</string>
<string name="GroupDescription4">Admins mit unterschiedlichen Rechten</string>
@ -1020,6 +1022,7 @@
<!--theme view-->
<string name="Theme">Thema</string>
<string name="AutoNightTheme">Auto-Nachtmodus</string>
<string name="AutoNightThemeOff">Aus</string>
<string name="AutoNightDisabled">Aus</string>
<string name="AutoNightScheduled">Geplant</string>
<string name="AutoNightAutomatic">Automatisch</string>
@ -1040,17 +1043,19 @@
<string name="EnterThemeName">Einen Namen festlegen</string>
<string name="CloseEditor">EDITOR SCHLIESSEN</string>
<string name="SaveTheme">THEMA SPEICHERN</string>
<string name="NewTheme">Neues Thema</string>
<string name="NewTheme">Neues Farbthema</string>
<string name="ColorTheme">Farbthema</string>
<string name="CreateTheme">THEMA ERSTELLEN</string>
<string name="ApplyTheme">ANWENDEN</string>
<string name="ThemePreview">Vorschau</string>
<string name="SelectColor">Farbe wählen</string>
<string name="CreateNewTheme">Neues Thema erstellen</string>
<string name="CreateNewThemeMenu">Neues Thema erstellen</string>
<string name="CreateNewThemeHelp">Tippe auf das kleine Palettensymbol um eine Auswahl des jeweiligen Bildschirms anzuzeigen und wähle deine Wunschfarben.</string>
<string name="CreateNewThemeInfo">Erstelle dein eigenes Thema, indem du die Farben innerhalb der App änderst. Hier kannst du jederzeit zum vorgegebenen Telegram Thema zurückwechseln.</string>
<string name="CreateNewThemeAlert">Du kannst dein eigenes Farbthema erstellen, indem du die Farben innerhalb der App änderst.\n\nJederzeit kannst du hier zum Standard-Farbthema von Telegram zurückkehren.</string>
<!--settings view-->
<string name="ResetNotificationsText">Alle Einstellungen für Mitteilungen zurücksetzen</string>
<string name="ResetNotificationsAlert">Möchtest du wirklich alle Benachrichtigungseinstellungen auf die Standardeinstellungen zurücksetzen?</string>
<string name="TextSize">Textgröße für Nachrichten</string>
<string name="TextSizeHeader">Textgröße für Nachrichten</string>
<string name="AskAQuestion">Eine Frage stellen</string>
<string name="EnableAnimations">Animationen aktivieren</string>
<string name="ChatSettings">Chat-Einstellungen</string>
@ -1111,10 +1116,41 @@
<string name="BackgroundBlurred">Unscharf</string>
<string name="BackgroundMotion">Bewegung</string>
<string name="ChatBackground">Chat-Hintergrundbild</string>
<string name="ResetChatBackgrounds">Chat-Hintergrundbilder zurücksetzen</string>
<string name="ResetChatBackgroundsInfo">Das löscht alle hochgeladenen Chat-Hintergründe und stellt die vorinstallierten Hintergründe für alle Themen wieder her.</string>
<string name="ResetChatBackgroundsAlert">Möchtest du wirklich alle Chat-Hintergründe zurücksetzen?</string>
<string name="DeleteChatBackgroundsAlert">Möchtest du wirklich die ausgewählten Hintergründe löschen?</string>
<string name="BackgroundPreview">Hintergrundvorschau</string>
<string name="BackgroundPreviewLine1">Tipp: Einige Bilder sehen unscharf besser aus.</string>
<string name="BackgroundPreviewLine2">Vielen Dank!</string>
<string name="BackgroundPreviewLine2">Juhu, danke. Das wird mein Leben verändern.</string>
<string name="BackgroundColorPreviewLine1">Für mehr Farben, nach links oder rechts wischen.</string>
<string name="BackgroundColorPreviewLine2">Lachs ist ein Fisch, keine Farbe.</string>
<string name="FontSizePreviewReply">Reinhardt, wir müssen dir unbedingt...</string>
<string name="FontSizePreviewLine1">Oh je, ihr mit eurer Techno-Musik! Genießt lieber Klassiker, wie Hasselhoff!</string>
<string name="FontSizePreviewLine2">Nicht wirklich dein Ernst, oder?</string>
<string name="BackgroundColorSinglePreviewLine1">\'Festlegen\' antippen, um den Hintergrund anzuwenden.</string>
<string name="BackgroundColorSinglePreviewLine2">Genieße die Ansicht</string>
<string name="SetBackground">HINTERGRUND FESTLEGEN</string>
<string name="SearchByColor">Nach Farbe suchen</string>
<string name="SearchBackgrounds">Hintergrund suchen</string>
<string name="BackgroundSearchColor">Farbe:</string>
<string name="BackgroundBrightness">Helligkeit</string>
<string name="BackgroundHexColorCode">Hex-Farbcode</string>
<string name="BackgroundColor">Farbe</string>
<string name="BackgroundPattern">Muster</string>
<string name="BackgroundIntensity">Sichtbarkeit</string>
<string name="Blue">Blau</string>
<string name="Red">Rot</string>
<string name="Orange">Orange</string>
<string name="Yellow">Gelb</string>
<string name="Green">Grün</string>
<string name="Teal">Blaugrün</string>
<string name="Purple">Violett</string>
<string name="Pink">Rosa</string>
<string name="Brown">Braun</string>
<string name="Black">Schwarz</string>
<string name="Gray">Grau</string>
<string name="White">Weiß</string>
<string name="SelectColorTitle">Wähle eine Farbe</string>
<string name="UploadImage">Bild hochladen</string>
<string name="SelectImage">Bild auswählen</string>
@ -1544,10 +1580,22 @@
<string name="FingerprintHelp">Berührungssensor</string>
<string name="FingerprintNotRecognized">Fingerabdruck wurde nicht erkannt. Bitte erneut versuchen.</string>
<string name="ScreenCapture">App-Inhalte nach Sperrung anzeigen</string>
<string name="ScreenCaptureInfo">Wenn du diese Funktion deaktivierst, wird du keine Bildschirmfotos mehr in der App aufnehmen können und Chatinhalte werden in der Liste der geöffneten App ausgeblendet.</string>
<string name="ScreenCaptureInfo">Wenn du diese Funktion deaktivierst, wirst du keine Bildschirmfotos mehr in der App aufnehmen können und Chatinhalte werden in der Liste der geöffneten App ausgeblendet.</string>
<string name="ScreenCaptureAlert">Das wird die Inhalte der Chatliste oder Chats in der Liste der geöffneten Apps verstecken, du wirst jedch keine Bildschirmfotos aufnehmen können. \n\nDu wirst die App nach der Änderung neu starten müssen.</string>
<string name="TooManyTries">Zu viele Versuche.\nBitte erneut in %1$s versuchen.</string>
<!--media view-->
<string name="January">Januar</string>
<string name="February">Februar</string>
<string name="March">März</string>
<string name="April">April</string>
<string name="May">Mai</string>
<string name="June">Juni</string>
<string name="July">Juli</string>
<string name="August">August</string>
<string name="September">September</string>
<string name="October">Oktober</string>
<string name="November">November</string>
<string name="December">Dezember</string>
<string name="SharedFilesTab">DATEIEN</string>
<string name="SharedMediaTab">MEDIEN</string>
<string name="SharedLinksTab">LINKS</string>
@ -1612,6 +1660,7 @@
<string name="Gallery">Galerie</string>
<string name="AllPhotos">Alle Bilder</string>
<string name="AllMedia">Alle Medien</string>
<string name="AllVideos">Alle Videos</string>
<string name="NoPhotos">Noch keine Bilder</string>
<string name="PleaseDownload">Medien bitte zuerst herunterladen</string>
<string name="PleaseStreamDownload">Bitte warte, bis das Video vollständig heruntergeladen wurde.</string>
@ -1974,7 +2023,7 @@
<string name="AreYouSureSecretChat">Geheimen Chat starten?</string>
<string name="AreYouSureRegistration">Bist du dir sicher, dass du die Registrierung abbrechen willst?</string>
<string name="StopVerification">"Möchtest du wirklich den Verifikationsvorgang stoppen? "</string>
<string name="AreYouSureClearHistoryWithUser">Wirklich deinen Verlauf with **%1$s** leeren?</string>
<string name="AreYouSureClearHistoryWithUser">Wirklich deinen Verlauf mit **%1$s** leeren?</string>
<string name="AreYouSureClearHistoryWithSecretUser">Wirklich den geheimen Verlauf bei dir und **%1$s** leeren?</string>
<string name="AreYouSureClearHistoryWithChat">Wirklich den Verlauf mit **%1$s** leeren?</string>
<string name="AreYouSureClearHistory">Möchtest du wirklich den Verlauf löschen?</string>
@ -2098,8 +2147,8 @@
<string name="CallEmojiKeyTooltip">Wenn diese Emoji genau so bei %1$s aussehen, ist euer Anruf 100%% sicher.</string>
<string name="CallMessageReportProblem">Anruf bewerten</string>
<string name="CallReportHint">Was klappte nicht?</string>
<string name="CallReportIncludeLogs">Technische Infos senden</string>
<string name="CallReportLogsExplain">Das hilft uns das Problem schneller zu beseitigen. Die Inhalte deiner Konversation werden nicht angezeigt.</string>
<string name="CallReportIncludeLogs">Technische Infos mitsenden</string>
<string name="CallReportLogsExplain">Wird die Inhalte deiner Chats nicht anzeigen und hilft uns das Problem schneller zu beseitigen.</string>
<string name="CallReportSent">Danke, dass du uns hilfst, Telegram-Anrufe zu verbessern.</string>
<string name="VoipAnsweringAsAccount">Mit %s beantworten</string>
<string name="VoipQuickReplies">Mit Nachricht antworten</string>
@ -2114,11 +2163,11 @@
<string name="VoipErrorUnknown">Telegram-Anruf kann im Moment nicht geführt werden.</string>
<string name="RateCallEcho">Ich hörte ein Echo</string>
<string name="RateCallNoise">Ich hörte Rauschen</string>
<string name="RateCallInterruptions">Die andere Seite war zwischendurch nicht zu hören</string>
<string name="RateCallInterruptions">Partner war nicht immer zu hören</string>
<string name="RateCallDistorted">Sprache klang verzerrt</string>
<string name="RateCallSilentLocal">Ich konnte die andere Seite nicht hören</string>
<string name="RateCallSilentRemote">Die andere Seite konnte mich nicht hören</string>
<string name="RateCallDropped">Anruf wurde unerwartet beendet</string>
<string name="RateCallSilentLocal">Ich konnte nichts hören</string>
<string name="RateCallSilentRemote">Ich konnte nicht gehört werden</string>
<string name="RateCallDropped">Anruf unerwartet beendet</string>
<!--plural-->
<string name="Recipient_zero">%1$d Empfänger</string>
<string name="Recipient_one">%1$d Empfänger</string>

View File

@ -363,11 +363,13 @@
<string name="EditAdminAddUsers">Añadir usuarios</string>
<string name="EditAdminAddUsersViaLink">Invitar con un enlace</string>
<string name="EditAdminPinMessages">Anclar mensajes</string>
<string name="EditAdminPromotedBy">Añadido por %1$s</string>
<string name="EditAdminPromotedBy">Promovido por %1$s</string>
<string name="EditAdminCantEdit">No puedes editar los privilegios de este administrador.</string>
<string name="EditCantEditPermissions">No puedes editar este permiso.</string>
<string name="EditCantEditPermissionsPublic">Este permiso no está disponible en grupos públicos.</string>
<string name="UserRemovedBy">Eliminado por %1$s</string>
<string name="UserRestrictions">Permisos de usuario</string>
<string name="UserRestrictionsDisabled">Esta opción está desactivada para todos los miembros en los permisos de grupo</string>
<string name="UserRestrictionsDisabled">Esta opción está desactivada para todos los miembros en los Permisos de grupo</string>
<string name="UserRestrictionsCanDo">¿Qué puede hacer este usuario?</string>
<string name="UserRestrictionsRead">Leer mensajes</string>
<string name="UserRestrictionsSend">Enviar mensajes</string>
@ -529,7 +531,7 @@
<string name="EventLogPromotedAddUsers">Añadir usuarios</string>
<string name="EventLogPromotedPinMessages">Anclar mensajes</string>
<string name="EventLogFilterAll">Todas las acciones</string>
<string name="EventLogFilterNewRestrictions">Nueva excepción</string>
<string name="EventLogFilterNewRestrictions">Nuevas excepciones</string>
<string name="EventLogFilterNewAdmins">Nuevos administradores</string>
<string name="EventLogFilterNewMembers">Nuevos miembros</string>
<string name="EventLogFilterGroupInfo">Información del grupo</string>
@ -701,7 +703,7 @@
<string name="ChatYourSelfName"></string>
<string name="GroupEmptyTitle1">Has creado un **grupo**.</string>
<string name="GroupEmptyTitle2">Los grupos pueden tener:</string>
<string name="GroupDescription1">Hasta 100 000 miembros</string>
<string name="GroupDescription1">Hasta 200 000 miembros</string>
<string name="GroupDescription2">Historial de chat persistente</string>
<string name="GroupDescription3">Enlaces públicos como t.me/title</string>
<string name="GroupDescription4">Administradores con diferentes permisos</string>
@ -1020,6 +1022,7 @@
<!--theme view-->
<string name="Theme">Tema</string>
<string name="AutoNightTheme">Modo nocturno automático</string>
<string name="AutoNightThemeOff">Desactivado</string>
<string name="AutoNightDisabled">Desactivado</string>
<string name="AutoNightScheduled">Programado</string>
<string name="AutoNightAutomatic">Automático</string>
@ -1041,16 +1044,18 @@
<string name="CloseEditor">CERRAR EDITOR</string>
<string name="SaveTheme">GUARDAR TEMA</string>
<string name="NewTheme">Nuevo tema</string>
<string name="ColorTheme">Tema</string>
<string name="CreateTheme">CREAR TEMA</string>
<string name="ApplyTheme">APLICAR</string>
<string name="ThemePreview">Vista previa del tema</string>
<string name="SelectColor">Elegir color</string>
<string name="CreateNewTheme">Crear nuevo tema</string>
<string name="CreateNewThemeMenu">Crear nuevo tema</string>
<string name="CreateNewThemeHelp">Toca sobre el icono de la paleta de colores para ver la lista de elementos en cada ventana y editarlos.</string>
<string name="CreateNewThemeInfo">Puedes crear tu propio tema cambiando los colores en la aplicación. Siempre puedes volver al tema por defecto de Telegram aquí.</string>
<string name="CreateNewThemeAlert">Puedes crear tu propio tema cambiando los colores dentro de la aplicación.\n\nSiempre puedes volver al tema por defecto de Telegram aquí.</string>
<!--settings view-->
<string name="ResetNotificationsText">Restablecer las notificaciones</string>
<string name="ResetNotificationsAlert">¿Quieres restablecer todos los ajustes de notificaciones?</string>
<string name="TextSize">Tamaño del texto</string>
<string name="TextSizeHeader">Tamaño del texto</string>
<string name="AskAQuestion">Hacer una pregunta</string>
<string name="EnableAnimations">Activar animaciones</string>
<string name="ChatSettings">Ajustes de chat</string>
@ -1111,10 +1116,41 @@
<string name="BackgroundBlurred">Difuminado</string>
<string name="BackgroundMotion">Movimiento</string>
<string name="ChatBackground">Fondo de chat</string>
<string name="ResetChatBackgrounds">Restablecer fondos de chat</string>
<string name="ResetChatBackgroundsInfo">Elimina todos los fondos de chat subidos y restaura los preinstalados.</string>
<string name="ResetChatBackgroundsAlert">¿Quieres restablecer todos los fondos de chat?</string>
<string name="DeleteChatBackgroundsAlert">¿Quieres eliminar los fondos seleccionados?</string>
<string name="BackgroundPreview">Vista previa del fondo</string>
<string name="BackgroundPreviewLine1">Pista: algunas imágenes de fondo se ven mejor con el efecto difuminado.</string>
<string name="BackgroundPreviewLine2">¡Gracias!</string>
<string name="BackgroundPreviewLine1">Pista: algunas imágenes de fondo se ven mejor difuminadas.</string>
<string name="BackgroundPreviewLine2">¡Woo-hoo! ¡Gracias!</string>
<string name="BackgroundColorPreviewLine1">Desliza a la izquierda o derecha para ver más colores</string>
<string name="BackgroundColorPreviewLine2">Es salmón es un pez, no un color.</string>
<string name="FontSizePreviewReply">Reinhardt, necesitamos encontrarte algunas nuevas canciones &#127926;.</string>
<string name="FontSizePreviewLine1">¡Ah! Los niños de hoy en día con la música tecno. Disfruten los clásicos, ¡como Hasselhoff!</string>
<string name="FontSizePreviewLine2">Con eso ya no puedo tomarte en serio.</string>
<string name="BackgroundColorSinglePreviewLine1">Pulsa Establecer para aplicar el fondo.</string>
<string name="BackgroundColorSinglePreviewLine2">Disfruta de la vista.</string>
<string name="SetBackground">ESTABLECER FONDO</string>
<string name="SearchByColor">Buscar por color</string>
<string name="SearchBackgrounds">Buscar fondos</string>
<string name="BackgroundSearchColor">Color:</string>
<string name="BackgroundBrightness">Brillo</string>
<string name="BackgroundHexColorCode">Código de color hexadecimal</string>
<string name="BackgroundColor">Color</string>
<string name="BackgroundPattern">Patrón</string>
<string name="BackgroundIntensity">Intensidad</string>
<string name="Blue">Azul</string>
<string name="Red">Rojo</string>
<string name="Orange">Naranja</string>
<string name="Yellow">Amarillo</string>
<string name="Green">Verde</string>
<string name="Teal">Turquesa</string>
<string name="Purple">Púrpura</string>
<string name="Pink">Rosa</string>
<string name="Brown">Marrón</string>
<string name="Black">Negro</string>
<string name="Gray">Gris</string>
<string name="White">Blanco</string>
<string name="SelectColorTitle">Elige un color</string>
<string name="UploadImage">Subir imagen</string>
<string name="SelectImage">Elegir una imagen</string>
@ -1502,7 +1538,7 @@
<string name="SessionsTitle">Sesiones activas</string>
<string name="CurrentSession">Sesión actual</string>
<string name="NoOtherSessions">Sin otras sesiones activas</string>
<string name="NoOtherSessionsInfo">Puedes iniciar sesión en Telegram desde otro móvil, tablet o computador, usando el mismo número de teléfono. Todos tus datos se sincronizarán al instante.</string>
<string name="NoOtherSessionsInfo">Puedes iniciar sesión en Telegram desde otro móvil, tablet o PC, usando el mismo número de teléfono. Todos tus datos se sincronizarán al instante.</string>
<string name="OtherSessions">Sesiones activas</string>
<string name="SessionsInfo">Controla tus sesiones en otros dispositivos.</string>
<string name="TerminateSessionInfo">Toca una sesión para cerrarla.</string>
@ -1548,6 +1584,18 @@
<string name="ScreenCaptureAlert">Esto ocultará los contenidos de tus chats o tu lista de chats en la multitarea, pero no podrás hacer capturas de pantalla en Telegram.\n\nTendrás que reiniciar la app para que esto surta efecto.</string>
<string name="TooManyTries">Demasiados intentos.\nPor favor, reinténtalo en %1$s.</string>
<!--media view-->
<string name="January">Enero</string>
<string name="February">Febrero</string>
<string name="March">Marzo</string>
<string name="April">Abril</string>
<string name="May">Mayo</string>
<string name="June">Junio</string>
<string name="July">Julio</string>
<string name="August">Agosto</string>
<string name="September">Septiembre</string>
<string name="October">Octubre</string>
<string name="November">Noviembre</string>
<string name="December">Diciembre</string>
<string name="SharedFilesTab">ARCHIVOS</string>
<string name="SharedMediaTab">MEDIA</string>
<string name="SharedLinksTab">ENLACES</string>
@ -1612,6 +1660,7 @@
<string name="Gallery">Galería</string>
<string name="AllPhotos">Todas las fotos</string>
<string name="AllMedia">Toda la multimedia</string>
<string name="AllVideos">Todos los videos</string>
<string name="NoPhotos">Aún no hay fotos</string>
<string name="PleaseDownload">Por favor, primero descarga la multimedia</string>
<string name="PleaseStreamDownload">Por favor, espera hasta que se descargue el video completamente.</string>
@ -2099,7 +2148,7 @@
<string name="CallMessageReportProblem">Evaluar llamada</string>
<string name="CallReportHint">¿Qué salió mal?</string>
<string name="CallReportIncludeLogs">Incluir información técnica</string>
<string name="CallReportLogsExplain">Esto no revelará los contenidos de tu conversación, pero nos ayudará a resolver el problema más pronto.</string>
<string name="CallReportLogsExplain">Esto no revela los contenidos de tu chat y nos ayuda a resolver el problema antes.</string>
<string name="CallReportSent">Gracias por ayudarnos a mejorar las llamadas de Telegram.</string>
<string name="VoipAnsweringAsAccount">Contestando como %s</string>
<string name="VoipQuickReplies">Responder con mensaje</string>
@ -2114,7 +2163,7 @@
<string name="VoipErrorUnknown">No se puede establecer una llamada de Telegram en este momento.</string>
<string name="RateCallEcho">Escuché mi propia voz</string>
<string name="RateCallNoise">Escuché ruido de fondo</string>
<string name="RateCallInterruptions">La otra parte siguió desapareciendo</string>
<string name="RateCallInterruptions">La otra parte desaparecía</string>
<string name="RateCallDistorted">El habla estaba distorsionada</string>
<string name="RateCallSilentLocal">No pude escuchar a la otra parte</string>
<string name="RateCallSilentRemote">La otra parte no me pudo escuchar</string>

View File

@ -231,8 +231,8 @@
<string name="NewChannel">Nuovo canale</string>
<string name="EnterChannelName">Nome del canale</string>
<string name="AddMutual">Aggiungi contatti al tuo canale</string>
<string name="ChannelUsernameHelp">Le persone possono condividere questo link con gli altri e trovare il tuo canale usando la ricerca di Telegram.</string>
<string name="MegaUsernameHelp">Le persone possono condividere questo link con gli altri e trovare il tuo gruppo usando la ricerca di Telegram.</string>
<string name="ChannelUsernameHelp">Se imposti un link permanente, le altre persone potranno trovare il tuo canale e unirsi.\n\nPuoi usare a-z, 0-9 e underscore .\nLa lunghezza minima è di 5 caratteri.</string>
<string name="MegaUsernameHelp">Se imposti un link permanente, le altre persone potranno trovare il tuo gruppo e unirsi.\n\nPuoi usare a-z, 0-9 e underscore .\nLa lunghezza minima è di 5 caratteri.</string>
<string name="ChannelUsernamePlaceholder">link</string>
<string name="ChannelPrivateLinkHelp">Le persone possono unirsi al tuo canale seguendo questo link. Puoi revocare il link in ogni momento.</string>
<string name="MegaPrivateLinkHelp">Le persone possono unirsi al tuo gruppo seguendo questo link. Puoi revocare il link in ogni momento.</string>
@ -364,7 +364,9 @@
<string name="EditAdminAddUsersViaLink">Invitare utenti tramite link</string>
<string name="EditAdminPinMessages">Fissare messaggi</string>
<string name="EditAdminPromotedBy">Promosso da %1$s</string>
<string name="EditAdminCantEdit">Non puoi modificare i privilegi di questo amministratore.</string>
<string name="EditAdminCantEdit">Non puoi modificare i permessi di questo amministratore.</string>
<string name="EditCantEditPermissions">Non puoi modificare questo permesso.</string>
<string name="EditCantEditPermissionsPublic">Questo permesso non è disponibile nei gruppi pubblici.</string>
<string name="UserRemovedBy">Rimosso da %1$s</string>
<string name="UserRestrictions">Permessi utente</string>
<string name="UserRestrictionsDisabled">Questa opzione è disattivata per tutti i membri nei permessi del gruppo.</string>
@ -375,18 +377,18 @@
<string name="UserRestrictionsSendPolls">Inviare sondaggi</string>
<string name="UserRestrictionsSendStickers">Inviare stickers e GIF</string>
<string name="UserRestrictionsEmbedLinks">Inviare link con anteprima</string>
<string name="UserRestrictionsChangeInfo">Change Chat Info</string>
<string name="UserRestrictionsChangeInfo">Cambiare le info chat</string>
<string name="UserRestrictionsPinMessages">Fissare messaggi</string>
<string name="UserRestrictionsInviteUsers">Aggiungere utenti</string>
<string name="UserRestrictionsNoRead">can\'t read</string>
<string name="UserRestrictionsNoSend">can\'t send messages</string>
<string name="UserRestrictionsNoSendMedia">no media</string>
<string name="UserRestrictionsNoSendPolls">no polls</string>
<string name="UserRestrictionsNoSendStickers">no stickers &amp; GIFs</string>
<string name="UserRestrictionsNoEmbedLinks">no embed links</string>
<string name="UserRestrictionsNoChangeInfo">can\'t change Info</string>
<string name="UserRestrictionsNoPinMessages">no pins</string>
<string name="UserRestrictionsNoInviteUsers">can\'t add users</string>
<string name="UserRestrictionsNoRead">non legge</string>
<string name="UserRestrictionsNoSend">non invia messaggi</string>
<string name="UserRestrictionsNoSendMedia">niente media</string>
<string name="UserRestrictionsNoSendPolls">niente sondaggi</string>
<string name="UserRestrictionsNoSendStickers">niente sticker e GIF</string>
<string name="UserRestrictionsNoEmbedLinks">niente link</string>
<string name="UserRestrictionsNoChangeInfo">non cambia le info</string>
<string name="UserRestrictionsNoPinMessages">non fissa</string>
<string name="UserRestrictionsNoInviteUsers">non aggiunge utenti</string>
<string name="UserRestrictionsDuration">Durata</string>
<string name="UserRestrictionsUntilForever">Sempre</string>
<string name="UserRestrictionsBlock">Blocca e rimuovi dal gruppo</string>
@ -518,7 +520,7 @@
<string name="EventLogRestrictedSendMessages">Inviare messaggi</string>
<string name="EventLogRestrictedSendEmbed">Inviare link con anteprima</string>
<string name="EventLogRestrictedReadMessages">Leggere messaggi</string>
<string name="EventLogPromoted">ha cambiato i privilegi di %1$s</string>
<string name="EventLogPromoted">ha cambiato i permessi di %1$s</string>
<string name="EventLogPromotedChangeChannelInfo">Modificare le info del canale</string>
<string name="EventLogPromotedChangeGroupInfo">Modificare le info del gruppo</string>
<string name="EventLogPromotedPostMessages">Pubblicare messaggi</string>
@ -588,7 +590,7 @@
<string name="IsSendingPhoto">%1$s sta inviando una foto...</string>
<string name="InstantView">APERTURA RAPIDA</string>
<string name="OpenGroup">APRI GRUPPO</string>
<string name="OpenBackground">VIEW BACKGROUND</string>
<string name="OpenBackground">VISUALIZZA SFONDO</string>
<string name="OpenChannel">APRI CANALE</string>
<string name="OpenMessage">APRI MESSAGGIO</string>
<string name="InstantViewNightMode">Il tema scuro si attiverà automaticamente durante la notte</string>
@ -701,10 +703,10 @@
<string name="ChatYourSelfName">Tu</string>
<string name="GroupEmptyTitle1">Hai creato un **gruppo**.</string>
<string name="GroupEmptyTitle2">I gruppi possono avere:</string>
<string name="GroupDescription1">Fino a 100.000 membri</string>
<string name="GroupDescription1">Fino a 200.000 membri</string>
<string name="GroupDescription2">Cronologia chat permanente</string>
<string name="GroupDescription3">Link pubblici come t.me/title</string>
<string name="GroupDescription4">Amministratori con privilegi diversi</string>
<string name="GroupDescription4">Amministratori con permessi diversi</string>
<string name="ChatYourSelfDescription1">Inoltra i messaggi qui per salvarli</string>
<string name="ChatYourSelfDescription2">Invia media e file per archiviarli</string>
<string name="ChatYourSelfDescription3">Accedi alla chat da ogni dispositivo</string>
@ -1020,6 +1022,7 @@
<!--theme view-->
<string name="Theme">Tema</string>
<string name="AutoNightTheme">Modalità notte automatica</string>
<string name="AutoNightThemeOff">No</string>
<string name="AutoNightDisabled">Disattivata</string>
<string name="AutoNightScheduled">Programmata</string>
<string name="AutoNightAutomatic">Automatica</string>
@ -1041,16 +1044,18 @@
<string name="CloseEditor">CHIUDI EDITOR</string>
<string name="SaveTheme">SALVA TEMA</string>
<string name="NewTheme">Nuovo tema</string>
<string name="ColorTheme">Tema</string>
<string name="CreateTheme">CREA TEMA</string>
<string name="ApplyTheme">APPLICA</string>
<string name="ThemePreview">Anteprima tema</string>
<string name="SelectColor">Seleziona colore</string>
<string name="CreateNewTheme">Crea nuovo tema</string>
<string name="CreateNewThemeMenu">Crea nuovo tema</string>
<string name="CreateNewThemeHelp">Tocca sull\'icona della tavolozza per vedere la lista degli elementi in ogni schermata - e modificarli.</string>
<string name="CreateNewThemeInfo">Puoi creare il tuo tema cambiando i colori all\'interno dell\'app. Puoi sempre tornare al tema predefinito di Telegram qui.</string>
<string name="CreateNewThemeAlert">Puoi creare il tuo tema cambiando i colori all\'interno dell\'app.\n\nPuoi sempre tornare al tema Telegram di default qui.</string>
<!--settings view-->
<string name="ResetNotificationsText">Ripristina tutte le impostazioni di notifica predefinite</string>
<string name="ResetNotificationsAlert">Sei sicuro di voler ripristinare tutte le impostazioni di notifica sui valori predefiniti?</string>
<string name="TextSize">Dimensione testo messaggi</string>
<string name="TextSizeHeader">Dimensione testo messaggi</string>
<string name="AskAQuestion">Fai una domanda</string>
<string name="EnableAnimations">Attiva animazioni</string>
<string name="ChatSettings">Impostazioni chat</string>
@ -1111,10 +1116,41 @@
<string name="BackgroundBlurred">Sfocato</string>
<string name="BackgroundMotion">Prospettiva</string>
<string name="ChatBackground">Sfondo chat</string>
<string name="ResetChatBackgrounds">Ripristina sfondi chat</string>
<string name="ResetChatBackgroundsInfo">Rimuove tutti gli sfondi chat caricati e ripristina quelli predefiniti.</string>
<string name="ResetChatBackgroundsAlert">Sei sicuro di voler ripristinare tutti gli sfondi chat?</string>
<string name="DeleteChatBackgroundsAlert">Sei sicuro di voler eliminare gli sfondi selezionati?</string>
<string name="BackgroundPreview">Anteprima sfondo</string>
<string name="BackgroundPreviewLine1">Suggerimento: alcuni sfondi appaiono migliori con l\'effetto sfocato.</string>
<string name="BackgroundPreviewLine2">Grazie!</string>
<string name="BackgroundPreviewLine1">Suggerimento: alcuni sfondi appaiono migliori quando sfocati.</string>
<string name="BackgroundPreviewLine2">Woo-hoo! Grazie!</string>
<string name="BackgroundColorPreviewLine1">Scorri a sinistra o destra per vedere altri colori.</string>
<string name="BackgroundColorPreviewLine2">Il salmone è un pesce, non un colore.</string>
<string name="FontSizePreviewReply">Reinhart, dobbiamo trovarti qualche nuova canzone &#127926;.</string>
<string name="FontSizePreviewLine1">Ah, i ragazzi di oggi con la musica techno! Godetevi i classici, come Hasselhoff!</string>
<string name="FontSizePreviewLine2">Non posso prenderti sul serio adesso.</string>
<string name="BackgroundColorSinglePreviewLine1">Premi \'Imposta\' per applicare lo sfondo.</string>
<string name="BackgroundColorSinglePreviewLine2">Goditi la vista.</string>
<string name="SetBackground">IMPOSTA SFONDO</string>
<string name="SearchByColor">Cerca per colore</string>
<string name="SearchBackgrounds">Cerca sfondi</string>
<string name="BackgroundSearchColor">Colore:</string>
<string name="BackgroundBrightness">Luminosità</string>
<string name="BackgroundHexColorCode">Codice colore esadecimale</string>
<string name="BackgroundColor">Colore</string>
<string name="BackgroundPattern">Motivo</string>
<string name="BackgroundIntensity">Intensità</string>
<string name="Blue">Blu</string>
<string name="Red">Rosso</string>
<string name="Orange">Arancione</string>
<string name="Yellow">Giallo</string>
<string name="Green">Verde</string>
<string name="Teal">Turchese</string>
<string name="Purple">Viola</string>
<string name="Pink">Rosa</string>
<string name="Brown">Marrone</string>
<string name="Black">Nero</string>
<string name="Gray">Grigio</string>
<string name="White">Bianco</string>
<string name="SelectColorTitle">Seleziona un colore</string>
<string name="UploadImage">Carica immagine</string>
<string name="SelectImage">Seleziona immagine</string>
@ -1317,7 +1353,7 @@
<string name="PassportRequestedInformation">Informazioni richieste</string>
<string name="PassportProvidedInformation">Informazioni fornite\n</string>
<string name="PassportInfoTitle">Cos\'è Telegram Passport?</string>
<string name="PassportInfo2">With Telegram Passport you can easily sign up for websites and services that require identity verification.\n\nYour information, personal data, and documents are protected by end-to-end encryption. Nobody, including Telegram, can access them without your permission.\n\nYou can visit our *FAQ* to learn more.</string>
<string name="PassportInfo2">Con Telegram Passport puoi facilmente iscriverti a siti web e servizi che richiedono la verifica dell\'identità.\n\nLe tue informazioni, i tuoi dati personali e i tuoi documenti sono protetti dalla crittografia end-to-end. Nessuno, incluso Telegram, può accedervi senza la tua autorizzazione.\n\nPuoi visitare le nostre *FAQ* per saperne di più.</string>
<string name="PassportInfoUrl">https://telegram.org/faq/it/#passport</string>
<string name="TelegramPassportCreatePasswordInfo">Per favore crea una password per rendere sicuri i tuoi dati personali tramite crittografia end-to-end.\n\nQuesta password sarà inoltre richiesta ogni volta che accedi a Telegram su un nuovo dispositivo.</string>
<string name="TelegramPassportCreatePassword">CREA UNA PASSWORD</string>
@ -1543,11 +1579,23 @@
<string name="FingerprintInfo">Conferma impronta digitale per continuare</string>
<string name="FingerprintHelp">Sensore touch</string>
<string name="FingerprintNotRecognized">Impronta digitale non riconosciuta. Riprova.</string>
<string name="ScreenCapture">Consenti cattura schermo</string>
<string name="ScreenCapture">Mosta contenuto nelle app recenti</string>
<string name="ScreenCaptureInfo">Se disattivata, non potrai fare screenshot nell\'app, ma il sistema nasconderà il contenuto delle chat nella lista delle app recenti.</string>
<string name="ScreenCaptureAlert">This will hide the contents of your chats or chat list from the task switcher, but you will not be able to take screenshots on Telegram.\n\nYou may need to restart the app for this to take effect.</string>
<string name="ScreenCaptureAlert">Questo nasconderà il contenuto delle chat o dell\'elenco chat dalla lista della app recenti, ma non sarà possibile effettuare screenshot su Telegram.\n\nPotrebbe essere necessario riavviare l\'applicazione affinché questo abbia effetto.</string>
<string name="TooManyTries">Troppi tentativi.\nPer favore riprova tra %1$s.</string>
<!--media view-->
<string name="January">Gennaio</string>
<string name="February">Febbraio</string>
<string name="March">Marzo</string>
<string name="April">Aprile</string>
<string name="May">Maggio</string>
<string name="June">Giugno</string>
<string name="July">Luglio</string>
<string name="August">Agosto</string>
<string name="September">Settembre</string>
<string name="October">Ottobre</string>
<string name="November">Novembre</string>
<string name="December">Dicembre</string>
<string name="SharedFilesTab">FILE</string>
<string name="SharedMediaTab">MEDIA</string>
<string name="SharedLinksTab">LINK</string>
@ -1612,6 +1660,7 @@
<string name="Gallery">Galleria</string>
<string name="AllPhotos">Tutte le foto</string>
<string name="AllMedia">Tutti i media</string>
<string name="AllVideos">Tutti i video</string>
<string name="NoPhotos">Ancora nessuna foto</string>
<string name="PleaseDownload">Scarica prima il file</string>
<string name="PleaseStreamDownload">Per favore attendi che il video sia scaricato completamente.</string>
@ -2084,7 +2133,7 @@
<string name="VoipPeerOutdated">L\'app di **%1$s** non supporta le chiamate. Deve aggiornare la sua app prima che tu possa chiamarlo.</string>
<string name="VoipRateCallAlert">Per favore valuta la qualità della tua chiamata Telegram</string>
<string name="VoipNeedMicPermission">Telegram deve accedere al microfono per poter effettuare chiamate.</string>
<string name="VoipFeedbackCommentHint">Aggiungi un commento opzionale</string>
<string name="VoipFeedbackCommentHint">Aggiungi un commento facoltativo</string>
<string name="CallBack">Richiama</string>
<string name="CallAgain">Richiama</string>
<string name="DefaultRingtone">Default</string>
@ -2099,7 +2148,7 @@
<string name="CallMessageReportProblem">Valuta la chiamata</string>
<string name="CallReportHint">Cosa è andato storto?</string>
<string name="CallReportIncludeLogs">Includi informazioni tecniche</string>
<string name="CallReportLogsExplain">Questo non rivelerà i contenuti della tua conversazione, ma ci aiuterà a risolvere il problema più velocemente.</string>
<string name="CallReportLogsExplain">Non rivela i contenuti della chat e ci aiuta a risolvere il problema più velocemente.</string>
<string name="CallReportSent">Grazie per aver contribuito a rendere le chiamate di Telegram migliori.</string>
<string name="VoipAnsweringAsAccount">Rispondi come %s</string>
<string name="VoipQuickReplies">Rispondi con messaggio</string>
@ -2114,11 +2163,11 @@
<string name="VoipErrorUnknown">Impossibile effettuare una chiamata Telegram al momento.</string>
<string name="RateCallEcho">Sentivo la mia stessa voce</string>
<string name="RateCallNoise">Sentivo dei rumori di fondo</string>
<string name="RateCallInterruptions">Gli altri continuavano a sparire</string>
<string name="RateCallInterruptions">Sentivo gli altri a tratti</string>
<string name="RateCallDistorted">La voce era distorta</string>
<string name="RateCallSilentLocal">Non riuscivo a sentire gli altri</string>
<string name="RateCallSilentRemote">Gli altri non riuscivano a sentirmi</string>
<string name="RateCallDropped">La chiamata è terminata inaspettatamente</string>
<string name="RateCallDropped">Chiamata terminata inaspettatamente</string>
<!--plural-->
<string name="Recipient_zero">%1$d destinatari</string>
<string name="Recipient_one">%1$d destinatario</string>

View File

@ -49,13 +49,13 @@
<string name="OtherLoginCode">Your login code is **%1$s**. Enter it in the Telegram app where you are trying to log in.\n\nDo not give this code to anyone.</string>
<!--signup view-->
<string name="YourName">성명</string>
<string name="RegisterText2">Please enter your full name and upload your profile picture.</string>
<string name="RegisterText2">회원님의 성함을 입력하고 프로필 사진을 업로드해 주세요.</string>
<string name="FirstName">이름 (필수)</string>
<string name="LastName">성 (선택)</string>
<string name="CancelRegistration">가입 취소</string>
<!--payments view-->
<string name="PaymentSuccessfullyPaid">%3$s의 %1$s어치 금액을 %2$s에 송금하셨습니다</string>
<string name="PaymentSuccessfullyPaidNoItem">%1$s어치 금액을 %2$s에 송금하셨습니다</string>
<string name="PaymentSuccessfullyPaid">%2$s에 %1$s어치 %3$s에 대한 금액을 송금하셨습니다</string>
<string name="PaymentSuccessfullyPaidNoItem">" %2$s에 %1$s 금액을 송금하셨습니다"</string>
<string name="PaymentCheckout">체크아웃</string>
<string name="PaymentShippingMethod">배송 방법</string>
<string name="PaymentNoShippingMethod">죄송합니다. 회원님의 주소로는 배송해 드리기가 어렵습니다.</string>
@ -82,7 +82,7 @@
<string name="PaymentCardName">성명</string>
<string name="PaymentCardSavePaymentInformation">결제 정보 저장</string>
<string name="PaymentCardSavePaymentInformationInfoLine1">향후 사용을 위하여 결제 정보를 저장할 수 있습니다.</string>
<string name="PaymentCardSavePaymentInformationInfoLine2">이 기능을 사용하려면 *2단계 인증을 켜* 주세요.</string>
<string name="PaymentCardSavePaymentInformationInfoLine2">이 기능을 사용하려면 *2단계 인증을 활성화*해 주세요.</string>
<string name="PaymentTransactionReview">거래내역 확인</string>
<string name="PaymentTransactionMessage">%3$s에 대한 %1$s 금액을 %2$s 봇에게 전송하시겠습니까?</string>
<string name="PaymentTransactionTotal">전체</string>
@ -110,7 +110,7 @@
<string name="PaymentPasswordInfo">결제 정보를 보호하려면 비밀번호를 만들어 주세요. 로그인 할 때 입력하라는 메시지가 나타날 것입니다.</string>
<string name="PaymentPasswordEmailTitle">복구 이메일</string>
<string name="PaymentPasswordEmail">이메일 주소</string>
<string name="PaymentPasswordEmailInfo">정확한 이메일을 입력해 주세요. 분실한 비밀번호를 찾으실 유일한 방법입니다.</string>
<string name="PaymentPasswordEmailInfo">정확한 이메일을 입력해 주세요. 잊어버린 비밀번호를 되찾으실 유일한 수단입니다.</string>
<string name="PaymentPhoneToProvider">전화번호가 %1$s 님에게 결제 정보로서 전달됩니다.</string>
<string name="PaymentEmailToProvider">이메일이 %1$s 님에게 결제 정보로서 전달됩니다.</string>
<string name="PaymentPhoneEmailToProvider">전화번호와 이메일이 %1$s 님에게 청구서 정보로서 전달됩니다.</string>
@ -143,10 +143,10 @@
<string name="EncryptedChatStartedOutgoing">%s 님이 비밀 대화에 들어왔습니다.</string>
<string name="EncryptedChatStartedIncoming">비밀 대화에 들어오셨습니다.</string>
<string name="ClearHistory">대화 내용 비우기</string>
<string name="HistoryClearedUndo">History cleared.</string>
<string name="ChatDeletedUndo">Chat deleted.</string>
<string name="GroupDeletedUndo">그룹이 삭제되었습니다.</string>
<string name="ChannelDeletedUndo">Channel deleted.</string>
<string name="HistoryClearedUndo">내용을 비웠습니다.</string>
<string name="ChatDeletedUndo">대화방을 삭제했습니다.</string>
<string name="GroupDeletedUndo">그룹을 삭제했습니다.</string>
<string name="ChannelDeletedUndo">채널을 삭제했습니다.</string>
<string name="Undo">되돌리기</string>
<string name="ClearHistoryCache">캐시에서 삭제</string>
<string name="DeleteChat">삭제하고 나가기</string>
@ -172,13 +172,13 @@
<string name="LinkPreview">링크 미리보기</string>
<string name="Draft">임시 저장</string>
<string name="HistoryCleared">대화 내용을 비웠습니다</string>
<string name="ArticleByAuthor">%1$s 이내</string>
<string name="ArticleByAuthor">%1$s 작성</string>
<string name="ArticleDateByAuthor">%1$s, %2$s 작성</string>
<string name="PreviewFeedback">미리보기에 대한 의견 남기기</string>
<string name="SendStickerPreview">스티커 보내기</string>
<string name="ViewPackPreview">보기</string>
<string name="ViewPackPreview">묶음 들여다보기</string>
<string name="PinToTop">맨 위에 고정</string>
<string name="PinToTopLimitReached">Sorry, you can pin no more than %1$s to the top.</string>
<string name="PinToTopLimitReached">죄송합니다. %1$s까지 위쪽에 고정하실 수 있습니다.</string>
<string name="UnpinFromTop">맨 위 고정 해제</string>
<string name="MarkAsUnread">읽지 않음으로 표시</string>
<string name="MarkAsRead">읽음으로 표시</string>
@ -192,18 +192,18 @@
<string name="YourContacts">텔레그램에 있는 회원님의 연락처</string>
<!--channels-->
<string name="SetAsAdmin">관리자로 승격</string>
<string name="EditAdminRights">Edit admin rights</string>
<string name="NoBlockedUsers">차단된 사용자가 없습니다</string>
<string name="EditAdminRights">관리자 권한 수정</string>
<string name="NoBlockedUsers">추방된 사용자가 없습니다</string>
<string name="DeleteMega">그룹 삭제</string>
<string name="LeaveMegaMenu">그룹 나가기</string>
<string name="DeleteMegaMenu">그룹 삭제</string>
<string name="MegaDeleteInfo">그룹에 있는 메시지가 모두 사라집니다.</string>
<string name="MegaAdminsInfo">그룹을 관리하는 데 도움을 줄 관리자를 추가하실 수 있습니다. 관리자를 제명하려면 길게 누르세요.</string>
<string name="MegaDeleteAlert">잠깐! 그룹을 삭제하면 참가자가 모두 추방되고 메시지는 모두 사라집니다. 그래도 그룹을 삭제할까요?</string>
<string name="MegaDeleteAlert">잠깐! 그룹을 삭제하시면 참가자와 메시지가 모두 사라집니다. 그래도 그룹을 삭제할까요?</string>
<string name="ActionCreateMega">그룹 만들어짐</string>
<string name="MegaAddedBy">un1 님이 회원님을 이 그룹에 초대했습니다</string>
<string name="MegaLeaveAlert">정말 그룹에서 나가시겠습니까?</string>
<string name="MegaLeaveAlertWithName">정말 **%1$s** 그룹 나가시겠습니까?</string>
<string name="MegaLeaveAlertWithName">정말 **%1$s** 그룹에서 나가시겠습니까?</string>
<string name="GroupUserCantAdd">죄송합니다. 이 사용자는 그룹에 추가하실 수 없습니다.</string>
<string name="GroupUserAddLimit">죄송합니다, 그룹의 인원이 최대치입니다.</string>
<string name="GroupUserLeftError">죄송합니다. 이 사용자는 스스로 그룹에서 나갔기에, 다시 초대하실 수 없습니다.</string>
@ -226,30 +226,30 @@
<string name="ActionPinnedMusic">un1 님이 오디오 파일을 고정했습니다</string>
<string name="ActionMigrateFromGroup">그룹이 슈퍼그룹으로 업그레이드되었습니다</string>
<string name="ActionMigrateFromGroupNotify">%1$s 그룹이 슈퍼그룹으로 업그레이드됐습니다</string>
<string name="NoBlockedGroup2">Users removed from the group by the admins can\'t rejoin via invite links.</string>
<string name="NoBlockedChannel2">Users removed from the channel by the admins can\'t rejoin via invite links.</string>
<string name="NoBlockedGroup2">관리자가 그룹에서 추방시킨 사용자는 초대 링크를 통해 다시 들어올 수 없습니다.</string>
<string name="NoBlockedChannel2">관리자가 채널에서 추방시킨 사용자는 초대 링크를 통해 다시 들어올 수 없습니다.</string>
<string name="NewChannel">채널 만들기</string>
<string name="EnterChannelName">채널명</string>
<string name="AddMutual">채널에 연락 상대 추가</string>
<string name="ChannelUsernameHelp">사람들이 위 링크를 공유하거나 텔레그램 검색을 이용하여 채널을 찾을 수 있습니다.</string>
<string name="MegaUsernameHelp">사람들이 위 링크를 공유하거나 텔레그램 검색을 이용하여 그룹을 찾을 수 있습니다.</string>
<string name="ChannelUsernameHelp">영구 링크를 설정하시면, 다른 사람들이 회원님의 채널을 찾아 들어올 수 있습니다.\n\na부터 z 사이 글자, 0부터 9 사이 숫자와 밑줄을 사용하실 수 있습니다.\n최소 길이는 다섯 자입니다.</string>
<string name="MegaUsernameHelp">영구 링크를 설정하시면, 다른 사람들이 회원님의 그룹을 찾아 들어올 수 있습니다.\n\na부터 z 사이 글자, 0부터 9 사이 숫자와 밑줄을 사용하실 수 있습니다.\n최소 길이는 다섯 자입니다.</string>
<string name="ChannelUsernamePlaceholder">링크</string>
<string name="ChannelPrivateLinkHelp">사람들이 위 링크를 따라 회원님의 채널에 들어올 수 있습니다. 링크는 언제든지 폐기하실 수 있습니다.</string>
<string name="MegaPrivateLinkHelp">사람들이 위 링크를 따라 그룹에 들어올 수 있습니다. 링크는 언제든지 폐기하실 수 있습니다.</string>
<string name="DescriptionOptionalPlaceholder">설명 (선택)</string>
<string name="DescriptionPlaceholder">안내</string>
<string name="DescriptionInfo">채널에 해 안내해 주실 수 있습니다.</string>
<string name="GroupSettingsChangedAlert">You have changed some settings in this group. Apply changes?</string>
<string name="ChannelSettingsChangedAlert">You have changed some settings in this channel. Apply changes?</string>
<string name="DescriptionInfo">채널에 해 안내해 주실 수 있습니다.</string>
<string name="GroupSettingsChangedAlert">몇 가지 그룹 설정을 바꾸셨습니다. 변경 사항을 적용할까요?</string>
<string name="ChannelSettingsChangedAlert">몇 가지 채널 설정을 바꾸셨습니다. 변경 사항을 적용할까요?</string>
<string name="ChannelPublic">공개 채널</string>
<string name="MegaPublic">공개 그룹</string>
<string name="ChannelPublicInfo">공개 채널은 검색으로 찾을 수 있으며, 누구나 들어올 수 있습니다.</string>
<string name="MegaPublicInfo">공개 그룹은 검색으로 찾을 수 있으며 누구나 들어올 수 있습니다.</string>
<string name="MegaPublicInfo">공개 그룹은 검색으로 찾을 수 있고, 모두에게 대화 내용이 공개되며, 누구나 들어갈 수 있습니다.</string>
<string name="ChannelPrivate">비공개 채널</string>
<string name="MegaPrivate">비공개 그룹</string>
<string name="ChannelPrivateInfo">비공개 채널에는 초대 링크로만 들어올 수 있습니다.</string>
<string name="MegaPrivateInfo">비공개 그룹에는 초대되거나 초대 링크가 있는 경우에만 들어올 수 있습니다.</string>
<string name="ChannelLinkTitle">링크</string>
<string name="MegaPrivateInfo">비공개 그룹은 초대되거나 초대 링크가 있는 경우에만 들어갈 수 있습니다.</string>
<string name="ChannelLinkTitle">영구 링크</string>
<string name="ChannelInviteLinkTitle">초대 링크</string>
<string name="ChannelAddMembers">참가자 추가</string>
<string name="LeaveChannel">채널 나가기</string>
@ -271,23 +271,23 @@
<string name="LinkChecking">이름 확인 중..</string>
<string name="LinkAvailable">%1$s을(를) 사용하실 수 있습니다.</string>
<string name="ChannelMembers">참가자</string>
<string name="ChannelAddToGroup">Add to group</string>
<string name="ChannelAddToChannel">Add to channel</string>
<string name="ChannelDeleteFromList">Delete from this list</string>
<string name="ChannelAddToGroup">그룹에 추가</string>
<string name="ChannelAddToChannel">채널에 추가</string>
<string name="ChannelDeleteFromList">이 목록에서 삭제</string>
<string name="ChannelSubscribers">구독자</string>
<string name="ChannelBlacklist">블랙리스트</string>
<string name="ChannelPermissions">Permissions</string>
<string name="ChannelPermissionsHeader">What can members of this group do?</string>
<string name="ChannelAddException">Add Exception</string>
<string name="ChannelSearchException">Search Exceptions</string>
<string name="ChannelBlockedUsers">차단된 사용자</string>
<string name="ChannelBlacklist">추방된 사용자</string>
<string name="ChannelPermissions">권한</string>
<string name="ChannelPermissionsHeader">이 그룹의 참가자가 할 수 있는 일</string>
<string name="ChannelAddException">예외 추가</string>
<string name="ChannelSearchException">예외 검색</string>
<string name="ChannelBlockedUsers">추방된 사용자</string>
<string name="ChannelRestrictedUsers">제한된 사용자</string>
<string name="ChannelAdministrators">관리자</string>
<string name="ChannelDelete">채널 삭제</string>
<string name="ChannelDeleteMenu">채널 삭제</string>
<string name="ChannelDeleteAlert">잠깐만요! 이 채널을 삭제하시면 안에 있는 모든 참가자와 메시지가 사라집니다. 무시하고 삭제할까요?</string>
<string name="ChannelLeaveAlert">채널에서 나가시겠습니까?</string>
<string name="ChannelLeaveAlertWithName">Are you sure you want to leave **%1$s**?</string>
<string name="ChannelLeaveAlertWithName">정말 **%1$s** 채널에서 나가시겠습니까?</string>
<string name="ChannelDeleteInfo">채널에 있는 메시지가 모두 사라집니다.</string>
<string name="ChannelEdit">수정</string>
<string name="ChannelPublicEmptyUsername">사람들이 이 채널을 검색하여 찾고 공유할 수 있도록 링크를 설정해 주세요.\n\n이를 꺼리신다면, 비공개 채널을 추천해 드립니다.</string>
@ -301,12 +301,12 @@
<string name="ChannelMute">음소거</string>
<string name="ChannelUnmute">음소거 취소</string>
<string name="ChannelAddAdmin">관리자 추가</string>
<string name="ChannelBlockUser">사용자 차단</string>
<string name="ChannelBlockUser">사용자 추방</string>
<string name="Unban">차단 해제</string>
<string name="UnbanText">차단을 해제하려면 사용자를 길게 누르세요.</string>
<string name="ChannelInviteViaLink">링크로 초대</string>
<string name="ChannelRemoveUserAdmin">관리자 권한 회수</string>
<string name="ChannelEditPermissions">Edit permissions</string>
<string name="ChannelEditPermissions">권한 수정</string>
<string name="ChannelMembersInfo">채널 관리자만 이 목록을 볼 수 있습니다.</string>
<string name="ChannelLinkInfo">누구나 텔레그램을 설치했다면 위 링크를 따라 회원님의 채널에 들어올 수 있습니다.</string>
<string name="ChannelAdminsInfo">채널을 관리하는 데 도움을 줄 만한 관리자를 추가하실 수 있습니다. 관리자를 제명하려면 길게 누르세요.</string>
@ -342,15 +342,15 @@
<string name="ChannelMessageMusic">%1$s 채널이 오디오 파일을 게시했습니다</string>
<string name="ChannelMessageSticker">%1$s 채널이 스티커를 게시했습니다</string>
<string name="ChannelMessageStickerEmoji">%1$s 채널이 %2$s 스티커를 올렸습니다</string>
<string name="WhoCanAddMembers">누가 참가자를 추가할 수 있나요?</string>
<string name="WhoCanAddMembers">참가자를 추가할 수 있는 사람</string>
<string name="WhoCanAddMembersAllMembers">모든 참가자</string>
<string name="WhoCanAddMembersAdmins">관리자만</string>
<string name="ChannelNotifyMembersInfoOn">글을 게시하시면 참가자들이 알림을 받습니다</string>
<string name="ChannelNotifyMembersInfoOff">참가자들이 조용히 알림을 받습니다</string>
<string name="ChannelSignMessages">메시지 서명</string>
<string name="ChannelSignMessagesInfo">메시지에 게시한 관리자의 이름을 추가합니다.</string>
<string name="EditAdmin">관리자 수정</string>
<string name="EditAdminWhatCanDo">이 관리자는 무엇을 할 수 있나요?</string>
<string name="EditAdmin">관리자 권한</string>
<string name="EditAdminWhatCanDo">이 관리자가 할 수 있는 일</string>
<string name="EditAdminChangeChannelInfo">채널 정보 수정</string>
<string name="EditAdminChangeGroupInfo">그룹 정보 수정</string>
<string name="EditAdminPostMessages">메시지 게시</string>
@ -363,35 +363,37 @@
<string name="EditAdminAddUsers">사용자 추가</string>
<string name="EditAdminAddUsersViaLink">링크로 사용자 초대</string>
<string name="EditAdminPinMessages">메시지 고정</string>
<string name="EditAdminPromotedBy">%1$s 님이 추가함</string>
<string name="EditAdminPromotedBy">%1$s 님이 승격시킴</string>
<string name="EditAdminCantEdit">이 관리자의 권한을 수정하실 수 없습니다.</string>
<string name="UserRemovedBy">Removed by %1$s</string>
<string name="UserRestrictions">사용자 제한</string>
<string name="UserRestrictionsDisabled">This option is disabled for all members in Group Permissions</string>
<string name="UserRestrictionsCanDo">이 사용자는 무엇을 할 수 있나요?</string>
<string name="EditCantEditPermissions">이 권한을 수정하실 수 없습니다.</string>
<string name="EditCantEditPermissionsPublic">이 권한은 공개 그룹에서 부여되지 않습니다.</string>
<string name="UserRemovedBy">%1$s 님이 추방함</string>
<string name="UserRestrictions">사용자 권한</string>
<string name="UserRestrictionsDisabled">이 설정은 그룹 권한을 가진 참가자 모두에게서 꺼져 있습니다</string>
<string name="UserRestrictionsCanDo">이 사용자가 할 수 있는 일</string>
<string name="UserRestrictionsRead">메시지 읽기</string>
<string name="UserRestrictionsSend">메시지 보내기</string>
<string name="UserRestrictionsSendMedia">미디어 보내기</string>
<string name="UserRestrictionsSendPolls">Send Polls</string>
<string name="UserRestrictionsSendPolls">설문 보내기</string>
<string name="UserRestrictionsSendStickers">스티커 및 GIF 보내기</string>
<string name="UserRestrictionsEmbedLinks">링크 저장</string>
<string name="UserRestrictionsChangeInfo">Change Chat Info</string>
<string name="UserRestrictionsPinMessages">Pin Messages</string>
<string name="UserRestrictionsInviteUsers">Add Users</string>
<string name="UserRestrictionsNoRead">can\'t read</string>
<string name="UserRestrictionsNoSend">can\'t send messages</string>
<string name="UserRestrictionsNoSendMedia">no media</string>
<string name="UserRestrictionsNoSendPolls">no polls</string>
<string name="UserRestrictionsNoSendStickers">no stickers &amp; GIFs</string>
<string name="UserRestrictionsNoEmbedLinks">no embed links</string>
<string name="UserRestrictionsNoChangeInfo">can\'t change Info</string>
<string name="UserRestrictionsNoPinMessages">no pins</string>
<string name="UserRestrictionsNoInviteUsers">can\'t add users</string>
<string name="UserRestrictionsDuration">Duration</string>
<string name="UserRestrictionsChangeInfo">대화방 정보 수정</string>
<string name="UserRestrictionsPinMessages">메시지 고정</string>
<string name="UserRestrictionsInviteUsers">사용자 추가</string>
<string name="UserRestrictionsNoRead">읽기 금지</string>
<string name="UserRestrictionsNoSend">메시지 보내기 금지</string>
<string name="UserRestrictionsNoSendMedia">미디어 금지</string>
<string name="UserRestrictionsNoSendPolls">설문 금지</string>
<string name="UserRestrictionsNoSendStickers">스티커 및 GIF 금지</string>
<string name="UserRestrictionsNoEmbedLinks">링크 추가 금지</string>
<string name="UserRestrictionsNoChangeInfo">정보 수정 금지</string>
<string name="UserRestrictionsNoPinMessages">고정 금지</string>
<string name="UserRestrictionsNoInviteUsers">사용자 추가 금지</string>
<string name="UserRestrictionsDuration">기간</string>
<string name="UserRestrictionsUntilForever">영원히</string>
<string name="UserRestrictionsBlock">차단하고 그룹에서 추방</string>
<string name="UserRestrictionsApplyChanges">Apply Changes?</string>
<string name="UserRestrictionsApplyChangesText">You have changed this user\'s rights in **%1$s**. Apply changes?</string>
<string name="UserRestrictionsApplyChanges">변경 사항을 적용할까요?</string>
<string name="UserRestrictionsApplyChangesText">**%1$s**에서 사용자의 권한을 수정하셨습니다. 변경 사항을 적용할까요?</string>
<string name="ManageGroup">그룹 관리</string>
<string name="ManageChannel">채널 관리</string>
<string name="ManageGroupMenu">그룹 관리</string>
@ -401,29 +403,29 @@
<string name="ChatHistoryVisibleInfo">새로운 참가자는 들어오기 전부터 있던 메시지를 볼 수 있습니다.</string>
<string name="ChatHistoryHidden">숨김</string>
<string name="ChatHistoryHiddenInfo">새로운 참가자는 이전 메시지를 볼 수 없습니다.</string>
<string name="ChatHistoryHiddenInfo2">New members won\'t see more than 100 earlier messages.</string>
<string name="ChatHistoryHiddenInfo2">새로 온 참가자는 100개 이전의 메시지를 볼 수 없습니다.</string>
<string name="ProfileJoinChannel">채널 들어가기</string>
<string name="ProfileJoinGroup">그룹 들어가기</string>
<string name="GroupType">그룹 종류</string>
<string name="ChannelType">채널 종류</string>
<string name="GroupTypeHeader">Group type</string>
<string name="ChannelTypeHeader">Channel type</string>
<string name="GroupSettingsTitle">Group Settings</string>
<string name="ChannelSettingsTitle">Channel Settings</string>
<string name="GroupTypeHeader">그룹 종류</string>
<string name="ChannelTypeHeader">채널 종류</string>
<string name="GroupSettingsTitle">그룹 설정</string>
<string name="ChannelSettingsTitle">채널 설정</string>
<string name="TypePrivate">비공개</string>
<string name="TypePublic">공개</string>
<string name="TypePrivateGroup">비공개</string>
<string name="TypePublicGroup">공개</string>
<string name="ChoosePhoto">사진 선택</string>
<string name="ChooseTakePhoto">사진</string>
<string name="ChooseTakePhoto">카메라</string>
<string name="ChooseFromGallery">갤러리</string>
<string name="SelectFromGallery">Select from gallery</string>
<string name="SelectFromGallery">갤러리</string>
<string name="ChooseFromSearch">웹 검색</string>
<string name="Statistics">통계</string>
<string name="AddBotAsAdmin">Bots can only be added as administrators.</string>
<string name="CantAddBotAsAdmin">Sorry, bots can only be added to channels as administrators.</string>
<string name="MakeAdmin">MAKE ADMIN</string>
<string name="AdminWillBeRemoved">%1$s will be removed from admins if you restrict them.</string>
<string name="AddBotAsAdmin">봇에게 관리자 권한을 부여해야만 추가하실 수 있습니다.</string>
<string name="CantAddBotAsAdmin">죄송합니다. 봇에게 관리자 권한을 부여해야만 채널에 추가하실 수 있습니다.</string>
<string name="MakeAdmin">관리자 세우기</string>
<string name="AdminWillBeRemoved">%1$s 님을 제한하시면 이 사용자가 관리자에서 제명됩니다.</string>
<!--polls-->
<string name="NewPoll">새로운 설문</string>
<string name="Poll">설문</string>
@ -465,7 +467,7 @@
<string name="EventLogEmptySearch">**검색하신 활동이 없습니다**\n\n검색어에 해당하는 최근 활동을 찾지 못했습니다.</string>
<string name="EventLogEmptyTextSearch">\'**%1$s**\'에 관한 최근 활동을 찾지 못했습니다.</string>
<string name="EventLogInfoTitle">최근 활동이 무엇인가요?</string>
<string name="EventLogInfoDetail">지난 48시간 사이에 그룹 참가자와 관리자가 활동 기록입니다.</string>
<string name="EventLogInfoDetail">지난 48시간 사이에 그룹 참가자와 관리자가 행한 모든 서비스 활동 기록입니다.</string>
<string name="EventLogInfoDetailChannel">지난 48시간 사이에 채널 관리자가 활동한 기록입니다.</string>
<string name="EventLogEditedGroupTitle">un1 님이 그룹명을 \"%1$s\"(으)로 바꿨습니다</string>
<string name="EventLogEditedChannelTitle">un1 님이 채널명을 \"%1$s\"(으)로 바꿨습니다</string>
@ -499,22 +501,22 @@
<string name="EventLogRemovedChannelLink">un1 님이 채널 링크를 제거했습니다</string>
<string name="EventLogPreviousLink">기존 링크</string>
<string name="EventLogEditedGroupDescription">un1 님이 그룹 설명을 바꿨습니다:</string>
<string name="EventLogEditedChannelDescription">un1 님이 채널 설명을 바꿨습니다:</string>
<string name="EventLogPreviousGroupDescription">기존 설명</string>
<string name="EventLogEditedChannelDescription">un1 님이 채널 안내를 수정했습니다:</string>
<string name="EventLogPreviousGroupDescription">기존 안내</string>
<string name="EventLogToggledInvitesHistoryOn">un1&#160;님이 새로운 참가자에게 이전 대화 내용을 보이도록 설정했습니다</string>
<string name="EventLogToggledInvitesHistoryOff">un1 님이 새로운 참가자에게 이전 대화 내용이 보이지 않도록 설정했습니다</string>
<string name="EventLogToggledInvitesOn">un1 님이 그룹 초대를 허용함</string>
<string name="EventLogToggledInvitesOff">un1 님이 그룹 초대 기능을 껐습니다</string>
<string name="EventLogToggledSignaturesOn">un1 님이 서명 기능을 켰습니다</string>
<string name="EventLogToggledSignaturesOff">un1 님이 서명 기능을 껐습니다</string>
<string name="EventLogRestrictedUntil">%1$s 님에 대한 제한을 수정했습니다\n\n기한: %2$s</string>
<string name="EventLogDefaultPermissions">changed default permissions</string>
<string name="EventLogRestrictedUntil">%1$s 님의 권한을 수정했습니다\n\n기한: %2$s</string>
<string name="EventLogDefaultPermissions">기본 권한 수정</string>
<string name="EventLogRestrictedSendStickers">스티커 및 GIF 보내기</string>
<string name="EventLogRestrictedSendMedia">미디어 보내기</string>
<string name="EventLogRestrictedChangeInfo">Change info</string>
<string name="EventLogRestrictedInviteUsers">Add users</string>
<string name="EventLogRestrictedPinMessages">Pin messages</string>
<string name="EventLogRestrictedSendPolls">Send polls</string>
<string name="EventLogRestrictedChangeInfo">정보 수정</string>
<string name="EventLogRestrictedInviteUsers">사용자 추가</string>
<string name="EventLogRestrictedPinMessages">메시지 고정</string>
<string name="EventLogRestrictedSendPolls">설문 보내기</string>
<string name="EventLogRestrictedSendMessages">메시지 보내기</string>
<string name="EventLogRestrictedSendEmbed">링크 넣기</string>
<string name="EventLogRestrictedReadMessages">메시지 읽기</string>
@ -529,7 +531,7 @@
<string name="EventLogPromotedAddUsers">사용자 추가</string>
<string name="EventLogPromotedPinMessages">메시지 고정</string>
<string name="EventLogFilterAll">모든 활동</string>
<string name="EventLogFilterNewRestrictions">새로운 제한</string>
<string name="EventLogFilterNewRestrictions">새로운 예외</string>
<string name="EventLogFilterNewAdmins">새로운 관리자</string>
<string name="EventLogFilterNewMembers">새로운 참가자</string>
<string name="EventLogFilterGroupInfo">그룹 정보</string>
@ -588,7 +590,7 @@
<string name="IsSendingPhoto">%1$s 님이 사진을 보내는 중...</string>
<string name="InstantView">즉시 보기</string>
<string name="OpenGroup">그룹 보기</string>
<string name="OpenBackground">VIEW BACKGROUND</string>
<string name="OpenBackground">배경 보기</string>
<string name="OpenChannel">채널로 이동</string>
<string name="OpenMessage">메시지 보기</string>
<string name="InstantViewNightMode">어두운 테마가 밤 시간에 자동으로 켜집니다</string>
@ -661,10 +663,10 @@
<string name="NobodyLikesSpam1">죄송합니다. 지금은 서로 연락처를 교환한 경우에만 메시지를 보내실 수 있습니다.</string>
<string name="NobodyLikesSpam2">죄송합니다. 서로의 연락처를 공유해야만 그룹에 초대하실 수 있습니다.</string>
<string name="NobodyLikesSpam3">죄송합니다. 현재 회원님은 공개 그룹에 게시하실 수 없습니다.</string>
<string name="MoreInfo">더 보기</string>
<string name="MoreInfo">알아보기</string>
<string name="ShareSendTo">대화방 선택</string>
<string name="ShareComment">설명을 적으세요...</string>
<string name="TapHereGifs">저장 GIF 파일을 보려면 탭하세요.</string>
<string name="TapHereGifs">저장 GIF 파일을 보려면 탭하세요.</string>
<string name="PinMessage">고정</string>
<string name="PinNotify">모든 참가자에게 알리기</string>
<string name="UnpinMessage">고정 해제</string>
@ -699,12 +701,12 @@
<string name="SavedMessages">저장한 메시지</string>
<string name="SavedMessagesInfo">저장하려면 여기로 전달하세요</string>
<string name="ChatYourSelfName"></string>
<string name="GroupEmptyTitle1">You have created a **group**.</string>
<string name="GroupEmptyTitle2">Groups can have:</string>
<string name="GroupDescription1">Up to 100,000 members</string>
<string name="GroupDescription2">Persistent chat history</string>
<string name="GroupDescription3">Public links such as t.me/title</string>
<string name="GroupDescription4">Admins with different rights</string>
<string name="GroupEmptyTitle1">**그룹**을 만드셨습니다.</string>
<string name="GroupEmptyTitle2">그룹에는</string>
<string name="GroupDescription1">200,000명까지 참가할 수 있습니다</string>
<string name="GroupDescription2">대화 내용이 보존됩니다</string>
<string name="GroupDescription3">공개 링크를 t.me/제목 따위로 둘 수 있습니다</string>
<string name="GroupDescription4">관리자를 세울 수 있습니다</string>
<string name="ChatYourSelfDescription1">여기로 메시지를 전달해 저장하세요</string>
<string name="ChatYourSelfDescription2">미디어와 파일을 보내어 저장하세요</string>
<string name="ChatYourSelfDescription3">어느 기기에서나 이 대화방에 드나드세요.</string>
@ -730,8 +732,8 @@
<string name="AttachStickersRestrictedForever">그룹의 관리자가 회원님이 스티커를 보내시지 못하도록 제한했습니다.</string>
<string name="SendMessageRestrictedForever">그룹의 관리자가 회원님이 메시지를 적으실 수 없도록 제한했습니다.</string>
<string name="GlobalAttachMediaRestricted">이 그룹에서는 미디어를 보내실 수 없습니다.</string>
<string name="GlobalAttachInlineRestricted">이 그룹에서는 인라인 봇이 금지됩니다.</string>
<string name="GlobalAttachStickersRestricted">이 그룹에서는 스티커가 금지됩니다.</string>
<string name="GlobalAttachInlineRestricted">그룹에서 인라인 봇을 금지합니다.</string>
<string name="GlobalAttachStickersRestricted">그룹에서 스티커를 금지합니다.</string>
<string name="GlobalSendMessageRestricted">이 그룹에서는 메시지를 작성하실 수 없습니다.</string>
<string name="ChatAdmin">관리자</string>
<string name="ApkRestricted">이 앱에서는 APK 설치가 제한됩니다. 시스템 설정에서 이를 허용하실 수 있습니다.</string>
@ -750,7 +752,7 @@
<string name="MessageLifetimeChangedOutgoing">자동 삭제 타이머를 %1$s(으)로 맞추셨습니다</string>
<string name="MessageLifetimeRemoved">%1$s 님이 자동 삭제 타이머를 껐습니다</string>
<string name="MessageLifetimeYouRemoved">자동 삭제 타이머를 끄셨습니다</string>
<string name="YouHaveNewMessage">새로운 메시지</string>
<string name="YouHaveNewMessage">새로운 메시지가 왔습니다</string>
<string name="NotificationMessageText">%1$s: %2$s</string>
<string name="NotificationMessageFew">%1$s 님이 회원님에게 %2$s을(를) 보냈습니다</string>
<string name="NotificationMessageForwardFew">%1$s 님이 회원님에게 %2$s을(를) 전달했습니다</string>
@ -799,7 +801,7 @@
<string name="NotificationGroupKickYou">%1$s 님이 회원님을 %2$s 그룹에서 추방했습니다</string>
<string name="NotificationGroupLeftMember">%1$s 님이 %2$s 그룹에서 나갔습니다</string>
<string name="NotificationContactJoined">%1$s 님이 텔레그램에 가입했습니다!</string>
<string name="NotificationUnrecognizedDevice">%1$s 님,\n%2$s에 새로운 기기에서 회원님 계정으로 로그인한 것이 감지됐습니다.\n\n기기: %3$s\n위치: %4$s\n\n본인이 접속하지 않았다면, \'개인 정보 및 보안\' 설정에서 해당 세션을 종료하세요.\n\n만약 누군가 강제로 접속했다는 의심이 가신다면, \'개인 정보 및 보안\' 설정에서 2단계 인증을 활성화하실 수 있습니다.\n\n텔레그램 팀 드림</string>
<string name="NotificationUnrecognizedDevice">%1$s 님,\n%2$s에 새로운 기기가 회원님의 계정에 로그인한 것을 감지했습니다.\n\n기기: %3$s\n위치: %4$s\n\n본인이 아니라면 설정 — 모든 세션 보기에서 그 세션을 종료하실 수 있습니다.\n\n누군가가 회원님의 뜻과 달리 계정에 접속했다고 생각하시면, 설정에서 2단계 인증을 활성화하실 수 있습니다.\n\n감사합니다.\n\n텔레그램 팀</string>
<string name="NotificationContactNewPhoto">%1$s 님이 프로필 사진을 업데이트했습니다</string>
<string name="NotificationInvitedToGroupByLink">초대 링크를 통해 %1$s 님이 %2$s 그룹에 들어왔습니다.</string>
<string name="NotificationGroupFew">%1$s 님이 %2$s 그룹에 %3$s을(를) 보냈습니다</string>
@ -872,7 +874,7 @@
<string name="UpdateContactsTitle">연락처를 업데이트할까요?</string>
<string name="UpdateContactsMessage">텔레그램이 아직 동기화되지 않은 여러 연락처를 찾아냈습니다. 연락처를 동기화하시겠습니까? 본인의 기기, SIM 카드와 Google 계정을 사용하는 중이라면 \'확인\'을 누르십시오.</string>
<string name="SortedByName">이름순으로 정렬</string>
<string name="SortedByLastSeen">마지막 접속 시간순으로 정렬</string>
<string name="SortedByLastSeen">마지막 접속순으로 정렬</string>
<!--group create view-->
<string name="SendMessageTo">사람들을 추가하세요...</string>
<string name="SoftUserLimitAlert">이 그룹을 마저 만들고 슈퍼그룹으로 변환한 뒤에 사용자를 더 추가하실 수 있습니다.</string>
@ -887,7 +889,7 @@
<string name="EmailCopied">이메일을 클립보드에 복사했습니다</string>
<string name="InviteToGroupByLink">링크로 그룹에 초대하기</string>
<string name="InviteLink">초대 링크</string>
<string name="RevokeAlert">정말 이 초대 링크를 폐기할까요? 앞으로는 아무도 이 링크를 통해서 들어올 수 없습니다.</string>
<string name="RevokeAlert">정말 이 초대 링크를 폐기할까요? 앞으로 이 링크를 통하여 아무도 들어올 수 없습니다.</string>
<string name="RevokeAlertNewLink">이전 초대 링크는 현재 비활성화됐습니다. 새 초대 링크가 만들어졌습니다.</string>
<string name="RevokeButton">폐기</string>
<string name="RevokeLink">링크 폐기</string>
@ -906,7 +908,7 @@
<string name="BanFromTheGroup">그룹에서 차단</string>
<string name="DeleteAndExit">그룹 삭제하고 나가기</string>
<string name="Notifications">알림</string>
<string name="ChangePermissions">권한 바꾸기</string>
<string name="ChangePermissions">권한 수정</string>
<string name="KickFromGroup">그룹에서 추방</string>
<string name="UpgradeGroup">슈퍼그룹으로 업그레이드</string>
<string name="ConvertGroup">슈퍼그룹으로 변환</string>
@ -1020,10 +1022,11 @@
<!--theme view-->
<string name="Theme">테마</string>
<string name="AutoNightTheme">자동 야간 모드</string>
<string name="AutoNightThemeOff">끄기</string>
<string name="AutoNightDisabled">끄기</string>
<string name="AutoNightScheduled">예약</string>
<string name="AutoNightAutomatic">자동</string>
<string name="AutoNightSchedule">스케쥴</string>
<string name="AutoNightSchedule">예약</string>
<string name="AutoNightLocation">지역 일몰 및 일출 시간 사용</string>
<string name="AutoNightUpdateLocation">위치 갱신</string>
<string name="AutoNightUpdateLocationInfo">일몰 및 일출 시간을 계산하려면 회원님의 대략적인 위치를 한 번 확인해야 합니다. 이 위치는 회원님의 기기에만 로컬로 보관됩니다.\n\n일몰: %1$s\n일출: %2$s</string>
@ -1036,21 +1039,23 @@
<string name="ThemeDarkBlue">검푸른색</string>
<string name="ThemeBlue">파랑</string>
<string name="DeleteThemeAlert">이 테마를 삭제하시겠습니까?</string>
<string name="IncorrectTheme">올바르지 않은 테마 파일</string>
<string name="IncorrectTheme">올바르지 않은 테마 파일입니다</string>
<string name="EnterThemeName">테마명을 입력하세요</string>
<string name="CloseEditor">편집기 닫기</string>
<string name="SaveTheme">테마 저장</string>
<string name="NewTheme">새로운 테마</string>
<string name="NewTheme">새로운 색 테마</string>
<string name="ColorTheme">색 테마</string>
<string name="CreateTheme">새로운 테마</string>
<string name="ApplyTheme">적용</string>
<string name="ThemePreview">테마 미리보기</string>
<string name="SelectColor">색깔 선택</string>
<string name="CreateNewTheme">새로운 테마 만들기</string>
<string name="CreateNewThemeMenu">새로운 테마 만들기</string>
<string name="CreateNewThemeHelp">각 화면의 구성 요소 목록을 보려면 팔레트 아이콘을 누르세요. 이들을 수정하실 수 있습니다.</string>
<string name="CreateNewThemeInfo">앱 안 구석구석 색깔을 바꿔 회원님만의 테마를 만드실 수 있습니다. 언제든지 여기서 텔레그램 테마를 기본으로 돌리실 수 있습니다.</string>
<string name="CreateNewThemeAlert">앱 안에서 색들을 바꾸어 회원님만의 테마를 만드실 수 있습니다.\n\n여기서 언제든지 기본 텔레그램 테마로 돌리실 수 있습니다.</string>
<!--settings view-->
<string name="ResetNotificationsText">모든 알림 설정이 초기화됐습니다</string>
<string name="ResetNotificationsAlert">정말 모든 알림 설정을 기본으로 초기화하시겠습니까?</string>
<string name="TextSize">메시지 글자 크기</string>
<string name="TextSizeHeader">메시지 글자 크기</string>
<string name="AskAQuestion">질문하기</string>
<string name="EnableAnimations">화면 전환 효과 사용</string>
<string name="ChatSettings">대화방 설정</string>
@ -1071,7 +1076,7 @@
<string name="InAppPreview">앱 사용 중 미리보기</string>
<string name="Reset">초기화</string>
<string name="ResetAllNotifications">모든 알림 설정 초기화</string>
<string name="UndoAllCustom">연락처와 그룹, 채널에 대한 모든 맞춤 알림 설정을 처음 상태로 돌립니다.</string>
<string name="UndoAllCustom">연락처와 그룹에 대한 모든 맞춤 알림 설정을 처음 상태로 돌립니다.</string>
<string name="NotificationsAndSounds">알림 및 소리</string>
<string name="CustomNotifications">맞춤 알림</string>
<string name="ProfilePopupNotification">팝업 알림</string>
@ -1090,12 +1095,12 @@
<string name="FontSize">폰트 크기</string>
<string name="ColorViolet">보라색</string>
<string name="ColorOrange">주황색</string>
<string name="NotificationsLedInfo">LED는 일부 기기에서 새로운 메시지를 받았음을 나타내는 반짝이는 작은 빛입니다.</string>
<string name="NotificationsLedInfo">LED는 몇몇 기기에 있는 반짝이는 작은 빛으로 새로운 메시지가 왔음을 나타냅니다.</string>
<string name="PriorityInfo">우선순위가 높은 알림은 휴대폰이 방해 금지 상태이더라도 작동합니다.</string>
<string name="General">일반</string>
<string name="NotificationsMuted">음소거됨</string>
<string name="NotificationsUnmuted">음소거 해제</string>
<string name="NotificationsOn">켜짐</string>
<string name="NotificationsOn"></string>
<string name="NotificationsOff"></string>
<string name="NotificationsOffUntil">%1$s까지 끔</string>
<string name="NotificationsDefaultOn">기본 (켬)</string>
@ -1111,20 +1116,51 @@
<string name="BackgroundBlurred">흐림 효과가 적용됨</string>
<string name="BackgroundMotion">모션 효과</string>
<string name="ChatBackground">대화방 배경</string>
<string name="ResetChatBackgrounds">대화방 배경 초기화</string>
<string name="ResetChatBackgroundsInfo">업로드된 대화방 배경을 모두 제거하고 기본으로 설치된 배경을 복구합니다.</string>
<string name="ResetChatBackgroundsAlert">정말 모든 대화방 배경을 초기화하시겠습니까?</string>
<string name="DeleteChatBackgroundsAlert">정말 선택한 배경을 삭제하시겠습니까?</string>
<string name="BackgroundPreview">배경 미리보기</string>
<string name="BackgroundPreviewLine1">팁: 몇몇 배경에는 흐림 효과가 잘 어울립니다.</string>
<string name="BackgroundPreviewLine2">감사합니다!</string>
<string name="SetBackground">배경 설정</string>
<string name="BackgroundPreviewLine2">야호! 감사합니다</string>
<string name="BackgroundColorPreviewLine1">좌우로 넘겨 다양한 색을 입혀 보세요</string>
<string name="BackgroundColorPreviewLine2">Salmon is a fish, not a color.</string>
<string name="FontSizePreviewReply">라인하르트, 새 음악도 좀 들어보시지 그래요&#127926;?</string>
<string name="FontSizePreviewLine1">요즘 젊은이들은 테크노인지 뭔지 하는 것만 좋아한다니까! 핫셀호프 같은 고전 음악을 들어 보라고!</string>
<string name="FontSizePreviewLine2">이게 진심으로 하는 말이라니. 아으!</string>
<string name="BackgroundColorSinglePreviewLine1">\'설정\'을 눌러 배경을 적용하세요.</string>
<string name="BackgroundColorSinglePreviewLine2">경치가 장관이로구나!</string>
<string name="SetBackground">배경으로 설정</string>
<string name="SearchByColor">색으로 검색</string>
<string name="SearchBackgrounds">배경 검색</string>
<string name="BackgroundSearchColor">색:</string>
<string name="BackgroundBrightness">밝기</string>
<string name="BackgroundHexColorCode">Hex 색깔 코드</string>
<string name="BackgroundColor"></string>
<string name="BackgroundPattern">무늬</string>
<string name="BackgroundIntensity">세기</string>
<string name="Blue">파란색</string>
<string name="Red">빨간색</string>
<string name="Orange">주황색</string>
<string name="Yellow">노란색</string>
<string name="Green">초록색</string>
<string name="Teal">청록색</string>
<string name="Purple">보라색</string>
<string name="Pink">분홍색</string>
<string name="Brown">갈색</string>
<string name="Black">검은색</string>
<string name="Gray">회색</string>
<string name="White">하얀색</string>
<string name="SelectColorTitle">색 선택</string>
<string name="UploadImage">이미지 업로드</string>
<string name="SelectImage">이미지 선택</string>
<string name="LoadingFullImage">전체 이미지 로딩 중...</string>
<string name="LoadingFullImage">이미지 전체 불러오는 중...</string>
<string name="SetColor">색 설정</string>
<string name="MessagesSettings">메시지</string>
<string name="SendByEnter">엔터 키로 보내기</string>
<string name="Events">이벤트</string>
<string name="ContactJoined">친구의 텔레그램 가입</string>
<string name="PinnedMessages">고정된 메시지</string>
<string name="PinnedMessages">메시지 고정</string>
<string name="Language">언어</string>
<string name="LanguageCustom">맞춤</string>
<string name="LanguageTitle">언어를 바꿀까요?</string>
@ -1134,8 +1170,8 @@
<string name="LanguageUnofficial">비공식 언어</string>
<string name="LanguageUnsupportedError">해당 언어가 없습니다.</string>
<string name="LanguageSame">이미 이 언어 묶음(**%1$s**)을 사용하고 계십니다. 설정에서 언제든 언어를 바꾸실 수 있습니다.</string>
<string name="LanguageUnknownCustomAlert">안타깝게도 이 맞춤 언어 묶음(**%1$s**)에는 안드로이드 텔레그램용 데이터가 들어 있지 않습니다.</string>
<string name="AskAQuestionInfo">텔레그램에 관한 질문은 자원봉사자들이 답변해 드립니다. 신속하게 응답하기 위해 노력하지만, 다소 시간이 걸릴 수 있습니다.\n\n<![CDATA[<a href=\"https://telegram.org/faq#general\"> 자주 묻는 질문</a>]]>을 확인해 보세요. 잦은 질문에 대한 답과 <![CDATA[<a href=\"https://telegram.org/faq#troubleshooting\">문제 해결</a>]]>을 위한 중요한 조언이 있습니다.</string>
<string name="LanguageUnknownCustomAlert">안타깝게도 이 맞춤 언어 묶음(**%1$s**)에는 Android 텔레그램용 데이터가 들어 있지 않습니다.</string>
<string name="AskAQuestionInfo">텔레그램 지원 사항은 자원봉사자들이 처리합니다. 신속하게 응답해 드리고자 노력하지만, 다소 시간이 걸릴 수 있습니다.\n\n<![CDATA[<a href=\"https://telegram.org/faq#general\"> 자주 묻는 질문</a>]]>을 확인해 보세요. 잦은 질문에 대한 답과 <![CDATA[<a href=\"https://telegram.org/faq#troubleshooting\">문제 해결</a>]]>을 위한 중요한 조언이 있습니다.</string>
<string name="AskButton">봉사자에게 질문하기</string>
<string name="TelegramFAQ">자주 묻는 질문</string>
<string name="TelegramFaq">자주 묻는 질문</string>
@ -1148,8 +1184,8 @@
<string name="PrivacyPolicyUrl">https://telegram.org/privacy</string>
<string name="DeleteLocalization">언어를 삭제할까요?</string>
<string name="IncorrectLocalization">언어 파일이 올바르지 않습니다</string>
<string name="NotificationsService">항상 활성화 서비스</string>
<string name="NotificationsServiceInfo">앱이 닫히면 재시작합니다. 신뢰할 수 있는 알림을 사용하도록 설정합니다.</string>
<string name="NotificationsService">항상 실행 서비스</string>
<string name="NotificationsServiceInfo">앱이 닫히면 다시 실행합니다. 신뢰할 수 있는 알림을 활성화합니다.</string>
<string name="NotificationsServiceConnection">백그라운드 연결</string>
<string name="NotificationsServiceConnectionInfo">안정적인 알림을 위해 텔레그램의 백그라운드 연결을 최소로 유지합니다.</string>
<string name="SortBy">정렬</string>
@ -1171,7 +1207,7 @@
<string name="AutomaticMediaDownload">미디어 자동 다운로드</string>
<string name="AutoDownloadMedia">미디어 자동 다운로드</string>
<string name="ResetAutomaticMediaDownload">자동 다운로드 설정 초기화</string>
<string name="ResetAutomaticMediaDownloadAlert">자동 다운로드 설정을 정말 초기화하시겠습니까?</string>
<string name="ResetAutomaticMediaDownloadAlert">정말 자동 다운로드 설정을 초기화하시겠습니까?</string>
<string name="WhenUsingMobileData">모바일 데이터를 사용할 때</string>
<string name="WhenConnectedOnWiFi">Wi-Fi에 연결할 때</string>
<string name="WhenRoaming">로밍할 때</string>
@ -1191,8 +1227,8 @@
<string name="NotificationsPriorityUrgent">긴급</string>
<string name="RepeatNotificationsNever">사용 안 함</string>
<string name="RepeatNotifications">알림 반복</string>
<string name="PhoneNumberHelp">텔레그램 번호를 여기서 바꾸실 수 있습니다. 계정과 클라우드에 저장된 메시지나 미디어, 연락처 등이 새 번호로 옮겨집니다.\n\n**중요:** 텔레그램 연락 상대 중에서 회원님의 옛 전화번호가 있으며 차단되지 않은 모두에게 회원님의 **새 전화번호**가 추가됩니다.</string>
<string name="PhoneNumberAlert">텔레그램 연락 상대 중에서 회원님의 옛 전화번호가 있고 차단되지 않은 모두에게 회원님의 새 전화번호가 추가됩니다.</string>
<string name="PhoneNumberHelp">텔레그램 번호를 여기서 바꾸실 수 있습니다. 회원님의 계정과 메시지와 미디어, 연락처 따위의 모든 클라우드 데이터가 새 번호로 옮겨집니다.\n\n**중요:** 텔레그램 연락 상대 중에서 회원님의 옛 전화번호가 있으며 차단되지 않은 모두에게 회원님의 **새 전화번호**가 추가됩니다.</string>
<string name="PhoneNumberAlert">텔레그램 연락 상대 중에서 회원님의 옛 전화번호가 있고 차단되지 않은 모두에게 회원님의 새 전화번호가 저장됩니다.</string>
<string name="PhoneNumberChange">번호 바꾸기</string>
<string name="ChangePhoneNewNumber">새 번호</string>
<string name="ChangePhoneHelp">회원님의 새 번호로 인증 코드가 담긴 SMS를 보내겠습니다.</string>
@ -1282,14 +1318,14 @@
<string name="StickersAndMasks">스티커 및 마스크</string>
<string name="ThemeInfo">맞춤 색 배합 선택</string>
<string name="NotificationsForChats">대화방 알림</string>
<string name="NotificationsPrivateChats">비공개 대화방</string>
<string name="NotificationsPrivateChats"> 대화방</string>
<string name="NotificationsGroups">그룹</string>
<string name="NotificationsChannels">채널</string>
<string name="NotificationsExceptionsAlert">**%1$s**은(는) 예외로 분류되며 이번 변경 사항에 영향을 받지 않는다는 점을 유의해 주세요.</string>
<string name="NotificationsExceptionsSingleAlert">**%1$s** 님은 예외로 분류되어 이번 변경에 영향을 받지 않는다는 점을 유의하시기 바랍니다.</string>
<string name="NotificationsExceptionsAlert">**%1$s**는 예외로 분류되어 이번 변경에 영향을 받지 않는다는 점을 알아 두세요.</string>
<string name="NotificationsExceptionsSingleAlert">**%1$s**는 예외로 분류되어 이번 변경에 영향을 받지 않는다는 점을 알아 두세요.</string>
<string name="ViewExceptions">예외 보기</string>
<string name="NotificationsForGroups">그룹 알림</string>
<string name="NotificationsForPrivateChats">비공개 대화방 알림</string>
<string name="NotificationsForPrivateChats"> 대화방 알림</string>
<string name="NotificationsForChannels">채널 알림</string>
<string name="TapToChange">바꾸려면 누르세요</string>
<!--cache view-->
@ -1317,10 +1353,10 @@
<string name="PassportRequestedInformation">"요청 받은 정보 "</string>
<string name="PassportProvidedInformation">제공한 정보</string>
<string name="PassportInfoTitle">텔레그램 패스포트가 무엇인가요?</string>
<string name="PassportInfo2">With Telegram Passport you can easily sign up for websites and services that require identity verification.\n\nYour information, personal data, and documents are protected by end-to-end encryption. Nobody, including Telegram, can access them without your permission.\n\nYou can visit our *FAQ* to learn more.</string>
<string name="PassportInfo2">텔레그램 패스포트와 함께라면, 신분 인증이 필요한 여러 웹 사이트와 서비스에 손쉽게 로그인하실 수 있습니다.\n\n회원님의 정보와 개인 데이터, 서류들은 단대단 암호화로 보호됩니다. 텔레그램을 포함하여, 그 누구도 회원님의 허가 없이 이들에 접근할 수 없습니다.</string>
<string name="PassportInfoUrl">https://telegram.org/faq#passport</string>
<string name="TelegramPassportCreatePasswordInfo">단대단 암호화로 개인 데이터를 보호하려면 비밀번호를 만드셔야 합니다.\n\n새로운 기기로 텔레그램에 로그인할 때 이 비밀번호가 필요할 것입니다.</string>
<string name="TelegramPassportCreatePassword">비밀번호를 만드세요</string>
<string name="TelegramPassportCreatePassword">비밀번호 만들기</string>
<string name="TelegramPassportDelete">텔레그램 패스포트 삭제</string>
<string name="TelegramPassportDeleteAlert">정말 텔레그램 패스포트를 삭제하시겠습니까?</string>
<string name="PassportUseLatinOnly">로마자만 사용해 주세요.</string>
@ -1450,7 +1486,7 @@
<string name="PassportTwoDocuments">%1$s 또는 %2$s</string>
<string name="PassportNativeHeader">성명</string>
<string name="PassportNativeHeaderLang">%1$s 성명</string>
<string name="PassportNativeInfo">거주하시는 국가의 언어(%1$s)로 쓰인 성명입니다.</string>
<string name="PassportNativeInfo">거주하시는 국가의 언어(%1$s)로 성명을 작성하세요.</string>
<string name="PassportNameCheckAlert">성명이 올바른지 확인해 주세요.\n\n%1$s %2$s %3$s</string>
<string name="PassportLanguage_AR">아랍어</string>
<string name="PassportLanguage_AZ">아제르바이잔어</string>
@ -1499,13 +1535,13 @@
<string name="PassportLanguage_UZ">우즈베크어</string>
<string name="PassportLanguage_VI">베트남어</string>
<!--sessions view-->
<string name="SessionsTitle">활성화된 세션</string>
<string name="SessionsTitle">활성 세션</string>
<string name="CurrentSession">현재 세션</string>
<string name="NoOtherSessions">활성화된 다른 세션이 없습니다</string>
<string name="NoOtherSessionsInfo">동일한 전화번호를 사용하여 다른 모바일, 태블릿, 데스크탑 장치에서 텔레그램에 로그인하실 수 있습니다. 모든 데이터가 즉시 동기화됩니다.</string>
<string name="OtherSessions">활성화된 세션</string>
<string name="SessionsInfo">다른 기기 세션 관리</string>
<string name="TerminateSessionInfo">세션을 종료하려면 짧게 누르세요</string>
<string name="OtherSessions">활성 세션</string>
<string name="SessionsInfo">다른 기기 세션 관리하세요.</string>
<string name="TerminateSessionInfo">세션을 종료하려면 짧게 누르세요.</string>
<string name="TerminateSessionQuestion">이 세션을 종료할까요?</string>
<string name="ClearOtherSessionsHelp">이곳 밖의 모든 기기에서 로그아웃합니다.</string>
<string name="AreYouSureSessions">정말 다른 기기에 로그인된 세션을 모두 종료하시겠습니까?</string>
@ -1521,19 +1557,19 @@
<string name="TerminateAllWebSessions">모든 웹 사이트와 연결 끊기</string>
<string name="AreYouSureWebSessions">정말로 텔레그램을 사용하여 로그인한 모든 웹사이트의 연결을 해제하시겠습니까?</string>
<string name="ClearOtherWebSessionsHelp">텔레그램으로 로그인하기를 지원하는 웹 사이트에 로그인하실 수 있습니다.</string>
<string name="LoginAttempts">로그인 시도가 완료되지 않았습니다</string>
<string name="LoginAttempts">완료되지 않은 로그인 시도</string>
<string name="LoginAttemptsInfo">위 기기가 메시지에 접근할 수 없습니다. 코드는 알맞게 입력하셨으나, 비밀번호가 잘못되었습니다.</string>
<!--passcode view-->
<string name="Passcode">암호 잠금</string>
<string name="ChangePasscode">암호 바꾸기</string>
<string name="ChangePasscodeInfo">암호를 설정하시면 대화창에 잠금 아이콘이 표시됩니다. 텔레그램을 잠그거나 잠금 해제하려면 이 아이콘을 누르세요.\n\n주의: 암호를 잊어버리면 앱을 지우고 재설치하셔야 합니다. 이 경우 모든 비밀 대화가 사라집니다.</string>
<string name="ChangePasscodeInfo">암호를 설정하시면, 대화방 화면에 잠금 아이콘이 나타납니다. 이 아이콘을 눌러 텔레그램을 잠그거나 잠금 해제하실 수 있습니다.\n\n주의: 암호를 잊어버리면 앱을 삭제하고 다시 설치하셔야 합니다. 이 경우 모든 비밀 대화가 사라집니다.</string>
<string name="PasscodePIN">PIN</string>
<string name="PasscodePassword">암호</string>
<string name="EnterCurrentPasscode">현재 암호를 임력하세요</string>
<string name="EnterNewFirstPasscode">암호를 입력하세요.</string>
<string name="EnterNewFirstPasscode">암호를 입력하세요</string>
<string name="EnterNewPasscode">새 암호를 입력하세요</string>
<string name="EnterYourPasscode">암호를 입력하세요</string>
<string name="ReEnterYourPasscode">암호를 입력하세요</string>
<string name="ReEnterYourPasscode">암호를 다시 입력하세요</string>
<string name="PasscodeDoNotMatch">암호가 일치하지 않습니다.</string>
<string name="AutoLock">자동 잠금</string>
<string name="AutoLockInfo">일정 시간이 지나면 텔레그램을 잠급니다.</string>
@ -1543,11 +1579,23 @@
<string name="FingerprintInfo">계속하려면 지문인식 절차를 거치세요</string>
<string name="FingerprintHelp">터치 센서</string>
<string name="FingerprintNotRecognized">지문이 인식되지 않았습니다. 다시 시도해 주세요.</string>
<string name="ScreenCapture">화면 캡처 허용</string>
<string name="ScreenCaptureInfo">위 기능을 켜면, 앱 안에서 스크린샷을 찍으실 수 있으나, 암호가 설정된 경우에도 주고받은 대화가 최근 실행한 앱 목록에서 보입니다.\n적용이 안 된다면 앱을 재시작하세요.</string>
<string name="ScreenCaptureAlert">This will hide the contents of your chats or chat list from the task switcher, but you will not be able to take screenshots on Telegram.\n\nYou may need to restart the app for this to take effect.</string>
<string name="ScreenCapture">앱 전환 화면에서 대화 내용 드러내기</string>
<string name="ScreenCaptureInfo">위 기능을 끄면, 앱 안에서 화면을 캡처하실 수 없지만 앱 전환 화면에서 대화 내용이 숨겨집니다.</string>
<string name="ScreenCaptureAlert">앱 전환 화면에서 대화 내용이나 목록이 숨겨지지만, 텔레그램에서 스크린샷을 찍으실 수 없습니다.\n\n이 기능을 사용하려면 앱을 다시 시작하셔야 할 수도 있습니다.</string>
<string name="TooManyTries">너무 많이 시도하셨습니다.\n%1$s초 뒤에 다시 시도해 주세요.</string>
<!--media view-->
<string name="January">1월</string>
<string name="February">2월</string>
<string name="March">3월</string>
<string name="April">4월</string>
<string name="May">5월</string>
<string name="June">6월</string>
<string name="July">7월</string>
<string name="August">8월</string>
<string name="September">9월</string>
<string name="October">10월</string>
<string name="November">11월</string>
<string name="December">12월</string>
<string name="SharedFilesTab">파일</string>
<string name="SharedMediaTab">미디어</string>
<string name="SharedLinksTab">링크</string>
@ -1579,13 +1627,13 @@
<string name="StopLiveLocationAlertToUser">정말로 %1$s 님과 실시간 위치 공유를 중단하시겠습니까?</string>
<string name="StopLiveLocationAlertToGroup">정말로 %1$s 님과 실시간 위치 공유를 중단하시겠습니까?</string>
<string name="StopLiveLocationAlertAll">정말로 실시간 위치 공유를 중단하시겠습니까?</string>
<string name="SendLiveLocationInfo">움직임을 따라 실시간으로 갱신니다</string>
<string name="SendLiveLocationInfo">움직임을 따라 실시간으로 갱신니다</string>
<string name="SendSelectedLocation">선택한 위치 보내기</string>
<string name="ShareLocation">위치</string>
<string name="SharedPlace">장소</string>
<string name="AccurateTo">%1$s 반경 내 정확함</string>
<string name="NearbyPlaces">아니면 장소 선택</string>
<string name="ShowNearbyPlaces">근처 장소를 확인하려면 위로 당기세요</string>
<string name="ShowNearbyPlaces">근처 장소를 보려면 쓸어 올리세요</string>
<string name="LiveLocations">실시간 위치</string>
<string name="SendLiveLocationFor15m">15분 동안</string>
<string name="SendLiveLocationFor1h">1시간 동안</string>
@ -1612,6 +1660,7 @@
<string name="Gallery">갤러리</string>
<string name="AllPhotos">모든 사진</string>
<string name="AllMedia">모든 미디어</string>
<string name="AllVideos">모든 동영상</string>
<string name="NoPhotos">사진이 없습니다</string>
<string name="PleaseDownload">먼저 미디어를 다운로드해 주세요</string>
<string name="PleaseStreamDownload">동영상을 완전히 다운로드할 때까지 기다려 주세요.</string>
@ -1663,14 +1712,14 @@
<string name="PaintRegular">일반</string>
<string name="CropReset">초기화</string>
<string name="CropOriginal">원본</string>
<string name="CropSquare">사각</string>
<string name="CropSquare"></string>
<string name="SinglePhotosHelp">미디어를 개별 메시지로 보내기</string>
<string name="GroupPhotosHelp">미디어를 하나의 메시지로 묶기</string>
<!--password view-->
<string name="TwoStepVerification">2단계 인증</string>
<string name="TwoStepVerificationTitle">2단계 인증</string>
<string name="SetAdditionalPassword">개별 비밀번호 설정</string>
<string name="SetAdditionalPasswordInfo">새로운 기기에 로그인할 때 SMS로 받는 코드와 별개로 입력해야 하는 비밀번호를 설정하실 수 있습니다.</string>
<string name="SetAdditionalPasswordInfo">새로운 기기에 로그인할 때 SMS로 받는 코드와 별개로 입력해야 하는 비밀번호를 설정하실 수 있습니다.</string>
<string name="YourPassword">비밀번호</string>
<string name="PleaseEnterCurrentPassword">비밀번호를 입력하세요</string>
<string name="PleaseEnterFirstPassword">비밀번호 입력</string>
@ -1680,14 +1729,14 @@
<string name="YourEmail">이메일</string>
<string name="YourEmailCode">이메일 코드</string>
<string name="YourEmailCodeInfo">%1$s 편으로 받은 코드를 입력하여 이메일 주소를 인증해 주세요.</string>
<string name="YourEmailInfo">올바른 이메일을 입력해 주세요. 잊어버린 비밀번호를 복구하실 수 있는 유일한 수단입니다.</string>
<string name="YourEmailInfo">정확한 이메일을 추가해 주세요. 잊어버린 비밀번호를 되찾으실 유일한 수단입니다.</string>
<string name="YourEmailSkip">건너뛰기</string>
<string name="YourEmailSkipWarning">경고</string>
<string name="YourEmailSkipWarningText">비밀번호 분실시\n\n텔레그램에 대한 모든 접속 권한을 상실하시게 됩니다.\n비밀번호 분실시 복구는 불가능 합니다.</string>
<string name="YourEmailAlmostThere">거의 다 됐어요!</string>
<string name="YourEmailAlmostThereText">2단계 인증 설정을 완료하시려면 이메일을 (스팸 폴더도 잊지 않고) 확인해 주세요.</string>
<string name="YourPasswordSuccess">성공!</string>
<string name="YourPasswordSuccessText">2단계 인증 비밀번호가 활성화습니다.</string>
<string name="YourPasswordSuccessText">2단계 인증 비밀번호가 활성화되었습니다.</string>
<string name="YourEmailSuccessText">2단계 인증용 복구 이메일이 이제 작동합니다.</string>
<string name="ChangePassword">비밀번호 바꾸기</string>
<string name="TurnPasswordOff">비밀번호 끄기</string>
@ -1719,14 +1768,14 @@
<string name="ResetMyAccountWarningText">이 작업은 되돌릴 수 없습니다.\n\n계정을 초기화하시면, 메시지와 대화방이 모두 삭제됩니다.</string>
<string name="ResetMyAccountWarningReset">계정 초기화</string>
<string name="LoginPassword">비밀번호</string>
<string name="LoginPasswordText">2단계 인증을 켜셨기에, 계정이 추가 비밀번호로 보호됩니다.</string>
<string name="LoginPasswordText">2단계 인증이 활성화되어, 계정이 추가 비밀번호로 보호됩니다.</string>
<string name="ForgotPassword">비밀번호를 잊어버리셨나요?</string>
<string name="PasswordRecovery">비밀번호 복구</string>
<string name="PasswordCode">코드</string>
<string name="PasswordReset">비밀번호 비활성화</string>
<string name="ResendCode">코드 다시 보내기</string>
<string name="ResendCodeInfo">인증 코드를 이메일로 보냈습니다.</string>
<string name="EnabledPasswordText">2단계 인증을 켜셨습니다.\n회원님의 텔레그램 계정에 로그인하려면 여기서 설정한 비밀번호가 필요합니다.</string>
<string name="EnabledPasswordText">2단계 인증이 활성화되었습니다.\n회원님의 텔레그램 계정에 로그인하려면 여기서 설정하신 비밀번호가 필요합니다.</string>
<!--data settings-->
<string name="DataSettings">데이터 및 저장소</string>
<string name="DataUsage">디스크 및 네트워크 사용량</string>
@ -1762,7 +1811,7 @@
<string name="PrivacyDeleteCloudDrafts">클라우드 임시 저장 모두 삭제</string>
<string name="LastSeenEverybody">모두</string>
<string name="LastSeenContacts">내 연락 상대</string>
<string name="LastSeenNobody">아무도 없음</string>
<string name="LastSeenNobody">없음</string>
<string name="LastSeenEverybodyMinus">전체 공개 (-%1$d)</string>
<string name="LastSeenContactsPlus">내 연락 상대만 (+%1$d)</string>
<string name="LastSeenContactsMinus">내 연락 상대만 (-%1$d)</string>
@ -1780,8 +1829,8 @@
<string name="DeleteAccountTitle">계정 자동 탈퇴</string>
<string name="PrivacyAdvanced">고급</string>
<string name="DeleteAccountIfAwayFor2">다음 기간 내 미접속 시 계정 탈퇴</string>
<string name="DeleteAccountHelp">이 기간 안에 최소 한 번 온라인으로 들어오시지 않으면, 모든 그룹, 메시지, 연락처와 더불어 회원님의 계정이 사라집니다.</string>
<string name="LastSeenTitle">누가 내 마지막 접속 시간을 볼 수 있나요?</string>
<string name="DeleteAccountHelp">이 기간 안에 한 번이라도 접속하시지 않으면, 모든 그룹, 메시지, 연락처와 더불어 회원님의 계정이 사라집니다.</string>
<string name="LastSeenTitle">내 마지막 접속 시간을 볼 수 있는 사람</string>
<string name="AddExceptions">예외 추가</string>
<string name="CustomHelp">중요: 회원님의 마지막 접속 시간을 공유받지 않는 사람의 마지막 접속 시간은 보실 수 없습니다. 대신 최근, 일주일 이내, 한달 이내와 같이 간략하게 보일 것입니다.</string>
<string name="AlwaysShareWith">항상 공유</string>
@ -1795,18 +1844,18 @@
<string name="PrivacyFloodControlError">죄송합니다. 개인 정보 설정을 너무 많이 바꾸셨습니다. 잠시 기다리세요.</string>
<string name="RemoveFromListText">사용자를 삭제하려면 길게 누르세요.</string>
<string name="GroupsAndChannels">그룹</string>
<string name="WhoCanAddMe">누가 나를 그룹 대화방에 초대할 수 있나요?</string>
<string name="WhoCanAddMe">나를 그룹 대화방에 추가할 수 있는 사람</string>
<string name="WhoCanAddMeInfo">회원님을 그룹과 채널에 추가할 수 있는 사람을 세세하게 정하실 수 있습니다.</string>
<string name="AlwaysAllow">항상 허용</string>
<string name="NeverAllow">항상 거부</string>
<string name="AlwaysAllowPlaceholder">항상 허용...</string>
<string name="NeverAllowPlaceholder">항상 거부...</string>
<string name="CustomShareInfo">위 사용자는 앞선 설정과 무관하게 회원님을 그룹과 채널에 추가하지 못합니다.</string>
<string name="GroupsAndChannelsHelp">그룹이나 채널에 회원님을 추가할 수 있는 사람을 정하세요.</string>
<string name="GroupsAndChannelsHelp">회원님을 그룹과 채널에 추가할 수 있는 사람을 정하세요.</string>
<string name="InviteToGroupError">죄송합니다, 이 이용자는 개인 설정으로 인하여 그룹에 초대 할 수 없습니다.</string>
<string name="InviteToChannelError">죄송합니다, 이 이용자는 개인 설정으로 인하여 채널에 초대 할 수 없습니다.</string>
<string name="CreateGroupError">죄송합니다. 이 사용자들의 개인 설정으로 인해 함께 그룹을 만드실 수 없습니다.</string>
<string name="PrivacyCallsP2PHelp">피어투피어를 끄시면, 회원님의 IP 주소를 노출시키지 않도록 모든 전화가 텔레그램 서버를 통해 전달됩니다. 다만 음성 품질이 약간 저하될 수 있습니다.</string>
<string name="PrivacyCallsP2PHelp">단대단을 끄시면, 회원님의 IP 주소를 노출시키지 않도록 모든 전화가 텔레그램 서버를 통해 전달됩니다. 다만 음성 품질이 약간 저하될 수 있습니다.</string>
<string name="SyncContactsDelete">동기화된 연락처 삭제</string>
<string name="SuggestContacts">자주 이용하는 연락처 추천</string>
<string name="SuggestContactsInfo">"신속한 연락을 위해 검색 구역 위쪽에 자주 대화하는 사람을 내보이세요. "</string>
@ -1824,9 +1873,9 @@
<string name="BotStatusCantRead">메시지 접근 권한 없음</string>
<string name="BotInfoTitle">이 봇은 무엇을 할 수 있나요?</string>
<string name="BotStart">시작</string>
<string name="BotUnblock">시작</string>
<string name="BotUnblock">다시 시작</string>
<string name="BotStop">봇 정지</string>
<string name="BotRestart">시작</string>
<string name="BotRestart">다시 시작</string>
<!--button titles-->
<string name="Done">완료</string>
<string name="Open">열기</string>
@ -1842,7 +1891,7 @@
<string name="Delete">삭제</string>
<string name="DeleteAndStop">삭제하고 정지</string>
<string name="Forward">전달</string>
<string name="Retry">재전송</string>
<string name="Retry">다시 보내기</string>
<string name="FromCamera">카메라</string>
<string name="FromGalley">갤러리</string>
<string name="DeletePhoto">사진 제거</string>
@ -1906,7 +1955,7 @@
<string name="ActionBotDocumentRentalAgreement">임차 계약서</string>
<string name="ActionBotDocumentPhone">전화번호</string>
<string name="ActionBotDocumentEmail">이메일 주소</string>
<string name="UnsupportedMedia">이 메시지는 현재 텔레그램 버전에서 지원되지 않습니다. 메시지를 보시려면 http://telegram.org/update에서 앱을 업데이트하세요.</string>
<string name="UnsupportedMedia">이 메시지는 현재 텔레그램 버전에서 지원되지 않습니다. 메시지를 보시려면 http://telegram.org/update 에서 앱을 업데이트하세요.</string>
<string name="AttachPhoto">사진</string>
<string name="AttachVideo">동영상</string>
<string name="AttachDestructingPhoto">자동 삭제되는 사진</string>
@ -1951,7 +2000,7 @@
<string name="SendMessagesTo">%1$s 님에게 메시지를 보낼까요?</string>
<string name="SendGameTo">%1$s 님에게 게임을 공유할까요?</string>
<string name="SendContactTo">%1$s 님에게 연락처를 보낼까요?</string>
<string name="AreYouSureLogout">정말 로그아웃하시겠습니까?\n\n텔레그램은 여러 기기에서 동시에 사용이 가능합니다.\n\n로그아웃 시 모든 비밀 대화가 사라지는 점을 유의하시기 바랍니다.</string>
<string name="AreYouSureLogout">정말 로그아웃하시겠습니까?\n\n텔레그램은 여러 기기에서 동시에 이용하실 수 있습니다.\n\n로그아웃 시 모든 비밀 대화가 사라지는 점을 유의하시기 바랍니다.</string>
<string name="AreYouSureDeleteAndExit">이 그룹에서 정말 나가시겠습니까?</string>
<string name="AreYouSureDeleteAndExitName">정말 **%1$s** 그룹을 삭제하고 나가시겠습니까?</string>
<string name="AreYouSureDeleteThisChat">정말 이 대화방을 삭제하시겠습니까?</string>
@ -1991,7 +2040,7 @@
<string name="EditMessageError">죄송합니다. 메시지를 수정할 수 없습니다.</string>
<string name="AllowReadSms">텔레그램이 SMS를 받을 수 있도록 허락해 주셔야 자동으로 코드를 입력해 드릴 수 있습니다.</string>
<string name="AllowReadCall">텔레그램이 전화를 수신 할 수 있도록 설정해주셔야 자동으로 코드 입력이 가능합니다.</string>
<string name="AllowFillNumber">텔레그램이 전화와 SMS를 받을 수 있도록 허락해 주셔야 자동으로 전화번호를 채워 넣고, 코드를 보내고, 입력해 드릴 수 있습니다.</string>
<string name="AllowFillNumber">텔레그램이 전화를 받을 수 있도록 허용해 주셔야 회원님의 전화번호를 자동으로 확인할 수 있습니다.</string>
<string name="AllowReadCallAndSms">텔레그램이 전화를 받을 수 있도록 허용해 주시면 전화번호가 자동으로 확인됩니다.</string>
<string name="UserRestricted">죄송합니다. 이 작업은 진행하실 수 없습니다.</string>
<string name="YouBlockedUser">죄송합니다. 차단된 사용자나 봇은 그룹에 추가하실 수 없습니다. 먼저 차단을 해제하세요.</string>
@ -2058,9 +2107,9 @@
<string name="VoipSettingsRingtone">벨소리</string>
<string name="VoipRingtoneInfo">이 연락처에서 전화가 걸려올 때 울리는 벨소리를 맞춤하실 수 있습니다.</string>
<string name="Calls">전화</string>
<string name="CustomP2PInfo">위 사용자와 통화할 때는 앞선 설정과 무관하게 단대단이 사용되거나 사용되지 않습니다.</string>
<string name="CustomP2PInfo">위 사용자와 통화할 때는 앞선 설정과 무관하게 단대단이 사용되거나 사용되지 않습니다.</string>
<string name="P2PEnabledWith">단대단을 사용하여 통화할 사람</string>
<string name="WhoCanCallMe">누가 나에게 전화할 수 있나요?</string>
<string name="WhoCanCallMe">나에게 전화할 수 있는 사람</string>
<string name="WhoCanCallMeInfo">회원님에게 전화할 수 있는 사람을 제한하실 수 있습니다.</string>
<string name="CustomCallInfo">위 사용자는 앞선 설정과 무관하게 회원님에게 전화를 걸지 못합니다.</string>
<string name="UseLessDataNever">안 함</string>
@ -2084,7 +2133,7 @@
<string name="VoipPeerOutdated">**%1$s** 님의 텔레그램은 전화를 지원하지 않습니다. 앱을 업데이트한 뒤 전화할 수 있습니다.</string>
<string name="VoipRateCallAlert">텔레그램 전화의 품질을 평가해주세요.</string>
<string name="VoipNeedMicPermission">전화를 걸려면 텔레그램에게 마이크 접근 권한을 부여하셔야 합니다.</string>
<string name="VoipFeedbackCommentHint">코멘트 추가</string>
<string name="VoipFeedbackCommentHint">코멘트를 입력하실 수 있습니다</string>
<string name="CallBack">답신 전화</string>
<string name="CallAgain">다시 전화 걸기</string>
<string name="DefaultRingtone">기본</string>
@ -2099,12 +2148,12 @@
<string name="CallMessageReportProblem">전화 평가</string>
<string name="CallReportHint">무엇이 잘못됬나요?</string>
<string name="CallReportIncludeLogs">기술적 정보 포함</string>
<string name="CallReportLogsExplain">이 작업은 대화의 내용이 노출되지 않지만, 향 후 문제해결에 도움이 됩니다.</string>
<string name="CallReportLogsExplain">대화 내용이 공개되지 않으며 빠른 시일 내로 문제를 해결해 드리는 데 도움이 됩니다.</string>
<string name="CallReportSent">텔레그램 전화를 개선할 수 있도록 도와주셔서 감사합니다.</string>
<string name="VoipAnsweringAsAccount">%s(으)로서 수신 중</string>
<string name="VoipQuickReplies">문자로 응답</string>
<string name="VoipQuickRepliesExplain">러한 빠른 응답 문자들로 전화가 걸려올 때 텔레그램 메시지를 보내어 응답하실 수 있습니다. 무엇이든지 원하는 말로 바꾸세요.</string>
<string name="QuickReplyDefault1">지금 대화할 수 없어요. 무슨 일이죠?</string>
<string name="VoipQuickRepliesExplain"> 빠른 응답 문구들을 전화가 걸려올 때 텔레그램 메시지로 보내실 수 있습니다. 무엇이든지 원하는 말로 바꾸세요.</string>
<string name="QuickReplyDefault1">지금 대화할 수 없어요. 무슨 일인가요?</string>
<string name="QuickReplyDefault2">곧바로 전화할게요.</string>
<string name="QuickReplyDefault3">나중에 전화할게요.</string>
<string name="QuickReplyDefault4">지금 대화할 수 없어요. 나중에 전화 주시겠어요?</string>
@ -2112,20 +2161,20 @@
<string name="AllowCustomQuickReply">맞춤 허용</string>
<string name="VoipInCallBrandingWithName">%s님에게 텔레그램으로 전화</string>
<string name="VoipErrorUnknown">지금은 텔레그램으로 전화하실 수 없습니다.</string>
<string name="RateCallEcho">제 목소리가 울니다</string>
<string name="RateCallEcho">제 목소리가 울렸습니다</string>
<string name="RateCallNoise">잡음이 들렸습니다</string>
<string name="RateCallInterruptions">상대가 번번이 사라졌습니다</string>
<string name="RateCallDistorted">소리가 왜곡되었습니다</string>
<string name="RateCallSilentLocal">상대의 목소리가 들리지 않습니다</string>
<string name="RateCallSilentRemote">제 목소리가 상대에게 들리지 않습니다</string>
<string name="RateCallSilentLocal">상대의 목소리가 들리지 않습니다</string>
<string name="RateCallSilentRemote">제 목소리가 상대에게 들리지 않습니다</string>
<string name="RateCallDropped">통화가 예기치 않게 종료되었습니다</string>
<!--plural-->
<string name="Recipient_zero">%1$d명의 수신자</string>
<string name="Recipient_one">%1$d명의 수신자</string>
<string name="Recipient_two">%1$d명의 수신자</string>
<string name="Recipient_few">%1$d명의 수신자</string>
<string name="Recipient_many">%1$d명의 수신자</string>
<string name="Recipient_other">%1$d명의 수신자</string>
<string name="Recipient_zero">받는 사람 %1$d명</string>
<string name="Recipient_one">받는 사람 %1$d명</string>
<string name="Recipient_two">받는 사람 %1$d명</string>
<string name="Recipient_few">받는 사람 %1$d명</string>
<string name="Recipient_many">받는 사람 %1$d명</string>
<string name="Recipient_other">받는 사람 %1$d명</string>
<string name="OnlineCount_zero">온라인 %1$d명</string>
<string name="OnlineCount_one">온라인 %1$d명</string>
<string name="OnlineCount_two">온라인 %1$d명</string>
@ -2144,18 +2193,18 @@
<string name="InviteTextNum_few">안녕하세요, %1$d명의 친구와 텔레그램이라는 메신저를 사용하고 있어요. 함께 사용해요! 여기서 다운로드하세요: %2$s</string>
<string name="InviteTextNum_many">안녕하세요, %1$d명의 친구와 텔레그램이라는 메신저를 사용하고 있어요. 함께 사용해요! 여기서 다운로드하세요: %2$s</string>
<string name="InviteTextNum_other">안녕하세요, %1$d명의 친구와 텔레그램이라는 메신저를 사용하고 있어요. 함께 사용해요! 여기서 다운로드하세요: %2$s</string>
<string name="Chats_zero">대화 %1$d개</string>
<string name="Chats_one">대화 %1$d개</string>
<string name="Chats_two">대화 %1$d개</string>
<string name="Chats_few">대화 %1$d개</string>
<string name="Chats_many">대화 %1$d개</string>
<string name="Chats_other">대화 %1$d개</string>
<string name="ChatsException_zero">대화방 %1$d</string>
<string name="ChatsException_one">대화방 %1$d</string>
<string name="ChatsException_two">대화방 %1$d</string>
<string name="ChatsException_few">대화방 %1$d</string>
<string name="ChatsException_many">대화방 %1$d</string>
<string name="ChatsException_other">대화방 %1$d</string>
<string name="Chats_zero">대화 %1$d개</string>
<string name="Chats_one">대화 %1$d개</string>
<string name="Chats_two">대화 %1$d개</string>
<string name="Chats_few">대화 %1$d개</string>
<string name="Chats_many">대화 %1$d개</string>
<string name="Chats_other">대화 %1$d개</string>
<string name="ChatsException_zero">대화방 %1$d</string>
<string name="ChatsException_one">대화방 %1$d</string>
<string name="ChatsException_two">대화방 %1$d</string>
<string name="ChatsException_few">대화방 %1$d</string>
<string name="ChatsException_many">대화방 %1$d</string>
<string name="ChatsException_other">대화방 %1$d</string>
<string name="Channels_zero">채널 %1$d개</string>
<string name="Channels_one">채널 %1$d개</string>
<string name="Channels_two">채널 %1$d개</string>
@ -2428,7 +2477,7 @@
<string name="formatterBannedUntil24H">yyyy.MMM.dd, HH:mm</string>
<string name="formatterBannedUntilThisYear12H">MMM dd, a h:mm</string>
<string name="formatterBannedUntilThisYear24H">MMM dd, HH:mm</string>
<string name="formatterMonthYear2">yyyy LLLL</string>
<string name="formatterMonthYear2">yyyy LLLL</string>
<string name="formatterMonthName">LLLL</string>
<string name="formatterMonth">M\'월\' d\'일\'</string>
<string name="formatterYear">yy.MM.dd.</string>

View File

@ -363,8 +363,10 @@
<string name="EditAdminAddUsers">Leden toevoegen</string>
<string name="EditAdminAddUsersViaLink">Uitnodigen via link</string>
<string name="EditAdminPinMessages">Berichten vastzetten</string>
<string name="EditAdminPromotedBy">Toegevoegd door %1$s</string>
<string name="EditAdminPromotedBy">Gepromoveerd door %1$s</string>
<string name="EditAdminCantEdit">Je kunt de machtigingen van deze beheerder niet aanpassen.</string>
<string name="EditCantEditPermissions">Je kunt deze rechten niet aanpassen.</string>
<string name="EditCantEditPermissionsPublic">Dit recht is niet beschikbaar in publieke groepen.</string>
<string name="UserRemovedBy">Verwijderd door %1$s</string>
<string name="UserRestrictions">Gebruikersrechten</string>
<string name="UserRestrictionsDisabled">Deze optie is voor alle leden uitgeschakeld via de groepsrechten</string>
@ -529,7 +531,7 @@
<string name="EventLogPromotedAddUsers">Leden toevoegen</string>
<string name="EventLogPromotedPinMessages">Berichten vastzetten</string>
<string name="EventLogFilterAll">Alle gebeurtenissen</string>
<string name="EventLogFilterNewRestrictions">Nieuwe beperking</string>
<string name="EventLogFilterNewRestrictions">Nieuwe uitzonderingen</string>
<string name="EventLogFilterNewAdmins">Nieuwe beheerders</string>
<string name="EventLogFilterNewMembers">Nieuwe leden</string>
<string name="EventLogFilterGroupInfo">Groepsinformatie</string>
@ -701,7 +703,7 @@
<string name="ChatYourSelfName">Jij</string>
<string name="GroupEmptyTitle1">Je hebt een **groep** gemaakt</string>
<string name="GroupEmptyTitle2">Groepskenmerken:</string>
<string name="GroupDescription1">Tot 100000 leden</string>
<string name="GroupDescription1">Tot 200000 leden</string>
<string name="GroupDescription2">Blijvende chatgeschiedenis</string>
<string name="GroupDescription3">Publieke links zoals t.me/titel</string>
<string name="GroupDescription4">Beheerders met aangepaste rechten</string>
@ -729,9 +731,9 @@
<string name="AttachInlineRestrictedForever">Je bent beperkt in het sturen van inline-content door de groepsbeheerders.</string>
<string name="AttachStickersRestrictedForever">Je bent beperkt in het sturen van stickers door de groepsbeheerders.</string>
<string name="SendMessageRestrictedForever">Je bent beperkt in het plaatsen van berichten door de groepsbeheerders.</string>
<string name="GlobalAttachMediaRestricted">Media plaatsen is niet toegestaan in deze groep.</string>
<string name="GlobalAttachInlineRestricted">Inline-content plaatsen is niet toegestaan in deze groep.</string>
<string name="GlobalAttachStickersRestricted">Stickers plaatsen is niet toegestaan in deze groep.</string>
<string name="GlobalAttachMediaRestricted">Media sturen is niet toegestaan in deze groep.</string>
<string name="GlobalAttachInlineRestricted">Inline-bots zijn niet toegestaan in deze groep.</string>
<string name="GlobalAttachStickersRestricted">Stickers zijn niet toegestaan in deze groep.</string>
<string name="GlobalSendMessageRestricted">Berichten schrijven is niet toegestaan in deze groep.</string>
<string name="ChatAdmin">beheerder</string>
<string name="ApkRestricted">APK-installatie is beperkt voor deze app. Je kunt dit inschakelen via de systeeminstellingen.</string>
@ -1020,6 +1022,7 @@
<!--theme view-->
<string name="Theme">Thema</string>
<string name="AutoNightTheme">Automatisch nachtthema</string>
<string name="AutoNightThemeOff">Off</string>
<string name="AutoNightDisabled">Uitgeschakeld</string>
<string name="AutoNightScheduled">Geplande tijd</string>
<string name="AutoNightAutomatic">Automatisch</string>
@ -1041,16 +1044,18 @@
<string name="CloseEditor">BEWERKER SLUITEN</string>
<string name="SaveTheme">THEME OPSLAAN</string>
<string name="NewTheme">Nieuw Thema</string>
<string name="ColorTheme">Kleurenthema</string>
<string name="CreateTheme">THEMA MAKEN</string>
<string name="ApplyTheme">TOEPASSEN</string>
<string name="ThemePreview">Thema-voorbeeld</string>
<string name="SelectColor">Selecteer kleur</string>
<string name="CreateNewTheme">Nieuw thema maken</string>
<string name="CreateNewThemeMenu">Nieuw thema maken</string>
<string name="CreateNewThemeHelp">Tik op het palet-icoon om een lijst met elementen voor elk scherm te zien en deze te bewerken.</string>
<string name="CreateNewThemeInfo">Door het veranderen van de kleuren in de app kun je je eigen thema maken. Je kunt hier altijd terugschakelen naar het standaardthema.</string>
<string name="CreateNewThemeAlert">Je kunt je eigen thema maken door kleuren in de app aan te passen.\n\nJe kunt hier altijd het standaardthema weer instellen.</string>
<!--settings view-->
<string name="ResetNotificationsText">Meldingen gereset</string>
<string name="ResetNotificationsAlert">Alle meldingsinstellingen herstellen naar de standaardwaarden?</string>
<string name="TextSize">Tekstgrootte berichten</string>
<string name="TextSizeHeader">Berichttekstgrootte</string>
<string name="AskAQuestion">Een vraag stellen</string>
<string name="EnableAnimations">Animaties</string>
<string name="ChatSettings">Chatinstellingen</string>
@ -1111,10 +1116,41 @@
<string name="BackgroundBlurred">Vervaagd</string>
<string name="BackgroundMotion">Beweging</string>
<string name="ChatBackground">Achtergrond kiezen</string>
<string name="ResetChatBackgrounds">Chatachtergronden resetten</string>
<string name="ResetChatBackgroundsInfo">Verwijder alle geüploade chatachtergronden en herstel de voorgeïnstalleerde achtergronden.</string>
<string name="ResetChatBackgroundsAlert">Echt alle chatachtergronden resetten?</string>
<string name="DeleteChatBackgroundsAlert">Achtergrond echt verwijderen?</string>
<string name="BackgroundPreview">Achtergrondvoorvertoning</string>
<string name="BackgroundPreviewLine1">Sommige achtergrondafbeeldingen zien er vervaagd beter uit.</string>
<string name="BackgroundPreviewLine2">Bedankt!</string>
<string name="BackgroundColorPreviewLine1">Veeg naar links of rechts om meer kleuren te zien</string>
<string name="BackgroundColorPreviewLine2">Zalm is een vis, geen kleur.</string>
<string name="FontSizePreviewReply">Godfried, ben jij het echt?</string>
<string name="FontSizePreviewLine1">Ik zit mij voor het vensterglas onnoemlijk te vervelen.</string>
<string name="FontSizePreviewLine2">Ik wou dat ik twee hondjes was, dan kon ik samen spelen</string>
<string name="BackgroundColorSinglePreviewLine1">Press \'Set\' to apply the background.</string>
<string name="BackgroundColorSinglePreviewLine2">Enjoy the view.</string>
<string name="SetBackground">ACHTERGROND INSTELLEN</string>
<string name="SearchByColor">Zoek op kleur</string>
<string name="SearchBackgrounds">Zoek Achtergronden</string>
<string name="BackgroundSearchColor">Kleur:</string>
<string name="BackgroundBrightness">Helderheid</string>
<string name="BackgroundHexColorCode">Kleur in hexidecimaal</string>
<string name="BackgroundColor">Kleur</string>
<string name="BackgroundPattern">Patroon</string>
<string name="BackgroundIntensity">Intensiteit</string>
<string name="Blue">Blauw</string>
<string name="Red">Rood</string>
<string name="Orange">Oranje</string>
<string name="Yellow">Geel</string>
<string name="Green">Groen</string>
<string name="Teal">Groenblauw</string>
<string name="Purple">Paars</string>
<string name="Pink">Roze</string>
<string name="Brown">Bruin</string>
<string name="Black">Zwart</string>
<string name="Gray">Grijs</string>
<string name="White">Wit</string>
<string name="SelectColorTitle">Kies een kleur</string>
<string name="UploadImage">Afbeelding uploaden</string>
<string name="SelectImage">Kies afbeelding</string>
@ -1548,6 +1584,18 @@
<string name="ScreenCaptureAlert">Hiermee verberg je de inhoud van je chats of chatoverzicht in je taakbeheer, ook kun je geen schermafdrukken maken in Telegram.\n\nHet kan zijn dat je de app moet herstarten voordat dit actief is.</string>
<string name="TooManyTries">Teveel pogingen.\nProbeer het opnieuw over %1$s.</string>
<!--media view-->
<string name="January">January</string>
<string name="February">February</string>
<string name="March">March</string>
<string name="April">April</string>
<string name="May">May</string>
<string name="June">June</string>
<string name="July">July</string>
<string name="August">August</string>
<string name="September">September</string>
<string name="October">October</string>
<string name="November">November</string>
<string name="December">December</string>
<string name="SharedFilesTab">BESTANDEN</string>
<string name="SharedMediaTab">MEDIA</string>
<string name="SharedLinksTab">LINKS</string>
@ -1612,6 +1660,7 @@
<string name="Gallery">Galerij</string>
<string name="AllPhotos">Alle foto\'s</string>
<string name="AllMedia">Alle media</string>
<string name="AllVideos">Alle video\'s</string>
<string name="NoPhotos">Nog geen foto\'s</string>
<string name="PleaseDownload">Download media eerst</string>
<string name="PleaseStreamDownload">Wacht todat de video volledig is gedownload.</string>
@ -2099,7 +2148,7 @@
<string name="CallMessageReportProblem">Beoordeel deze oproep</string>
<string name="CallReportHint">Wat is er misgegaan?</string>
<string name="CallReportIncludeLogs">Technische informatie versturen</string>
<string name="CallReportLogsExplain">We hebben geen inzage in je gesprek, maar kunnen hiermee het probleem wel sneller oplossen.</string>
<string name="CallReportLogsExplain">Geeft geen inzage in je gesprek, maar we kunnen hiermee het probleem wel sneller oplossen.</string>
<string name="CallReportSent">Bedankt voor je hulp bij het verbeteren van Telegram-oproepen.</string>
<string name="VoipAnsweringAsAccount">Antwoorden als %s</string>
<string name="VoipQuickReplies">Antwoord met bericht</string>

View File

@ -22,7 +22,7 @@
<string name="SyncContactsInfoOff">Ative para sincronizar continuamente contatos deste dispositivos com a sua conta.</string>
<string name="SyncContactsAdded">Contatos deste dispositivo foram adicionados a sua conta.</string>
<!--code enter view-->
<string name="YourCode">Verificação do tel.</string>
<string name="YourCode">Verificar Número</string>
<string name="SentSmsCode">Enviamos um SMS com um código de ativação para **%1$s**.</string>
<string name="SentAppCode">Nós enviamos o código para o aplicativo do **Telegram** em seu outro dispositivo.</string>
<string name="SentAppCodeTitle">Confira suas mensagens no Telegram</string>
@ -49,7 +49,7 @@
<string name="OtherLoginCode">Seu código de login é **%1$s**. Digite ele no app do Telegram no qual você está tentando fazer o login.\n\nNão informe esse código para ninguém.</string>
<!--signup view-->
<string name="YourName">Seu nome</string>
<string name="RegisterText2">Por favor, digite seu nome completo e envie sua foto de perfil.</string>
<string name="RegisterText2">Por favor, digite seu nome completo e coloque uma foto de perfil.</string>
<string name="FirstName">Nome (obrigatório)</string>
<string name="LastName">Sobrenome (opcional)</string>
<string name="CancelRegistration">Cancelar registro</string>
@ -365,6 +365,8 @@
<string name="EditAdminPinMessages">Fixar Mensagens</string>
<string name="EditAdminPromotedBy">Promovido por %1$s</string>
<string name="EditAdminCantEdit">Você não tem permissão para editar os direitos desse admin.</string>
<string name="EditCantEditPermissions">Você não pode editar essa permissão.</string>
<string name="EditCantEditPermissionsPublic">Esta permissão não está disponível em grupos públicos.</string>
<string name="UserRemovedBy">Removido por %1$s</string>
<string name="UserRestrictions">Permissões do Usuário</string>
<string name="UserRestrictionsDisabled">Esta opção está desativada para todos os membros nas Permissões do Grupo</string>
@ -490,7 +492,7 @@
<string name="EventLogPinnedMessages">un1 fixou essa mensagem:</string>
<string name="EventLogUnpinnedMessages">un1 desafixou essa mensagem:</string>
<string name="EventLogStopPoll">un1 encerrou a enquete:</string>
<string name="EventLogDeletedMessages">un1 removeu essa mensagem:</string>
<string name="EventLogDeletedMessages">un1 apagou esta mensagem:</string>
<string name="EventLogChangedStickersSet">un1 alterou o pacote de sticker do grupo</string>
<string name="EventLogRemovedStickersSet">un1 removeu o pacote de sticker do grupo</string>
<string name="EventLogChangedGroupLink">un1 alterou o link do grupo:</string>
@ -511,7 +513,7 @@
<string name="EventLogDefaultPermissions">alterou as permissões padrão</string>
<string name="EventLogRestrictedSendStickers">Enviar Stickers &amp; GIFs</string>
<string name="EventLogRestrictedSendMedia">Enviar mídias</string>
<string name="EventLogRestrictedChangeInfo">Alterar Info</string>
<string name="EventLogRestrictedChangeInfo">Alterar info</string>
<string name="EventLogRestrictedInviteUsers">Adicionar usuários</string>
<string name="EventLogRestrictedPinMessages">Fixar mensagens</string>
<string name="EventLogRestrictedSendPolls">Enviar enquetes</string>
@ -519,7 +521,7 @@
<string name="EventLogRestrictedSendEmbed">Prévia de links</string>
<string name="EventLogRestrictedReadMessages">Ler Mensagens</string>
<string name="EventLogPromoted">alterou os privilégios de %1$s</string>
<string name="EventLogPromotedChangeChannelInfo">Alterar Info do canal</string>
<string name="EventLogPromotedChangeChannelInfo">Alterar Info do Canal</string>
<string name="EventLogPromotedChangeGroupInfo">Alterar Info do grupo</string>
<string name="EventLogPromotedPostMessages">Postar mensagens</string>
<string name="EventLogPromotedEditMessages">Editar mensagens</string>
@ -537,7 +539,7 @@
<string name="EventLogFilterDeletedMessages">Mensagens apagadas</string>
<string name="EventLogFilterEditedMessages">Mensagens editadas</string>
<string name="EventLogFilterPinnedMessages">Mensagens fixadas</string>
<string name="EventLogFilterLeavingMembers">Membros saindo</string>
<string name="EventLogFilterLeavingMembers">Membros saindo do grupo</string>
<!--broadcasts-->
<string name="NewBroadcastList">Nova Lista de Transmissão</string>
<string name="EnterListName">Digite o nome da lista</string>
@ -701,10 +703,10 @@
<string name="ChatYourSelfName">Você</string>
<string name="GroupEmptyTitle1">Você criou um **grupo**.</string>
<string name="GroupEmptyTitle2">Grupos podem ter:</string>
<string name="GroupDescription1">Até 100,000 membros</string>
<string name="GroupDescription1">Até 200.000 membros</string>
<string name="GroupDescription2">"Histórico persistente do chat "</string>
<string name="GroupDescription3">Links públicos, como t.me/nome</string>
<string name="GroupDescription4">Admins com direitos diferentes</string>
<string name="GroupDescription4">Admins com permissões diferentes</string>
<string name="ChatYourSelfDescription1">Encaminhe mensagens aqui para salvá-las</string>
<string name="ChatYourSelfDescription2">Envie mídias e arquivos aqui para salvá-los</string>
<string name="ChatYourSelfDescription3">Acesse este chat de qualquer dispositivo</string>
@ -722,11 +724,11 @@
<string name="DiscardVideoMessageDescription">Você tem certeza de que deseja parar de gravar e descartar sua mensagem de vídeo?</string>
<string name="DiscardVoiceMessageAction">Descartar</string>
<string name="AttachMediaRestricted">Os admins do grupo restringiram você de enviar mídias aqui até %1$s</string>
<string name="AttachInlineRestricted">Os admins do grupo restringiram você de usar bots inline aqui até %1$s</string>
<string name="AttachInlineRestricted">Os admins do grupo restringiram você de usar conteúdo inline aqui até %1$s.</string>
<string name="AttachStickersRestricted">Os admins do grupo restringiram você de enviar stickers aqui até %1$s</string>
<string name="SendMessageRestricted">Os admins do grupo restringiram você de escrever aqui até %1$s</string>
<string name="AttachMediaRestrictedForever">Os admins do grupo restringiram você de enviar mídias aqui.</string>
<string name="AttachInlineRestrictedForever">Os admins do grupo restringiram você de usar bots inline aqui</string>
<string name="AttachInlineRestrictedForever">Os admins do grupo restringiram você de usar conteúdo inline aqui.</string>
<string name="AttachStickersRestrictedForever">Os admins do grupo restringiram você de enviar stickers aqui.</string>
<string name="SendMessageRestrictedForever">Os admins do grupo restringiram você de escrever aqui.</string>
<string name="GlobalAttachMediaRestricted">Não é permitido enviar mídias neste grupo.</string>
@ -845,7 +847,7 @@
<string name="NotificationActionPinnedMusicChannel">%1$s fixou um arquivo de áudio</string>
<string name="SecretChatName">Telegram</string>
<!--contacts view-->
<string name="SelectContact">Selecionar Contato</string>
<string name="SelectContact">Selecione um Contato</string>
<string name="ContactShare">COMPARTILHAR CONTATO</string>
<string name="NoContacts">Ainda não há contatos</string>
<string name="InviteText2">Ei, estou usando o Telegram para conversar. Vem comigo! Baixe aqui: %1$s</string>
@ -871,8 +873,8 @@
<string name="ShareTelegram">Compartilhar Telegram...</string>
<string name="UpdateContactsTitle">Atualizar contatos?</string>
<string name="UpdateContactsMessage">O Telegram detectou muitos contatos não sincronizados, você gostaria de sincronizá-los agora? Escolha \'OK\' se você está usando seu próprio celular, cartão SIM e conta do Google.</string>
<string name="SortedByName">Ordernado por Nome</string>
<string name="SortedByLastSeen">Ordenado por Visto por Último</string>
<string name="SortedByName">Listado por Nome</string>
<string name="SortedByLastSeen">Listado por Visto por Último</string>
<!--group create view-->
<string name="SendMessageTo">Adicionar pessoas...</string>
<string name="SoftUserLimitAlert">Você poderá adicionar mais usuários após finalizar a criação do grupo e convertê-lo em supergrupo.</string>
@ -967,7 +969,7 @@
<string name="UsernameInvalidShort">O nome de usuário deve ter pelo menos 5 caracteres.</string>
<string name="UsernameInvalidLong">O nome de usuário não pode exceder 32 caracteres.</string>
<string name="UsernameInvalidStartNumber">Desculpe, o nome de usuário não pode começar com um número.</string>
<string name="UsernameHelp">Você pode escolher um nome de usuário no **Telegram**. Assim, outras pessoas poderão te encontrar pelo nome de usuário e entrar em contato sem precisar saber seu telefone.\n\nVocê pode usar **az**, **09** e underline. O tamanho mínimo é **5** caracteres.</string>
<string name="UsernameHelp">Você pode escolher um nome de usuário no **Telegram**. Assim, outras pessoas poderão te encontrar pelo nome de usuário e entrar em contato sem precisar saber seu telefone.\n\nVocê pode usar **az**, **09** e underline.\nO tamanho mínimo é de **5** caracteres.</string>
<string name="UsernameHelpLink">Este link abre um chat com você:\n%1$s</string>
<string name="UsernameChecking">Verificando nome de usuário...</string>
<string name="UsernameAvailable">%1$s está disponível.</string>
@ -1020,6 +1022,7 @@
<!--theme view-->
<string name="Theme">Tema</string>
<string name="AutoNightTheme">Modo Noturno Automático</string>
<string name="AutoNightThemeOff">Desativado</string>
<string name="AutoNightDisabled">Desativado</string>
<string name="AutoNightScheduled">Programado</string>
<string name="AutoNightAutomatic">Automático</string>
@ -1040,17 +1043,19 @@
<string name="EnterThemeName">Insira o nome do tema</string>
<string name="CloseEditor">FECHAR EDITOR</string>
<string name="SaveTheme">SALVAR TEMA</string>
<string name="NewTheme">Novo Tema</string>
<string name="NewTheme">Novo tema de cores</string>
<string name="ColorTheme">Tema de cores</string>
<string name="CreateTheme">CRIAR TEMA</string>
<string name="ApplyTheme">APLICAR</string>
<string name="ThemePreview">Prévia do Tema</string>
<string name="SelectColor">Selecionar cor</string>
<string name="CreateNewTheme">Criar Novo Tema</string>
<string name="CreateNewThemeMenu">Criar novo tema</string>
<string name="CreateNewThemeHelp">Toque no ícone da paleta para visualizar a lista de elementos de cada tela - e editá-los.</string>
<string name="CreateNewThemeInfo">Você pode criar seu próprio tema alterando as cores do app. Você pode voltar ao tema padrão do Telegram aqui.</string>
<string name="CreateNewThemeAlert">Você pode criar seu próprio tema alterando as cores dentro do aplicativo.\n\nVocê sempre pode voltar para o tema padrão do Telegram aqui.</string>
<!--settings view-->
<string name="ResetNotificationsText">Restaurar todas as configurações de notificação</string>
<string name="ResetNotificationsAlert">Deseja mesmo resetar as configurações de notificação para o padrão?</string>
<string name="TextSize">Tamanho do Texto</string>
<string name="TextSizeHeader">Tamanho do texto das mensagens</string>
<string name="AskAQuestion">Fazer uma Pergunta</string>
<string name="EnableAnimations">Permitir Animações</string>
<string name="ChatSettings">Configurações de Chats</string>
@ -1111,15 +1116,46 @@
<string name="BackgroundBlurred">Desfoque</string>
<string name="BackgroundMotion">Movimento</string>
<string name="ChatBackground">Papel de Parede</string>
<string name="ResetChatBackgrounds">Redefinir Papéis de Parede</string>
<string name="ResetChatBackgroundsInfo">Remove todos os papéis de parede enviados e restaura os pré-instalados.</string>
<string name="ResetChatBackgroundsAlert">Deseja mesmo redefinir todos os papéis de parede?</string>
<string name="DeleteChatBackgroundsAlert">Deseja mesmo apagar os papéis de parede selecionados?</string>
<string name="BackgroundPreview">Prévia do Papel de Parede</string>
<string name="BackgroundPreviewLine1">Dica: alguns papéis de parede ficam melhores com o efeito de desfoque.</string>
<string name="BackgroundPreviewLine2">Obrigado!</string>
<string name="BackgroundPreviewLine1">Dica: alguns papéis de parede ficam melhores desfocados.</string>
<string name="BackgroundPreviewLine2">Valeu!</string>
<string name="BackgroundColorPreviewLine1">Deslize para os lados para ver mais cores</string>
<string name="BackgroundColorPreviewLine2">Salmão é um peixe, não uma cor.</string>
<string name="FontSizePreviewReply">Reinhardt, temos que achar umas músicas novas pra você. &#127926;.</string>
<string name="FontSizePreviewLine1">Ahh, vocês crianças de hoje em dia com essas músicas eletrônicas! Ouçam os clássicos, como Hasselhoff!</string>
<string name="FontSizePreviewLine2">Não consigo nem te levar a sério agora.</string>
<string name="BackgroundColorSinglePreviewLine1">Press \'Set\' to apply the background.</string>
<string name="BackgroundColorSinglePreviewLine2">Enjoy the view.</string>
<string name="SetBackground">DEFINIR PAPEL DE PAREDE</string>
<string name="SearchByColor">Buscar por cor</string>
<string name="SearchBackgrounds">Buscar Papéis de Parede</string>
<string name="BackgroundSearchColor">Cor:</string>
<string name="BackgroundBrightness">Brilho</string>
<string name="BackgroundHexColorCode">Código hex da cor</string>
<string name="BackgroundColor">Cor</string>
<string name="BackgroundPattern">Textura</string>
<string name="BackgroundIntensity">Intensidade</string>
<string name="Blue">Azul</string>
<string name="Red">Vermelho</string>
<string name="Orange">Laranja</string>
<string name="Yellow">Amarelo</string>
<string name="Green">Verde</string>
<string name="Teal">Turquesa</string>
<string name="Purple">Roxo</string>
<string name="Pink">Rosa</string>
<string name="Brown">Marrom</string>
<string name="Black">Preto</string>
<string name="Gray">Cinza</string>
<string name="White">Branco</string>
<string name="SelectColorTitle">Selecionar uma cor</string>
<string name="UploadImage">Enviar imagem</string>
<string name="SelectImage">Selecionar imagem</string>
<string name="LoadingFullImage">carregando imagem completa...</string>
<string name="SetColor">Definir uma Cor</string>
<string name="SetColor">Definir uma cor</string>
<string name="MessagesSettings">Mensagens</string>
<string name="SendByEnter">Enviar usando \'Enter\'</string>
<string name="Events">Eventos</string>
@ -1146,13 +1182,13 @@
<string name="TermsOfService">Termos de Serviço</string>
<string name="TermsOfServiceLogin">Ao se cadastrar,\nvocê concorda com os *Termos de Serviço*.</string>
<string name="PrivacyPolicyUrl">https://telegram.org/privacy</string>
<string name="DeleteLocalization">Apagar localização?</string>
<string name="DeleteLocalization">Apagar tradução?</string>
<string name="IncorrectLocalization">Arquivo de localização incorreto</string>
<string name="NotificationsService">Manter Serviço Ativo</string>
<string name="NotificationsServiceInfo">Reinicia o app quando ele tiver sido fechado. Ative para notificações mais estáveis.</string>
<string name="NotificationsServiceConnection">Conexão em Segundo Plano</string>
<string name="NotificationsServiceConnectionInfo">Mantém uma conexão de baixo impacto para que o Telegram receba notificações mais estáveis.</string>
<string name="SortBy">Ordenar Por</string>
<string name="SortBy">Listar Por</string>
<string name="ImportContacts">Importar Contatos</string>
<string name="SortFirstName">Primeiro nome</string>
<string name="SortLastName">Último nome</string>
@ -1544,10 +1580,22 @@
<string name="FingerprintHelp">Toque o sensor</string>
<string name="FingerprintNotRecognized">Digital não reconhecida, tente de novo.</string>
<string name="ScreenCapture">Mostrar Conteúdo do App nos Recentes</string>
<string name="ScreenCaptureInfo">Se desativado, você não poderá fazer capturas de tela no aplicativo, mas o conteúdo do chat ficará oculto no alternador de tarefas.</string>
<string name="ScreenCaptureAlert">Isso ocultará o conteúdo de seus chats ou lista de chats do alternador de tarefas, mas você não poderá tirar capturas de tela no Telegram.\n\nPode ser necessário reiniciar o aplicativo para que isso entre em vigor.</string>
<string name="ScreenCaptureInfo">Se desativado, você não poderá fazer capturas de tela no aplicativo, mas o conteúdo do chat ficará oculto no multitarefas.</string>
<string name="ScreenCaptureAlert">Isso ocultará o conteúdo de seus chats ou lista de chats do multitarefas, mas você não poderá tirar capturas de tela no Telegram.\n\nPode ser necessário reiniciar o aplicativo para que isso entre em vigor.</string>
<string name="TooManyTries">Muitas tentativas.\nPor favor, tente de novo em %1$s.</string>
<!--media view-->
<string name="January">janeiro</string>
<string name="February">fevereiro</string>
<string name="March">março</string>
<string name="April">abril</string>
<string name="May">maio</string>
<string name="June">junho</string>
<string name="July">julho</string>
<string name="August">agosto</string>
<string name="September">setembro</string>
<string name="October">outubro</string>
<string name="November">novembro</string>
<string name="December">dezembro</string>
<string name="SharedFilesTab">ARQUIVOS</string>
<string name="SharedMediaTab">MÍDIA</string>
<string name="SharedLinksTab">LINKS</string>
@ -1556,7 +1604,7 @@
<string name="DocumentsTitle">Arquivos Compartilhados</string>
<string name="SharedContentTitle">Conteúdo Compartilhado</string>
<string name="LinksTitle">Links Compartilhados</string>
<string name="AudioTitle">Música Compartilhada</string>
<string name="AudioTitle">Músicas Compartilhadas</string>
<string name="NoMedia">Compartilhar fotos e vídeos no chat e acessá-los em qualquer um de seus dispositivos.</string>
<string name="NoSharedAudio">Compartilhe músicas neste chat e acesse-as de qualquer um de seus dispositivos.</string>
<string name="NoSharedFiles">Compartilhar arquivos e documentos no chat e acessá-los de qualquer um de seus dispositivos.</string>
@ -1612,11 +1660,12 @@
<string name="Gallery">Galeria</string>
<string name="AllPhotos">Todas as fotos</string>
<string name="AllMedia">Todas as mídias</string>
<string name="AllVideos">Todos os vídeos</string>
<string name="NoPhotos">Ainda não há fotos</string>
<string name="PleaseDownload">Por favor, baixe a mídia primeiro</string>
<string name="PleaseStreamDownload">Aguarde que o vídeo seja baixado completamente.</string>
<string name="VideoDoesNotSupportStreaming">Este vídeo não está otimizado para streaming. Talvez você precise baixá-lo para assistir.</string>
<string name="CantPlayVideo">O app não conseguiu reproduzir o vídeo. Tentar reproduzir em um player externo?</string>
<string name="CantPlayVideo">O app não conseguiu reproduzir o vídeo. Deseja abrir em um player externo?</string>
<string name="NoRecentPhotos">Nenhuma foto recente</string>
<string name="NoRecentGIFs">Nenhum GIF recente</string>
<string name="SearchImages">BUSCAR IMAGENS</string>
@ -2099,7 +2148,7 @@
<string name="CallMessageReportProblem">Avaliar Chamada</string>
<string name="CallReportHint">O que aconteceu de errado?</string>
<string name="CallReportIncludeLogs">Incluir informação técnica</string>
<string name="CallReportLogsExplain">Isso não irá revelar o conteúdo de sua conversa, mas nos ajudará a resolver o problema.</string>
<string name="CallReportLogsExplain">Não revela o conteúdo do chat e nos ajudará a corrigir o problema mais rápido.</string>
<string name="CallReportSent">Agradecemos por ajudar a tornar as chamadas do Telegram melhores.</string>
<string name="VoipAnsweringAsAccount">Respondendo como %s</string>
<string name="VoipQuickReplies">Responder com Texto</string>
@ -2116,9 +2165,9 @@
<string name="RateCallNoise">Ouvi barulho no fundo</string>
<string name="RateCallInterruptions">A outra pessoa ficou sumindo</string>
<string name="RateCallDistorted">Fala distorcida</string>
<string name="RateCallSilentLocal">Eu não consegui ouvir a outra pessoa</string>
<string name="RateCallSilentLocal">Não consegui ouvir a outra pessoa</string>
<string name="RateCallSilentRemote">A outra pessoa não conseguiu me ouvir</string>
<string name="RateCallDropped">Chamada encerrada inesperadamente</string>
<string name="RateCallDropped">Chamada encerrada do nada</string>
<!--plural-->
<string name="Recipient_zero">%1$d destinatários</string>
<string name="Recipient_one">%1$d destinatário</string>

View File

@ -531,7 +531,7 @@
<string name="EventLogPromotedAddUsers">Add users</string>
<string name="EventLogPromotedPinMessages">Pin messages</string>
<string name="EventLogFilterAll">All actions</string>
<string name="EventLogFilterNewRestrictions">New exception</string>
<string name="EventLogFilterNewRestrictions">New exceptions</string>
<string name="EventLogFilterNewAdmins">New admins</string>
<string name="EventLogFilterNewMembers">New members</string>
<string name="EventLogFilterGroupInfo">Group info</string>
@ -703,7 +703,7 @@
<string name="ChatYourSelfName">You</string>
<string name="GroupEmptyTitle1">You have created a **group**.</string>
<string name="GroupEmptyTitle2">Groups can have:</string>
<string name="GroupDescription1">Up to 100,000 members</string>
<string name="GroupDescription1">Up to 200,000 members</string>
<string name="GroupDescription2">Persistent chat history</string>
<string name="GroupDescription3">Public links such as t.me/title</string>
<string name="GroupDescription4">Admins with different rights</string>
@ -731,10 +731,10 @@
<string name="AttachInlineRestrictedForever">The admins of this group have restricted you from sending inline content here</string>
<string name="AttachStickersRestrictedForever">The admins of this group have restricted you from sending stickers.</string>
<string name="SendMessageRestrictedForever">The admins of this group have restricted you from writing here.</string>
<string name="GlobalAttachMediaRestricted">Sending media isnt allowed in this group.</string>
<string name="GlobalAttachInlineRestricted">Inline bots arent allowed in this group.</string>
<string name="GlobalAttachStickersRestricted">Stickers arent allowed in this group.</string>
<string name="GlobalSendMessageRestricted">Writing messages isnt allowed in this group.</string>
<string name="GlobalAttachMediaRestricted">Sending media isn\'t allowed in this group.</string>
<string name="GlobalAttachInlineRestricted">Inline bots aren\'t allowed in this group.</string>
<string name="GlobalAttachStickersRestricted">Stickers aren\'t allowed in this group.</string>
<string name="GlobalSendMessageRestricted">Writing messages isn\'t allowed in this group.</string>
<string name="ChatAdmin">admin</string>
<string name="ApkRestricted">APK installation is restricted for this app. You can enable this in system settings.</string>
<string name="UnreadMessages">Unread Messages</string>
@ -1022,6 +1022,7 @@
<!--theme view-->
<string name="Theme">Theme</string>
<string name="AutoNightTheme">Auto-Night Mode</string>
<string name="AutoNightThemeOff">Off</string>
<string name="AutoNightDisabled">Disabled</string>
<string name="AutoNightScheduled">Scheduled</string>
<string name="AutoNightAutomatic">Automatic</string>
@ -1042,17 +1043,19 @@
<string name="EnterThemeName">Enter theme name</string>
<string name="CloseEditor">CLOSE EDITOR</string>
<string name="SaveTheme">SAVE THEME</string>
<string name="NewTheme">New Theme</string>
<string name="NewTheme">New color theme</string>
<string name="ColorTheme">Color theme</string>
<string name="CreateTheme">CREATE THEME</string>
<string name="ApplyTheme">APPLY</string>
<string name="ThemePreview">Theme Preview</string>
<string name="SelectColor">Select color</string>
<string name="CreateNewTheme">Create New Theme</string>
<string name="CreateNewThemeMenu">Create new theme</string>
<string name="CreateNewThemeHelp">Tap on the palette icon to view the list of elements on each screen - and edit them.</string>
<string name="CreateNewThemeInfo">You can create your own theme by changing colors within the app. You can always switch back to the default Telegram theme here.</string>
<string name="CreateNewThemeAlert">You can create your own theme by changing colors within the app.\n\nYou can always switch back to the default Telegram theme here.</string>
<!--settings view-->
<string name="ResetNotificationsText">Reset all notification settings to default</string>
<string name="ResetNotificationsAlert">Are you sure you want to reset all notification settings to default?</string>
<string name="TextSize">Messages Text Size</string>
<string name="TextSizeHeader">Messages text size</string>
<string name="AskAQuestion">Ask a Question</string>
<string name="EnableAnimations">Enable Animations</string>
<string name="ChatSettings">Chat Settings</string>
@ -1113,10 +1116,41 @@
<string name="BackgroundBlurred">Blurred</string>
<string name="BackgroundMotion">Motion</string>
<string name="ChatBackground">Chat Background</string>
<string name="ResetChatBackgrounds">Reset Chat Backgrounds</string>
<string name="ResetChatBackgroundsInfo">Remove all uploaded chat backgrounds and restore the pre-installed ones.</string>
<string name="ResetChatBackgroundsAlert">Are you sure you want to reset all chat backgrounds?</string>
<string name="DeleteChatBackgroundsAlert">Are you sure you want to delete the selected backgrounds?</string>
<string name="BackgroundPreview">Background Preview</string>
<string name="BackgroundPreviewLine1">Hint: some background images look better with blur effect.</string>
<string name="BackgroundPreviewLine2">Thank you!</string>
<string name="BackgroundPreviewLine1">Hint: some background images look better when blurred.</string>
<string name="BackgroundPreviewLine2">Woo-hoo! Thanks</string>
<string name="BackgroundColorPreviewLine1">Swipe left or right to see more colors.</string>
<string name="BackgroundColorPreviewLine2">Salmon is a fish, not a color.</string>
<string name="FontSizePreviewReply">Reinhardt, we need to find you some new tunes &#127926;.</string>
<string name="FontSizePreviewLine1">Ah, you kids today with techno music! You should enjoy the classics, like Hasselhoff!</string>
<string name="FontSizePreviewLine2">I can\'t even take you seriously right now.</string>
<string name="BackgroundColorSinglePreviewLine1">Press \'Set\' to apply the background.</string>
<string name="BackgroundColorSinglePreviewLine2">Enjoy the view.</string>
<string name="SetBackground">SET BACKGROUND</string>
<string name="SearchByColor">Search by color</string>
<string name="SearchBackgrounds">Search Backgrounds</string>
<string name="BackgroundSearchColor">Color:</string>
<string name="BackgroundBrightness">Brightness</string>
<string name="BackgroundHexColorCode">Hex color code</string>
<string name="BackgroundColor">Color</string>
<string name="BackgroundPattern">Pattern</string>
<string name="BackgroundIntensity">Intensity</string>
<string name="Blue">Blue</string>
<string name="Red">Red</string>
<string name="Orange">Orange</string>
<string name="Yellow">Yellow</string>
<string name="Green">Green</string>
<string name="Teal">Teal</string>
<string name="Purple">Purple</string>
<string name="Pink">Pink</string>
<string name="Brown">Brown</string>
<string name="Black">Black</string>
<string name="Gray">Gray</string>
<string name="White">White</string>
<string name="SelectColorTitle">Select a color</string>
<string name="UploadImage">Upload image</string>
<string name="SelectImage">Select image</string>
@ -1210,6 +1244,8 @@
<string name="VibrationDefault">Default</string>
<string name="SmartNotifications">Smart Notifications</string>
<string name="NotificationsExceptions">Exceptions</string>
<string name="NotificationsAddAnException">Add an Exception</string>
<string name="NotificationsNewException">New Exception</string>
<string name="NoExceptions">This section will list all chats with non-default notification settings.\n\nYou can customize notifications for a chat by opening its profile and choosing \'Notifications\'.</string>
<string name="EmptyExceptions">None</string>
<string name="SmartNotificationsInfo">%1$d / %2$s</string>
@ -1550,6 +1586,18 @@
<string name="ScreenCaptureAlert">This will hide the contents of your chats or chat list from the task switcher, but you will not be able to take screenshots on Telegram.\n\nYou may need to restart the app for this to take effect.</string>
<string name="TooManyTries">Too many tries.\nPlease try again in %1$s.</string>
<!--media view-->
<string name="January">January</string>
<string name="February">February</string>
<string name="March">March</string>
<string name="April">April</string>
<string name="May">May</string>
<string name="June">June</string>
<string name="July">July</string>
<string name="August">August</string>
<string name="September">September</string>
<string name="October">October</string>
<string name="November">November</string>
<string name="December">December</string>
<string name="SharedFilesTab">FILES</string>
<string name="SharedMediaTab">MEDIA</string>
<string name="SharedLinksTab">LINKS</string>
@ -1614,6 +1662,7 @@
<string name="Gallery">Gallery</string>
<string name="AllPhotos">All photos</string>
<string name="AllMedia">All media</string>
<string name="AllVideos">All videos</string>
<string name="NoPhotos">No photos yet</string>
<string name="PleaseDownload">Please download media first</string>
<string name="PleaseStreamDownload">Please wait for the video to be fully downloaded.</string>
@ -2101,7 +2150,7 @@
<string name="CallMessageReportProblem">Rate Call</string>
<string name="CallReportHint">What went wrong?</string>
<string name="CallReportIncludeLogs">Include technical information</string>
<string name="CallReportLogsExplain">This won\'t reveal the contents of your conversation, but will help us fix the issue sooner.</string>
<string name="CallReportLogsExplain">Doesn\'t reveal chat contents and helps us fix the issue sooner.</string>
<string name="CallReportSent">Thank you for helping make Telegram calls better.</string>
<string name="VoipAnsweringAsAccount">Answering as %s</string>
<string name="VoipQuickReplies">Respond with Text</string>