no message
@ -218,7 +218,6 @@
|
||||
D03B0E541D631E8500955575 /* RingBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0E501D631E8500955575 /* RingBuffer.m */; };
|
||||
D03B0E561D631EA500955575 /* MediaFrameSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0E551D631EA500955575 /* MediaFrameSource.swift */; };
|
||||
D03B0E581D631EB900955575 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E571D631EB900955575 /* CoreMedia.framework */; };
|
||||
D03B0E5A1D63215200955575 /* TelegramCore.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = D03B0E591D63215200955575 /* TelegramCore.xcconfig */; };
|
||||
D03B0E5C1D63241D00955575 /* TelegramCoreIncludes.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0E5B1D63240700955575 /* TelegramCoreIncludes.h */; };
|
||||
D03B0E5E1D6327F600955575 /* SSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E5D1D6327F600955575 /* SSignalKit.framework */; };
|
||||
D03B0E601D6327FF00955575 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E5F1D6327FF00955575 /* libz.tbd */; };
|
||||
@ -228,6 +227,9 @@
|
||||
D03B0E681D63281A00955575 /* libswresample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E641D63281A00955575 /* libswresample.a */; };
|
||||
D03B0E6A1D63283000955575 /* libwebp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E691D63283000955575 /* libwebp.a */; };
|
||||
D03B0E6C1D63283C00955575 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E6B1D63283C00955575 /* libiconv.tbd */; };
|
||||
D03B0E6E1D632E3800955575 /* AuthorizationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0E6D1D632E3800955575 /* AuthorizationController.swift */; };
|
||||
D03B0E8F1D63520500955575 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D03B0E8E1D63520500955575 /* Images.xcassets */; };
|
||||
D03B0E911D6352C900955575 /* FrameworkBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0E901D6352C900955575 /* FrameworkBundle.swift */; };
|
||||
D06706691D512ADB00DED3E3 /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06706641D512ADB00DED3E3 /* AsyncDisplayKit.framework */; };
|
||||
D067066A1D512ADB00DED3E3 /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06706651D512ADB00DED3E3 /* Display.framework */; };
|
||||
D067066C1D512ADB00DED3E3 /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06706671D512ADB00DED3E3 /* Postbox.framework */; };
|
||||
@ -236,6 +238,104 @@
|
||||
D09D8C0B1D4FAB1D0081DBEC /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D09D8C011D4FAB1D0081DBEC /* TelegramCore.framework */; };
|
||||
D09D8C101D4FAB1D0081DBEC /* TelegramCoreTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D09D8C0F1D4FAB1D0081DBEC /* TelegramCoreTests.m */; };
|
||||
D09D8C121D4FAB1D0081DBEC /* TelegramCore.h in Headers */ = {isa = PBXBuildFile; fileRef = D09D8C041D4FAB1D0081DBEC /* TelegramCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D0AB0B921D65E9FA002C78E7 /* ManagedServiceViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B911D65E9FA002C78E7 /* ManagedServiceViews.swift */; };
|
||||
D0AB0B941D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B931D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift */; };
|
||||
D0AB0B961D662F0B002C78E7 /* ManagedChatListHoles.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B951D662F0B002C78E7 /* ManagedChatListHoles.swift */; };
|
||||
D0AB0B981D664E18002C78E7 /* ManagedUnsentMessageIndices.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B971D664E18002C78E7 /* ManagedUnsentMessageIndices.swift */; };
|
||||
D0AB0B9A1D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B991D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift */; };
|
||||
D0DB83661D638F6300A44C96 /* avcodec.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83011D638F6300A44C96 /* avcodec.h */; };
|
||||
D0DB83671D638F6300A44C96 /* avdct.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83021D638F6300A44C96 /* avdct.h */; };
|
||||
D0DB83681D638F6300A44C96 /* avfft.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83031D638F6300A44C96 /* avfft.h */; };
|
||||
D0DB83691D638F6300A44C96 /* d3d11va.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83041D638F6300A44C96 /* d3d11va.h */; };
|
||||
D0DB836A1D638F6300A44C96 /* dirac.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83051D638F6300A44C96 /* dirac.h */; };
|
||||
D0DB836B1D638F6300A44C96 /* dv_profile.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83061D638F6300A44C96 /* dv_profile.h */; };
|
||||
D0DB836C1D638F6300A44C96 /* dxva2.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83071D638F6300A44C96 /* dxva2.h */; };
|
||||
D0DB836D1D638F6300A44C96 /* jni.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83081D638F6300A44C96 /* jni.h */; };
|
||||
D0DB836E1D638F6300A44C96 /* qsv.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83091D638F6300A44C96 /* qsv.h */; };
|
||||
D0DB836F1D638F6300A44C96 /* vaapi.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB830A1D638F6300A44C96 /* vaapi.h */; };
|
||||
D0DB83701D638F6300A44C96 /* vda.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB830B1D638F6300A44C96 /* vda.h */; };
|
||||
D0DB83711D638F6300A44C96 /* vdpau.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB830C1D638F6300A44C96 /* vdpau.h */; };
|
||||
D0DB83721D638F6300A44C96 /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB830D1D638F6300A44C96 /* version.h */; };
|
||||
D0DB83731D638F6300A44C96 /* videotoolbox.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB830E1D638F6300A44C96 /* videotoolbox.h */; };
|
||||
D0DB83741D638F6300A44C96 /* vorbis_parser.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB830F1D638F6300A44C96 /* vorbis_parser.h */; };
|
||||
D0DB83751D638F6300A44C96 /* xvmc.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83101D638F6300A44C96 /* xvmc.h */; };
|
||||
D0DB83761D638F6300A44C96 /* avformat.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83121D638F6300A44C96 /* avformat.h */; };
|
||||
D0DB83771D638F6300A44C96 /* avio.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83131D638F6300A44C96 /* avio.h */; };
|
||||
D0DB83781D638F6300A44C96 /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83141D638F6300A44C96 /* version.h */; };
|
||||
D0DB83791D638F6300A44C96 /* adler32.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83161D638F6300A44C96 /* adler32.h */; };
|
||||
D0DB837A1D638F6300A44C96 /* aes.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83171D638F6300A44C96 /* aes.h */; };
|
||||
D0DB837B1D638F6300A44C96 /* aes_ctr.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83181D638F6300A44C96 /* aes_ctr.h */; };
|
||||
D0DB837C1D638F6300A44C96 /* attributes.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83191D638F6300A44C96 /* attributes.h */; };
|
||||
D0DB837D1D638F6300A44C96 /* audio_fifo.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB831A1D638F6300A44C96 /* audio_fifo.h */; };
|
||||
D0DB837E1D638F6300A44C96 /* avassert.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB831B1D638F6300A44C96 /* avassert.h */; };
|
||||
D0DB837F1D638F6300A44C96 /* avconfig.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB831C1D638F6300A44C96 /* avconfig.h */; };
|
||||
D0DB83801D638F6300A44C96 /* avstring.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB831D1D638F6300A44C96 /* avstring.h */; };
|
||||
D0DB83811D638F6300A44C96 /* avutil.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB831E1D638F6300A44C96 /* avutil.h */; };
|
||||
D0DB83821D638F6300A44C96 /* base64.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB831F1D638F6300A44C96 /* base64.h */; };
|
||||
D0DB83831D638F6300A44C96 /* blowfish.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83201D638F6300A44C96 /* blowfish.h */; };
|
||||
D0DB83841D638F6300A44C96 /* bprint.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83211D638F6300A44C96 /* bprint.h */; };
|
||||
D0DB83851D638F6400A44C96 /* bswap.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83221D638F6300A44C96 /* bswap.h */; };
|
||||
D0DB83861D638F6400A44C96 /* buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83231D638F6300A44C96 /* buffer.h */; };
|
||||
D0DB83871D638F6400A44C96 /* camellia.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83241D638F6300A44C96 /* camellia.h */; };
|
||||
D0DB83881D638F6400A44C96 /* cast5.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83251D638F6300A44C96 /* cast5.h */; };
|
||||
D0DB83891D638F6400A44C96 /* channel_layout.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83261D638F6300A44C96 /* channel_layout.h */; };
|
||||
D0DB838A1D638F6400A44C96 /* common.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83271D638F6300A44C96 /* common.h */; };
|
||||
D0DB838B1D638F6400A44C96 /* cpu.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83281D638F6300A44C96 /* cpu.h */; };
|
||||
D0DB838C1D638F6400A44C96 /* crc.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83291D638F6300A44C96 /* crc.h */; };
|
||||
D0DB838D1D638F6400A44C96 /* des.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB832A1D638F6300A44C96 /* des.h */; };
|
||||
D0DB838E1D638F6400A44C96 /* dict.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB832B1D638F6300A44C96 /* dict.h */; };
|
||||
D0DB838F1D638F6400A44C96 /* display.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB832C1D638F6300A44C96 /* display.h */; };
|
||||
D0DB83901D638F6400A44C96 /* downmix_info.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB832D1D638F6300A44C96 /* downmix_info.h */; };
|
||||
D0DB83911D638F6400A44C96 /* error.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB832E1D638F6300A44C96 /* error.h */; };
|
||||
D0DB83921D638F6400A44C96 /* eval.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB832F1D638F6300A44C96 /* eval.h */; };
|
||||
D0DB83931D638F6400A44C96 /* ffversion.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83301D638F6300A44C96 /* ffversion.h */; };
|
||||
D0DB83941D638F6400A44C96 /* fifo.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83311D638F6300A44C96 /* fifo.h */; };
|
||||
D0DB83951D638F6400A44C96 /* file.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83321D638F6300A44C96 /* file.h */; };
|
||||
D0DB83961D638F6400A44C96 /* frame.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83331D638F6300A44C96 /* frame.h */; };
|
||||
D0DB83971D638F6400A44C96 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83341D638F6300A44C96 /* hash.h */; };
|
||||
D0DB83981D638F6400A44C96 /* hmac.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83351D638F6300A44C96 /* hmac.h */; };
|
||||
D0DB83991D638F6400A44C96 /* hwcontext.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83361D638F6300A44C96 /* hwcontext.h */; };
|
||||
D0DB839A1D638F6400A44C96 /* hwcontext_cuda.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83371D638F6300A44C96 /* hwcontext_cuda.h */; };
|
||||
D0DB839B1D638F6400A44C96 /* hwcontext_dxva2.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83381D638F6300A44C96 /* hwcontext_dxva2.h */; };
|
||||
D0DB839C1D638F6400A44C96 /* hwcontext_vaapi.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83391D638F6300A44C96 /* hwcontext_vaapi.h */; };
|
||||
D0DB839D1D638F6400A44C96 /* hwcontext_vdpau.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB833A1D638F6300A44C96 /* hwcontext_vdpau.h */; };
|
||||
D0DB839E1D638F6400A44C96 /* imgutils.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB833B1D638F6300A44C96 /* imgutils.h */; };
|
||||
D0DB839F1D638F6400A44C96 /* intfloat.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB833C1D638F6300A44C96 /* intfloat.h */; };
|
||||
D0DB83A01D638F6400A44C96 /* intreadwrite.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB833D1D638F6300A44C96 /* intreadwrite.h */; };
|
||||
D0DB83A11D638F6400A44C96 /* lfg.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB833E1D638F6300A44C96 /* lfg.h */; };
|
||||
D0DB83A21D638F6400A44C96 /* log.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB833F1D638F6300A44C96 /* log.h */; };
|
||||
D0DB83A31D638F6400A44C96 /* macros.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83401D638F6300A44C96 /* macros.h */; };
|
||||
D0DB83A41D638F6400A44C96 /* mastering_display_metadata.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83411D638F6300A44C96 /* mastering_display_metadata.h */; };
|
||||
D0DB83A51D638F6400A44C96 /* mathematics.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83421D638F6300A44C96 /* mathematics.h */; };
|
||||
D0DB83A61D638F6400A44C96 /* md5.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83431D638F6300A44C96 /* md5.h */; };
|
||||
D0DB83A71D638F6400A44C96 /* mem.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83441D638F6300A44C96 /* mem.h */; };
|
||||
D0DB83A81D638F6400A44C96 /* motion_vector.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83451D638F6300A44C96 /* motion_vector.h */; };
|
||||
D0DB83A91D638F6400A44C96 /* murmur3.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83461D638F6300A44C96 /* murmur3.h */; };
|
||||
D0DB83AA1D638F6400A44C96 /* opt.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83471D638F6300A44C96 /* opt.h */; };
|
||||
D0DB83AB1D638F6400A44C96 /* parseutils.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83481D638F6300A44C96 /* parseutils.h */; };
|
||||
D0DB83AC1D638F6400A44C96 /* pixdesc.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83491D638F6300A44C96 /* pixdesc.h */; };
|
||||
D0DB83AD1D638F6400A44C96 /* pixelutils.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB834A1D638F6300A44C96 /* pixelutils.h */; };
|
||||
D0DB83AE1D638F6400A44C96 /* pixfmt.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB834B1D638F6300A44C96 /* pixfmt.h */; };
|
||||
D0DB83AF1D638F6400A44C96 /* random_seed.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB834C1D638F6300A44C96 /* random_seed.h */; };
|
||||
D0DB83B01D638F6400A44C96 /* rational.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB834D1D638F6300A44C96 /* rational.h */; };
|
||||
D0DB83B11D638F6400A44C96 /* rc4.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB834E1D638F6300A44C96 /* rc4.h */; };
|
||||
D0DB83B21D638F6400A44C96 /* replaygain.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB834F1D638F6300A44C96 /* replaygain.h */; };
|
||||
D0DB83B31D638F6400A44C96 /* ripemd.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83501D638F6300A44C96 /* ripemd.h */; };
|
||||
D0DB83B41D638F6400A44C96 /* samplefmt.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83511D638F6300A44C96 /* samplefmt.h */; };
|
||||
D0DB83B51D638F6400A44C96 /* sha.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83521D638F6300A44C96 /* sha.h */; };
|
||||
D0DB83B61D638F6400A44C96 /* sha512.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83531D638F6300A44C96 /* sha512.h */; };
|
||||
D0DB83B71D638F6400A44C96 /* stereo3d.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83541D638F6300A44C96 /* stereo3d.h */; };
|
||||
D0DB83B81D638F6400A44C96 /* tea.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83551D638F6300A44C96 /* tea.h */; };
|
||||
D0DB83B91D638F6400A44C96 /* threadmessage.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83561D638F6300A44C96 /* threadmessage.h */; };
|
||||
D0DB83BA1D638F6400A44C96 /* time.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83571D638F6300A44C96 /* time.h */; };
|
||||
D0DB83BB1D638F6400A44C96 /* timecode.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83581D638F6300A44C96 /* timecode.h */; };
|
||||
D0DB83BC1D638F6400A44C96 /* timestamp.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83591D638F6300A44C96 /* timestamp.h */; };
|
||||
D0DB83BD1D638F6400A44C96 /* tree.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB835A1D638F6300A44C96 /* tree.h */; };
|
||||
D0DB83BE1D638F6400A44C96 /* twofish.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB835B1D638F6300A44C96 /* twofish.h */; };
|
||||
D0DB83BF1D638F6400A44C96 /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB835C1D638F6300A44C96 /* version.h */; };
|
||||
D0DB83C01D638F6400A44C96 /* xtea.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB835D1D638F6300A44C96 /* xtea.h */; };
|
||||
D0DB83C11D638F6400A44C96 /* swresample.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB835F1D638F6300A44C96 /* swresample.h */; };
|
||||
D0DB83C21D638F6400A44C96 /* version.h in Headers */ = {isa = PBXBuildFile; fileRef = D0DB83601D638F6300A44C96 /* version.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@ -470,9 +570,11 @@
|
||||
D03B0E641D63281A00955575 /* libswresample.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libswresample.a; path = "third-party/FFmpeg-iOS/lib/libswresample.a"; sourceTree = "<group>"; };
|
||||
D03B0E691D63283000955575 /* libwebp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libwebp.a; path = "third-party/libwebp/lib/libwebp.a"; sourceTree = "<group>"; };
|
||||
D03B0E6B1D63283C00955575 /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
|
||||
D03B0E6D1D632E3800955575 /* AuthorizationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthorizationController.swift; sourceTree = "<group>"; };
|
||||
D03B0E8E1D63520500955575 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = TelegramCore/Images.xcassets; sourceTree = "<group>"; };
|
||||
D03B0E901D6352C900955575 /* FrameworkBundle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FrameworkBundle.swift; sourceTree = "<group>"; };
|
||||
D06706641D512ADB00DED3E3 /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AsyncDisplayKit.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/AsyncDisplayKit.framework"; sourceTree = "<group>"; };
|
||||
D06706651D512ADB00DED3E3 /* Display.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Display.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/Display.framework"; sourceTree = "<group>"; };
|
||||
D06706661D512ADB00DED3E3 /* MtProtoKitDynamic.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MtProtoKitDynamic.framework; path = "../MtProtoKit/build/Debug-iphoneos/MtProtoKitDynamic.framework"; sourceTree = "<group>"; };
|
||||
D06706671D512ADB00DED3E3 /* Postbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Postbox.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/Postbox.framework"; sourceTree = "<group>"; };
|
||||
D06706681D512ADB00DED3E3 /* SwiftSignalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftSignalKit.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/SwiftSignalKit.framework"; sourceTree = "<group>"; };
|
||||
D067066E1D512AEB00DED3E3 /* MtProtoKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MtProtoKit.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/MtProtoKit.framework"; sourceTree = "<group>"; };
|
||||
@ -482,6 +584,104 @@
|
||||
D09D8C0A1D4FAB1D0081DBEC /* TelegramCoreTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TelegramCoreTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D09D8C0F1D4FAB1D0081DBEC /* TelegramCoreTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TelegramCoreTests.m; sourceTree = "<group>"; };
|
||||
D09D8C111D4FAB1D0081DBEC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D0AB0B911D65E9FA002C78E7 /* ManagedServiceViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedServiceViews.swift; sourceTree = "<group>"; };
|
||||
D0AB0B931D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedMessageHistoryHoles.swift; sourceTree = "<group>"; };
|
||||
D0AB0B951D662F0B002C78E7 /* ManagedChatListHoles.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedChatListHoles.swift; sourceTree = "<group>"; };
|
||||
D0AB0B971D664E18002C78E7 /* ManagedUnsentMessageIndices.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedUnsentMessageIndices.swift; sourceTree = "<group>"; };
|
||||
D0AB0B991D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedSynchronizePeerReadStates.swift; sourceTree = "<group>"; };
|
||||
D0DB83011D638F6300A44C96 /* avcodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avcodec.h; sourceTree = "<group>"; };
|
||||
D0DB83021D638F6300A44C96 /* avdct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avdct.h; sourceTree = "<group>"; };
|
||||
D0DB83031D638F6300A44C96 /* avfft.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avfft.h; sourceTree = "<group>"; };
|
||||
D0DB83041D638F6300A44C96 /* d3d11va.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = d3d11va.h; sourceTree = "<group>"; };
|
||||
D0DB83051D638F6300A44C96 /* dirac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dirac.h; sourceTree = "<group>"; };
|
||||
D0DB83061D638F6300A44C96 /* dv_profile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dv_profile.h; sourceTree = "<group>"; };
|
||||
D0DB83071D638F6300A44C96 /* dxva2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dxva2.h; sourceTree = "<group>"; };
|
||||
D0DB83081D638F6300A44C96 /* jni.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jni.h; sourceTree = "<group>"; };
|
||||
D0DB83091D638F6300A44C96 /* qsv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = qsv.h; sourceTree = "<group>"; };
|
||||
D0DB830A1D638F6300A44C96 /* vaapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vaapi.h; sourceTree = "<group>"; };
|
||||
D0DB830B1D638F6300A44C96 /* vda.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vda.h; sourceTree = "<group>"; };
|
||||
D0DB830C1D638F6300A44C96 /* vdpau.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vdpau.h; sourceTree = "<group>"; };
|
||||
D0DB830D1D638F6300A44C96 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = "<group>"; };
|
||||
D0DB830E1D638F6300A44C96 /* videotoolbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = videotoolbox.h; sourceTree = "<group>"; };
|
||||
D0DB830F1D638F6300A44C96 /* vorbis_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vorbis_parser.h; sourceTree = "<group>"; };
|
||||
D0DB83101D638F6300A44C96 /* xvmc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xvmc.h; sourceTree = "<group>"; };
|
||||
D0DB83121D638F6300A44C96 /* avformat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avformat.h; sourceTree = "<group>"; };
|
||||
D0DB83131D638F6300A44C96 /* avio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avio.h; sourceTree = "<group>"; };
|
||||
D0DB83141D638F6300A44C96 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = "<group>"; };
|
||||
D0DB83161D638F6300A44C96 /* adler32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = adler32.h; sourceTree = "<group>"; };
|
||||
D0DB83171D638F6300A44C96 /* aes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aes.h; sourceTree = "<group>"; };
|
||||
D0DB83181D638F6300A44C96 /* aes_ctr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aes_ctr.h; sourceTree = "<group>"; };
|
||||
D0DB83191D638F6300A44C96 /* attributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = attributes.h; sourceTree = "<group>"; };
|
||||
D0DB831A1D638F6300A44C96 /* audio_fifo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio_fifo.h; sourceTree = "<group>"; };
|
||||
D0DB831B1D638F6300A44C96 /* avassert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avassert.h; sourceTree = "<group>"; };
|
||||
D0DB831C1D638F6300A44C96 /* avconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avconfig.h; sourceTree = "<group>"; };
|
||||
D0DB831D1D638F6300A44C96 /* avstring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avstring.h; sourceTree = "<group>"; };
|
||||
D0DB831E1D638F6300A44C96 /* avutil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avutil.h; sourceTree = "<group>"; };
|
||||
D0DB831F1D638F6300A44C96 /* base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = base64.h; sourceTree = "<group>"; };
|
||||
D0DB83201D638F6300A44C96 /* blowfish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = blowfish.h; sourceTree = "<group>"; };
|
||||
D0DB83211D638F6300A44C96 /* bprint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bprint.h; sourceTree = "<group>"; };
|
||||
D0DB83221D638F6300A44C96 /* bswap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bswap.h; sourceTree = "<group>"; };
|
||||
D0DB83231D638F6300A44C96 /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffer.h; sourceTree = "<group>"; };
|
||||
D0DB83241D638F6300A44C96 /* camellia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = camellia.h; sourceTree = "<group>"; };
|
||||
D0DB83251D638F6300A44C96 /* cast5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cast5.h; sourceTree = "<group>"; };
|
||||
D0DB83261D638F6300A44C96 /* channel_layout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = channel_layout.h; sourceTree = "<group>"; };
|
||||
D0DB83271D638F6300A44C96 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; };
|
||||
D0DB83281D638F6300A44C96 /* cpu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpu.h; sourceTree = "<group>"; };
|
||||
D0DB83291D638F6300A44C96 /* crc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crc.h; sourceTree = "<group>"; };
|
||||
D0DB832A1D638F6300A44C96 /* des.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = des.h; sourceTree = "<group>"; };
|
||||
D0DB832B1D638F6300A44C96 /* dict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dict.h; sourceTree = "<group>"; };
|
||||
D0DB832C1D638F6300A44C96 /* display.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = display.h; sourceTree = "<group>"; };
|
||||
D0DB832D1D638F6300A44C96 /* downmix_info.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = downmix_info.h; sourceTree = "<group>"; };
|
||||
D0DB832E1D638F6300A44C96 /* error.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = error.h; sourceTree = "<group>"; };
|
||||
D0DB832F1D638F6300A44C96 /* eval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = eval.h; sourceTree = "<group>"; };
|
||||
D0DB83301D638F6300A44C96 /* ffversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ffversion.h; sourceTree = "<group>"; };
|
||||
D0DB83311D638F6300A44C96 /* fifo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fifo.h; sourceTree = "<group>"; };
|
||||
D0DB83321D638F6300A44C96 /* file.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = file.h; sourceTree = "<group>"; };
|
||||
D0DB83331D638F6300A44C96 /* frame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = frame.h; sourceTree = "<group>"; };
|
||||
D0DB83341D638F6300A44C96 /* hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hash.h; sourceTree = "<group>"; };
|
||||
D0DB83351D638F6300A44C96 /* hmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hmac.h; sourceTree = "<group>"; };
|
||||
D0DB83361D638F6300A44C96 /* hwcontext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hwcontext.h; sourceTree = "<group>"; };
|
||||
D0DB83371D638F6300A44C96 /* hwcontext_cuda.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hwcontext_cuda.h; sourceTree = "<group>"; };
|
||||
D0DB83381D638F6300A44C96 /* hwcontext_dxva2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hwcontext_dxva2.h; sourceTree = "<group>"; };
|
||||
D0DB83391D638F6300A44C96 /* hwcontext_vaapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hwcontext_vaapi.h; sourceTree = "<group>"; };
|
||||
D0DB833A1D638F6300A44C96 /* hwcontext_vdpau.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hwcontext_vdpau.h; sourceTree = "<group>"; };
|
||||
D0DB833B1D638F6300A44C96 /* imgutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgutils.h; sourceTree = "<group>"; };
|
||||
D0DB833C1D638F6300A44C96 /* intfloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = intfloat.h; sourceTree = "<group>"; };
|
||||
D0DB833D1D638F6300A44C96 /* intreadwrite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = intreadwrite.h; sourceTree = "<group>"; };
|
||||
D0DB833E1D638F6300A44C96 /* lfg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lfg.h; sourceTree = "<group>"; };
|
||||
D0DB833F1D638F6300A44C96 /* log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = log.h; sourceTree = "<group>"; };
|
||||
D0DB83401D638F6300A44C96 /* macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = macros.h; sourceTree = "<group>"; };
|
||||
D0DB83411D638F6300A44C96 /* mastering_display_metadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mastering_display_metadata.h; sourceTree = "<group>"; };
|
||||
D0DB83421D638F6300A44C96 /* mathematics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mathematics.h; sourceTree = "<group>"; };
|
||||
D0DB83431D638F6300A44C96 /* md5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = md5.h; sourceTree = "<group>"; };
|
||||
D0DB83441D638F6300A44C96 /* mem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mem.h; sourceTree = "<group>"; };
|
||||
D0DB83451D638F6300A44C96 /* motion_vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = motion_vector.h; sourceTree = "<group>"; };
|
||||
D0DB83461D638F6300A44C96 /* murmur3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = murmur3.h; sourceTree = "<group>"; };
|
||||
D0DB83471D638F6300A44C96 /* opt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = opt.h; sourceTree = "<group>"; };
|
||||
D0DB83481D638F6300A44C96 /* parseutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parseutils.h; sourceTree = "<group>"; };
|
||||
D0DB83491D638F6300A44C96 /* pixdesc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pixdesc.h; sourceTree = "<group>"; };
|
||||
D0DB834A1D638F6300A44C96 /* pixelutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pixelutils.h; sourceTree = "<group>"; };
|
||||
D0DB834B1D638F6300A44C96 /* pixfmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pixfmt.h; sourceTree = "<group>"; };
|
||||
D0DB834C1D638F6300A44C96 /* random_seed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = random_seed.h; sourceTree = "<group>"; };
|
||||
D0DB834D1D638F6300A44C96 /* rational.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rational.h; sourceTree = "<group>"; };
|
||||
D0DB834E1D638F6300A44C96 /* rc4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rc4.h; sourceTree = "<group>"; };
|
||||
D0DB834F1D638F6300A44C96 /* replaygain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = replaygain.h; sourceTree = "<group>"; };
|
||||
D0DB83501D638F6300A44C96 /* ripemd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ripemd.h; sourceTree = "<group>"; };
|
||||
D0DB83511D638F6300A44C96 /* samplefmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = samplefmt.h; sourceTree = "<group>"; };
|
||||
D0DB83521D638F6300A44C96 /* sha.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sha.h; sourceTree = "<group>"; };
|
||||
D0DB83531D638F6300A44C96 /* sha512.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sha512.h; sourceTree = "<group>"; };
|
||||
D0DB83541D638F6300A44C96 /* stereo3d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stereo3d.h; sourceTree = "<group>"; };
|
||||
D0DB83551D638F6300A44C96 /* tea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tea.h; sourceTree = "<group>"; };
|
||||
D0DB83561D638F6300A44C96 /* threadmessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = threadmessage.h; sourceTree = "<group>"; };
|
||||
D0DB83571D638F6300A44C96 /* time.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = time.h; sourceTree = "<group>"; };
|
||||
D0DB83581D638F6300A44C96 /* timecode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timecode.h; sourceTree = "<group>"; };
|
||||
D0DB83591D638F6300A44C96 /* timestamp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timestamp.h; sourceTree = "<group>"; };
|
||||
D0DB835A1D638F6300A44C96 /* tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tree.h; sourceTree = "<group>"; };
|
||||
D0DB835B1D638F6300A44C96 /* twofish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = twofish.h; sourceTree = "<group>"; };
|
||||
D0DB835C1D638F6300A44C96 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = "<group>"; };
|
||||
D0DB835D1D638F6300A44C96 /* xtea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xtea.h; sourceTree = "<group>"; };
|
||||
D0DB835F1D638F6300A44C96 /* swresample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = swresample.h; sourceTree = "<group>"; };
|
||||
D0DB83601D638F6300A44C96 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -520,6 +720,7 @@
|
||||
D03B0C791D62153400955575 /* third-party */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0DB82FE1D638F6300A44C96 /* FFmpeg-iOS */,
|
||||
D03B0CAF1D6222D400955575 /* libwebp */,
|
||||
D03B0C7A1D6222CA00955575 /* libphonenumber-iOS */,
|
||||
);
|
||||
@ -760,6 +961,11 @@
|
||||
D03B0D621D631A8B00955575 /* AccountSettings.swift */,
|
||||
D03B0D631D631A8B00955575 /* AccountViewTracker.swift */,
|
||||
D03B0D641D631A8B00955575 /* RecentPeers.swift */,
|
||||
D0AB0B911D65E9FA002C78E7 /* ManagedServiceViews.swift */,
|
||||
D0AB0B931D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift */,
|
||||
D0AB0B951D662F0B002C78E7 /* ManagedChatListHoles.swift */,
|
||||
D0AB0B971D664E18002C78E7 /* ManagedUnsentMessageIndices.swift */,
|
||||
D0AB0B991D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift */,
|
||||
);
|
||||
name = Account;
|
||||
sourceTree = "<group>";
|
||||
@ -786,6 +992,7 @@
|
||||
children = (
|
||||
D03B0D741D631AF200955575 /* Components */,
|
||||
D03B0DA01D631B9200955575 /* Controllers */,
|
||||
D03B0E901D6352C900955575 /* FrameworkBundle.swift */,
|
||||
);
|
||||
name = "User Interface";
|
||||
sourceTree = "<group>";
|
||||
@ -879,6 +1086,7 @@
|
||||
D03B0DA11D631BA800955575 /* Authorization */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D03B0E6D1D632E3800955575 /* AuthorizationController.swift */,
|
||||
D03B0DA21D631BBF00955575 /* AuthorizationCodeController.swift */,
|
||||
D03B0DA31D631BBF00955575 /* AuthorizationCodeControllerNode.swift */,
|
||||
D03B0DA61D631BBF00955575 /* AuthorizationPasswordController.swift */,
|
||||
@ -1060,6 +1268,7 @@
|
||||
D03B0E3A1D631E4400955575 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D03B0E5B1D63240700955575 /* TelegramCoreIncludes.h */,
|
||||
D03B0E4D1D631E8500955575 /* FFMpegSwResample.h */,
|
||||
D03B0E4E1D631E8500955575 /* FFMpegSwResample.m */,
|
||||
D03B0E4F1D631E8500955575 /* RingBuffer.h */,
|
||||
@ -1092,7 +1301,6 @@
|
||||
D067066E1D512AEB00DED3E3 /* MtProtoKit.framework */,
|
||||
D06706641D512ADB00DED3E3 /* AsyncDisplayKit.framework */,
|
||||
D06706651D512ADB00DED3E3 /* Display.framework */,
|
||||
D06706661D512ADB00DED3E3 /* MtProtoKitDynamic.framework */,
|
||||
D06706671D512ADB00DED3E3 /* Postbox.framework */,
|
||||
D06706681D512ADB00DED3E3 /* SwiftSignalKit.framework */,
|
||||
);
|
||||
@ -1102,6 +1310,7 @@
|
||||
D09D8BF71D4FAB1D0081DBEC = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D03B0E8E1D63520500955575 /* Images.xcassets */,
|
||||
D03B0E591D63215200955575 /* TelegramCore.xcconfig */,
|
||||
D09D8C031D4FAB1D0081DBEC /* TelegramCore */,
|
||||
D09D8C0E1D4FAB1D0081DBEC /* TelegramCoreTests */,
|
||||
@ -1134,7 +1343,6 @@
|
||||
D03B0D731D631ADB00955575 /* User Interface */,
|
||||
D03B0E3A1D631E4400955575 /* Supporting Files */,
|
||||
D09D8C041D4FAB1D0081DBEC /* TelegramCore.h */,
|
||||
D03B0E5B1D63240700955575 /* TelegramCoreIncludes.h */,
|
||||
D09D8C051D4FAB1D0081DBEC /* Info.plist */,
|
||||
);
|
||||
path = TelegramCore;
|
||||
@ -1149,6 +1357,147 @@
|
||||
path = TelegramCoreTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0DB82FE1D638F6300A44C96 /* FFmpeg-iOS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0DB82FF1D638F6300A44C96 /* include */,
|
||||
);
|
||||
name = "FFmpeg-iOS";
|
||||
path = "third-party/FFmpeg-iOS";
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
D0DB82FF1D638F6300A44C96 /* include */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0DB83001D638F6300A44C96 /* libavcodec */,
|
||||
D0DB83111D638F6300A44C96 /* libavformat */,
|
||||
D0DB83151D638F6300A44C96 /* libavutil */,
|
||||
D0DB835E1D638F6300A44C96 /* libswresample */,
|
||||
);
|
||||
path = include;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0DB83001D638F6300A44C96 /* libavcodec */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0DB83011D638F6300A44C96 /* avcodec.h */,
|
||||
D0DB83021D638F6300A44C96 /* avdct.h */,
|
||||
D0DB83031D638F6300A44C96 /* avfft.h */,
|
||||
D0DB83041D638F6300A44C96 /* d3d11va.h */,
|
||||
D0DB83051D638F6300A44C96 /* dirac.h */,
|
||||
D0DB83061D638F6300A44C96 /* dv_profile.h */,
|
||||
D0DB83071D638F6300A44C96 /* dxva2.h */,
|
||||
D0DB83081D638F6300A44C96 /* jni.h */,
|
||||
D0DB83091D638F6300A44C96 /* qsv.h */,
|
||||
D0DB830A1D638F6300A44C96 /* vaapi.h */,
|
||||
D0DB830B1D638F6300A44C96 /* vda.h */,
|
||||
D0DB830C1D638F6300A44C96 /* vdpau.h */,
|
||||
D0DB830D1D638F6300A44C96 /* version.h */,
|
||||
D0DB830E1D638F6300A44C96 /* videotoolbox.h */,
|
||||
D0DB830F1D638F6300A44C96 /* vorbis_parser.h */,
|
||||
D0DB83101D638F6300A44C96 /* xvmc.h */,
|
||||
);
|
||||
path = libavcodec;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0DB83111D638F6300A44C96 /* libavformat */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0DB83121D638F6300A44C96 /* avformat.h */,
|
||||
D0DB83131D638F6300A44C96 /* avio.h */,
|
||||
D0DB83141D638F6300A44C96 /* version.h */,
|
||||
);
|
||||
path = libavformat;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0DB83151D638F6300A44C96 /* libavutil */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0DB83161D638F6300A44C96 /* adler32.h */,
|
||||
D0DB83171D638F6300A44C96 /* aes.h */,
|
||||
D0DB83181D638F6300A44C96 /* aes_ctr.h */,
|
||||
D0DB83191D638F6300A44C96 /* attributes.h */,
|
||||
D0DB831A1D638F6300A44C96 /* audio_fifo.h */,
|
||||
D0DB831B1D638F6300A44C96 /* avassert.h */,
|
||||
D0DB831C1D638F6300A44C96 /* avconfig.h */,
|
||||
D0DB831D1D638F6300A44C96 /* avstring.h */,
|
||||
D0DB831E1D638F6300A44C96 /* avutil.h */,
|
||||
D0DB831F1D638F6300A44C96 /* base64.h */,
|
||||
D0DB83201D638F6300A44C96 /* blowfish.h */,
|
||||
D0DB83211D638F6300A44C96 /* bprint.h */,
|
||||
D0DB83221D638F6300A44C96 /* bswap.h */,
|
||||
D0DB83231D638F6300A44C96 /* buffer.h */,
|
||||
D0DB83241D638F6300A44C96 /* camellia.h */,
|
||||
D0DB83251D638F6300A44C96 /* cast5.h */,
|
||||
D0DB83261D638F6300A44C96 /* channel_layout.h */,
|
||||
D0DB83271D638F6300A44C96 /* common.h */,
|
||||
D0DB83281D638F6300A44C96 /* cpu.h */,
|
||||
D0DB83291D638F6300A44C96 /* crc.h */,
|
||||
D0DB832A1D638F6300A44C96 /* des.h */,
|
||||
D0DB832B1D638F6300A44C96 /* dict.h */,
|
||||
D0DB832C1D638F6300A44C96 /* display.h */,
|
||||
D0DB832D1D638F6300A44C96 /* downmix_info.h */,
|
||||
D0DB832E1D638F6300A44C96 /* error.h */,
|
||||
D0DB832F1D638F6300A44C96 /* eval.h */,
|
||||
D0DB83301D638F6300A44C96 /* ffversion.h */,
|
||||
D0DB83311D638F6300A44C96 /* fifo.h */,
|
||||
D0DB83321D638F6300A44C96 /* file.h */,
|
||||
D0DB83331D638F6300A44C96 /* frame.h */,
|
||||
D0DB83341D638F6300A44C96 /* hash.h */,
|
||||
D0DB83351D638F6300A44C96 /* hmac.h */,
|
||||
D0DB83361D638F6300A44C96 /* hwcontext.h */,
|
||||
D0DB83371D638F6300A44C96 /* hwcontext_cuda.h */,
|
||||
D0DB83381D638F6300A44C96 /* hwcontext_dxva2.h */,
|
||||
D0DB83391D638F6300A44C96 /* hwcontext_vaapi.h */,
|
||||
D0DB833A1D638F6300A44C96 /* hwcontext_vdpau.h */,
|
||||
D0DB833B1D638F6300A44C96 /* imgutils.h */,
|
||||
D0DB833C1D638F6300A44C96 /* intfloat.h */,
|
||||
D0DB833D1D638F6300A44C96 /* intreadwrite.h */,
|
||||
D0DB833E1D638F6300A44C96 /* lfg.h */,
|
||||
D0DB833F1D638F6300A44C96 /* log.h */,
|
||||
D0DB83401D638F6300A44C96 /* macros.h */,
|
||||
D0DB83411D638F6300A44C96 /* mastering_display_metadata.h */,
|
||||
D0DB83421D638F6300A44C96 /* mathematics.h */,
|
||||
D0DB83431D638F6300A44C96 /* md5.h */,
|
||||
D0DB83441D638F6300A44C96 /* mem.h */,
|
||||
D0DB83451D638F6300A44C96 /* motion_vector.h */,
|
||||
D0DB83461D638F6300A44C96 /* murmur3.h */,
|
||||
D0DB83471D638F6300A44C96 /* opt.h */,
|
||||
D0DB83481D638F6300A44C96 /* parseutils.h */,
|
||||
D0DB83491D638F6300A44C96 /* pixdesc.h */,
|
||||
D0DB834A1D638F6300A44C96 /* pixelutils.h */,
|
||||
D0DB834B1D638F6300A44C96 /* pixfmt.h */,
|
||||
D0DB834C1D638F6300A44C96 /* random_seed.h */,
|
||||
D0DB834D1D638F6300A44C96 /* rational.h */,
|
||||
D0DB834E1D638F6300A44C96 /* rc4.h */,
|
||||
D0DB834F1D638F6300A44C96 /* replaygain.h */,
|
||||
D0DB83501D638F6300A44C96 /* ripemd.h */,
|
||||
D0DB83511D638F6300A44C96 /* samplefmt.h */,
|
||||
D0DB83521D638F6300A44C96 /* sha.h */,
|
||||
D0DB83531D638F6300A44C96 /* sha512.h */,
|
||||
D0DB83541D638F6300A44C96 /* stereo3d.h */,
|
||||
D0DB83551D638F6300A44C96 /* tea.h */,
|
||||
D0DB83561D638F6300A44C96 /* threadmessage.h */,
|
||||
D0DB83571D638F6300A44C96 /* time.h */,
|
||||
D0DB83581D638F6300A44C96 /* timecode.h */,
|
||||
D0DB83591D638F6300A44C96 /* timestamp.h */,
|
||||
D0DB835A1D638F6300A44C96 /* tree.h */,
|
||||
D0DB835B1D638F6300A44C96 /* twofish.h */,
|
||||
D0DB835C1D638F6300A44C96 /* version.h */,
|
||||
D0DB835D1D638F6300A44C96 /* xtea.h */,
|
||||
);
|
||||
path = libavutil;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D0DB835E1D638F6300A44C96 /* libswresample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D0DB835F1D638F6300A44C96 /* swresample.h */,
|
||||
D0DB83601D638F6300A44C96 /* version.h */,
|
||||
);
|
||||
path = libswresample;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
@ -1156,30 +1505,123 @@
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D0DB838E1D638F6400A44C96 /* dict.h in Headers */,
|
||||
D0DB836E1D638F6300A44C96 /* qsv.h in Headers */,
|
||||
D0DB83701D638F6300A44C96 /* vda.h in Headers */,
|
||||
D0DB83911D638F6400A44C96 /* error.h in Headers */,
|
||||
D0DB837B1D638F6300A44C96 /* aes_ctr.h in Headers */,
|
||||
D0DB83901D638F6400A44C96 /* downmix_info.h in Headers */,
|
||||
D0DB83841D638F6300A44C96 /* bprint.h in Headers */,
|
||||
D03B0E4B1D631E7200955575 /* UIImage+WebP.h in Headers */,
|
||||
D0DB83AB1D638F6400A44C96 /* parseutils.h in Headers */,
|
||||
D0DB83BC1D638F6400A44C96 /* timestamp.h in Headers */,
|
||||
D0DB839C1D638F6400A44C96 /* hwcontext_vaapi.h in Headers */,
|
||||
D03B0CA11D6222CA00955575 /* NBNumberFormat.h in Headers */,
|
||||
D0DB83991D638F6400A44C96 /* hwcontext.h in Headers */,
|
||||
D03B0CA91D6222CA00955575 /* NBPhoneNumberDefines.h in Headers */,
|
||||
D03B0CB51D6222E500955575 /* types.h in Headers */,
|
||||
D0DB836B1D638F6300A44C96 /* dv_profile.h in Headers */,
|
||||
D0DB83AE1D638F6400A44C96 /* pixfmt.h in Headers */,
|
||||
D03B0E531D631E8500955575 /* RingBuffer.h in Headers */,
|
||||
D0DB83851D638F6400A44C96 /* bswap.h in Headers */,
|
||||
D03B0E511D631E8500955575 /* FFMpegSwResample.h in Headers */,
|
||||
D0DB83891D638F6400A44C96 /* channel_layout.h in Headers */,
|
||||
D0DB83721D638F6300A44C96 /* version.h in Headers */,
|
||||
D0DB837F1D638F6300A44C96 /* avconfig.h in Headers */,
|
||||
D0DB83881D638F6400A44C96 /* cast5.h in Headers */,
|
||||
D0DB83B41D638F6400A44C96 /* samplefmt.h in Headers */,
|
||||
D0DB837E1D638F6300A44C96 /* avassert.h in Headers */,
|
||||
D0DB83751D638F6300A44C96 /* xvmc.h in Headers */,
|
||||
D0DB83B81D638F6400A44C96 /* tea.h in Headers */,
|
||||
D03B0E431D631E6600955575 /* NetworkLogging.h in Headers */,
|
||||
D0DB83C11D638F6400A44C96 /* swresample.h in Headers */,
|
||||
D0DB83A01D638F6400A44C96 /* intreadwrite.h in Headers */,
|
||||
D03B0E491D631E7200955575 /* TryCatchCpp.h in Headers */,
|
||||
D0DB83B61D638F6400A44C96 /* sha512.h in Headers */,
|
||||
D03B0C9B1D6222CA00955575 /* NBMetadataCoreTest.h in Headers */,
|
||||
D0DB83681D638F6300A44C96 /* avfft.h in Headers */,
|
||||
D0DB83981D638F6400A44C96 /* hmac.h in Headers */,
|
||||
D0DB837C1D638F6300A44C96 /* attributes.h in Headers */,
|
||||
D0DB836F1D638F6300A44C96 /* vaapi.h in Headers */,
|
||||
D0DB836A1D638F6300A44C96 /* dirac.h in Headers */,
|
||||
D03B0CAB1D6222CA00955575 /* NBPhoneNumberDesc.h in Headers */,
|
||||
D0DB83C21D638F6400A44C96 /* version.h in Headers */,
|
||||
D0DB83BB1D638F6400A44C96 /* timecode.h in Headers */,
|
||||
D0DB83831D638F6300A44C96 /* blowfish.h in Headers */,
|
||||
D0DB83781D638F6300A44C96 /* version.h in Headers */,
|
||||
D0DB83761D638F6300A44C96 /* avformat.h in Headers */,
|
||||
D0DB83B51D638F6400A44C96 /* sha.h in Headers */,
|
||||
D03B0E3F1D631E5E00955575 /* FastBlur.h in Headers */,
|
||||
D0DB839A1D638F6400A44C96 /* hwcontext_cuda.h in Headers */,
|
||||
D0DB838F1D638F6400A44C96 /* display.h in Headers */,
|
||||
D0DB838A1D638F6400A44C96 /* common.h in Headers */,
|
||||
D0DB837D1D638F6300A44C96 /* audio_fifo.h in Headers */,
|
||||
D0DB83951D638F6400A44C96 /* file.h in Headers */,
|
||||
D0DB83A71D638F6400A44C96 /* mem.h in Headers */,
|
||||
D0DB83671D638F6300A44C96 /* avdct.h in Headers */,
|
||||
D0DB83931D638F6400A44C96 /* ffversion.h in Headers */,
|
||||
D0DB838C1D638F6400A44C96 /* crc.h in Headers */,
|
||||
D03B0CA51D6222CA00955575 /* NBPhoneMetaDataGenerator.h in Headers */,
|
||||
D0DB83731D638F6300A44C96 /* videotoolbox.h in Headers */,
|
||||
D0DB83971D638F6400A44C96 /* hash.h in Headers */,
|
||||
D0DB83BE1D638F6400A44C96 /* twofish.h in Headers */,
|
||||
D0DB83BA1D638F6400A44C96 /* time.h in Headers */,
|
||||
D09D8C121D4FAB1D0081DBEC /* TelegramCore.h in Headers */,
|
||||
D0DB83AC1D638F6400A44C96 /* pixdesc.h in Headers */,
|
||||
D03B0E5C1D63241D00955575 /* TelegramCoreIncludes.h in Headers */,
|
||||
D0DB83AD1D638F6400A44C96 /* pixelutils.h in Headers */,
|
||||
D0DB83871D638F6400A44C96 /* camellia.h in Headers */,
|
||||
D0DB839B1D638F6400A44C96 /* hwcontext_dxva2.h in Headers */,
|
||||
D0DB83711D638F6300A44C96 /* vdpau.h in Headers */,
|
||||
D0DB83661D638F6300A44C96 /* avcodec.h in Headers */,
|
||||
D03B0CA31D6222CA00955575 /* NBPhoneMetaData.h in Headers */,
|
||||
D0DB83B11D638F6400A44C96 /* rc4.h in Headers */,
|
||||
D03B0CA71D6222CA00955575 /* NBPhoneNumber.h in Headers */,
|
||||
D0DB83771D638F6300A44C96 /* avio.h in Headers */,
|
||||
D0DB83961D638F6400A44C96 /* frame.h in Headers */,
|
||||
D0DB836C1D638F6300A44C96 /* dxva2.h in Headers */,
|
||||
D0DB83BF1D638F6400A44C96 /* version.h in Headers */,
|
||||
D0DB839D1D638F6400A44C96 /* hwcontext_vdpau.h in Headers */,
|
||||
D0DB83A11D638F6400A44C96 /* lfg.h in Headers */,
|
||||
D0DB83791D638F6300A44C96 /* adler32.h in Headers */,
|
||||
D0DB837A1D638F6300A44C96 /* aes.h in Headers */,
|
||||
D0DB83BD1D638F6400A44C96 /* tree.h in Headers */,
|
||||
D0DB83801D638F6300A44C96 /* avstring.h in Headers */,
|
||||
D0DB83B21D638F6400A44C96 /* replaygain.h in Headers */,
|
||||
D03B0CB31D6222E500955575 /* decode.h in Headers */,
|
||||
D0DB83821D638F6300A44C96 /* base64.h in Headers */,
|
||||
D0DB839E1D638F6400A44C96 /* imgutils.h in Headers */,
|
||||
D0DB839F1D638F6400A44C96 /* intfloat.h in Headers */,
|
||||
D0DB83A41D638F6400A44C96 /* mastering_display_metadata.h in Headers */,
|
||||
D03B0C951D6222CA00955575 /* NBAsYouTypeFormatter.h in Headers */,
|
||||
D03B0C9F1D6222CA00955575 /* NBMetadataHelper.h in Headers */,
|
||||
D0DB83B71D638F6400A44C96 /* stereo3d.h in Headers */,
|
||||
D0DB83A81D638F6400A44C96 /* motion_vector.h in Headers */,
|
||||
D0DB838B1D638F6400A44C96 /* cpu.h in Headers */,
|
||||
D0DB83AF1D638F6400A44C96 /* random_seed.h in Headers */,
|
||||
D03B0C971D6222CA00955575 /* NBMetadataCore.h in Headers */,
|
||||
D0DB83691D638F6300A44C96 /* d3d11va.h in Headers */,
|
||||
D0DB83A61D638F6400A44C96 /* md5.h in Headers */,
|
||||
D0DB83C01D638F6400A44C96 /* xtea.h in Headers */,
|
||||
D0DB838D1D638F6400A44C96 /* des.h in Headers */,
|
||||
D0DB83B91D638F6400A44C96 /* threadmessage.h in Headers */,
|
||||
D0DB83A51D638F6400A44C96 /* mathematics.h in Headers */,
|
||||
D03B0CB41D6222E500955575 /* encode.h in Headers */,
|
||||
D0DB83921D638F6400A44C96 /* eval.h in Headers */,
|
||||
D0DB836D1D638F6300A44C96 /* jni.h in Headers */,
|
||||
D0DB83A21D638F6400A44C96 /* log.h in Headers */,
|
||||
D0DB83811D638F6300A44C96 /* avutil.h in Headers */,
|
||||
D0DB83A31D638F6400A44C96 /* macros.h in Headers */,
|
||||
D0DB83941D638F6400A44C96 /* fifo.h in Headers */,
|
||||
D0DB83B31D638F6400A44C96 /* ripemd.h in Headers */,
|
||||
D03B0C991D6222CA00955575 /* NBMetadataCoreMapper.h in Headers */,
|
||||
D03B0CAD1D6222CA00955575 /* NBPhoneNumberUtil.h in Headers */,
|
||||
D0DB83B01D638F6400A44C96 /* rational.h in Headers */,
|
||||
D03B0C9D1D6222CA00955575 /* NBMetadataCoreTestMapper.h in Headers */,
|
||||
D0DB83741D638F6300A44C96 /* vorbis_parser.h in Headers */,
|
||||
D0DB83AA1D638F6400A44C96 /* opt.h in Headers */,
|
||||
D0DB83A91D638F6400A44C96 /* murmur3.h in Headers */,
|
||||
D0DB83861D638F6400A44C96 /* buffer.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -1236,7 +1678,7 @@
|
||||
DevelopmentTeam = X834Q8SBVP;
|
||||
DevelopmentTeamName = "TELEGRAM MESSENGER LLP";
|
||||
LastSwiftMigration = 0800;
|
||||
ProvisioningStyle = Automatic;
|
||||
ProvisioningStyle = Manual;
|
||||
};
|
||||
D09D8C091D4FAB1D0081DBEC = {
|
||||
CreatedOnToolsVersion = 8.0;
|
||||
@ -1269,7 +1711,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D03B0E5A1D63215200955575 /* TelegramCore.xcconfig in Resources */,
|
||||
D03B0E8F1D63520500955575 /* Images.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -1350,7 +1792,9 @@
|
||||
D03B0D991D631B8800955575 /* ListController.swift in Sources */,
|
||||
D03B0D441D6319F900955575 /* CloudFileMediaResource.swift in Sources */,
|
||||
D03B0C961D6222CA00955575 /* NBAsYouTypeFormatter.m in Sources */,
|
||||
D03B0E6E1D632E3800955575 /* AuthorizationController.swift in Sources */,
|
||||
D03B0E561D631EA500955575 /* MediaFrameSource.swift in Sources */,
|
||||
D0AB0B921D65E9FA002C78E7 /* ManagedServiceViews.swift in Sources */,
|
||||
D03B0CA21D6222CA00955575 /* NBNumberFormat.m in Sources */,
|
||||
D03B0CCE1D62239600955575 /* PhoneNumbers.swift in Sources */,
|
||||
D03B0D5A1D631A6900955575 /* Api.swift in Sources */,
|
||||
@ -1373,6 +1817,7 @@
|
||||
D03B0CFB1D62250800955575 /* TelegramMediaWebpage.swift in Sources */,
|
||||
D03B0DB01D631BBF00955575 /* AuthorizationPhoneController.swift in Sources */,
|
||||
D03B0D7F1D631B2200955575 /* SearchBarPlaceholderNode.swift in Sources */,
|
||||
D0AB0B981D664E18002C78E7 /* ManagedUnsentMessageIndices.swift in Sources */,
|
||||
D03B0D301D6319BD00955575 /* AudioStreamPlayer.swift in Sources */,
|
||||
D03B0CF91D62250800955575 /* TelegramMediaMap.swift in Sources */,
|
||||
D03B0DE81D631CE300955575 /* ChatMessageDateAndStatusNode.swift in Sources */,
|
||||
@ -1428,6 +1873,7 @@
|
||||
D03B0D5C1D631A6900955575 /* Download.swift in Sources */,
|
||||
D03B0D331D6319BD00955575 /* MediaPlayerAudioRenderer.swift in Sources */,
|
||||
D03B0D5D1D631A6900955575 /* MultipartFetch.swift in Sources */,
|
||||
D0AB0B961D662F0B002C78E7 /* ManagedChatListHoles.swift in Sources */,
|
||||
D03B0D341D6319BD00955575 /* MediaPlayerNode.swift in Sources */,
|
||||
D03B0DCF1D631C9200955575 /* ChatHistoryLocation.swift in Sources */,
|
||||
D03B0CD71D62245300955575 /* TelegramGroup.swift in Sources */,
|
||||
@ -1440,6 +1886,7 @@
|
||||
D03B0CE21D62249B00955575 /* InlineBotMessageAttribute.swift in Sources */,
|
||||
D03B0CFD1D62251400955575 /* TelegramMediaCloudLocations.swift in Sources */,
|
||||
D03B0E141D631D8800955575 /* GalleryItemNode.swift in Sources */,
|
||||
D0AB0B9A1D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift in Sources */,
|
||||
D03B0D5B1D631A6900955575 /* Buffer.swift in Sources */,
|
||||
D03B0D421D6319F100955575 /* FileResources.swift in Sources */,
|
||||
D03B0D211D63198900955575 /* FFMpegMediaVideoFrameDecoder.swift in Sources */,
|
||||
@ -1460,10 +1907,12 @@
|
||||
D03B0CC11D62235000955575 /* StringFormat.swift in Sources */,
|
||||
D03B0E3C1D631E5400955575 /* Localizable.swift in Sources */,
|
||||
D03B0DC71D631C1100955575 /* ChatListSearchRecentPeersNode.swift in Sources */,
|
||||
D03B0E911D6352C900955575 /* FrameworkBundle.swift in Sources */,
|
||||
D03B0DBB1D631BE900955575 /* ChatListController.swift in Sources */,
|
||||
D03B0DC01D631BE900955575 /* ChatListSearchItem.swift in Sources */,
|
||||
D03B0D651D631A8B00955575 /* Account.swift in Sources */,
|
||||
D03B0E341D631E1B00955575 /* ContactsVCardItem.swift in Sources */,
|
||||
D0AB0B941D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift in Sources */,
|
||||
D03B0CF41D62250800955575 /* TelegramMediaAction.swift in Sources */,
|
||||
D03B0D481D631A2200955575 /* Cache.swift in Sources */,
|
||||
D03B0D8B1D631B3E00955575 /* ListSectionHeaderNode.swift in Sources */,
|
||||
@ -1535,6 +1984,7 @@
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/third-party/FFmpeg-iOS/include";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
@ -1545,9 +1995,13 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D03B0E591D63215200955575 /* TelegramCore.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = X834Q8SBVP;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
@ -1560,6 +2014,7 @@
|
||||
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
||||
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
@ -1625,6 +2080,7 @@
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/third-party/FFmpeg-iOS/include";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
@ -1668,6 +2124,7 @@
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/third-party/FFmpeg-iOS/include";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
@ -1678,9 +2135,13 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D03B0E591D63215200955575 /* TelegramCore.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = X834Q8SBVP;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
@ -1693,6 +2154,7 @@
|
||||
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
||||
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
@ -1706,9 +2168,13 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D03B0E591D63215200955575 /* TelegramCore.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = X834Q8SBVP;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
@ -1721,6 +2187,7 @@
|
||||
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
||||
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
||||
);
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
|
@ -3,17 +3,17 @@ import SwiftSignalKit
|
||||
import Postbox
|
||||
import MtProtoKit
|
||||
import Display
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
|
||||
struct AccountId {
|
||||
public struct AccountId {
|
||||
let stringValue: String
|
||||
}
|
||||
|
||||
class AccountState: Coding, Equatable {
|
||||
required init(decoder: Decoder) {
|
||||
public class AccountState: Coding, Equatable {
|
||||
public required init(decoder: Decoder) {
|
||||
}
|
||||
|
||||
func encode(_ encoder: Encoder) {
|
||||
public func encode(_ encoder: Encoder) {
|
||||
}
|
||||
|
||||
private init() {
|
||||
@ -24,19 +24,19 @@ class AccountState: Coding, Equatable {
|
||||
}
|
||||
}
|
||||
|
||||
func ==(lhs: AccountState, rhs: AccountState) -> Bool {
|
||||
public func ==(lhs: AccountState, rhs: AccountState) -> Bool {
|
||||
return lhs.equalsTo(rhs)
|
||||
}
|
||||
|
||||
final class UnauthorizedAccountState: AccountState {
|
||||
public final class UnauthorizedAccountState: AccountState {
|
||||
let masterDatacenterId: Int32
|
||||
|
||||
required init(decoder: Decoder) {
|
||||
public required init(decoder: Decoder) {
|
||||
self.masterDatacenterId = decoder.decodeInt32ForKey("masterDatacenterId")
|
||||
super.init()
|
||||
}
|
||||
|
||||
override func encode(_ encoder: Encoder) {
|
||||
override public func encode(_ encoder: Encoder) {
|
||||
encoder.encodeInt32(self.masterDatacenterId, forKey: "masterDatacenterId")
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ final class UnauthorizedAccountState: AccountState {
|
||||
}
|
||||
}
|
||||
|
||||
class AuthorizedAccountState: AccountState {
|
||||
public class AuthorizedAccountState: AccountState {
|
||||
final class State: Coding, Equatable, CustomStringConvertible {
|
||||
let pts: Int32
|
||||
let qts: Int32
|
||||
@ -92,7 +92,7 @@ class AuthorizedAccountState: AccountState {
|
||||
|
||||
let state: State?
|
||||
|
||||
required init(decoder: Decoder) {
|
||||
public required init(decoder: Decoder) {
|
||||
self.masterDatacenterId = decoder.decodeInt32ForKey("masterDatacenterId")
|
||||
self.peerId = PeerId(decoder.decodeInt64ForKey("peerId"))
|
||||
self.state = decoder.decodeObjectForKey("state", decoder: { return State(decoder: $0) }) as? State
|
||||
@ -100,7 +100,7 @@ class AuthorizedAccountState: AccountState {
|
||||
super.init()
|
||||
}
|
||||
|
||||
override func encode(_ encoder: Encoder) {
|
||||
override public func encode(_ encoder: Encoder) {
|
||||
encoder.encodeInt32(self.masterDatacenterId, forKey: "masterDatacenterId")
|
||||
encoder.encodeInt64(self.peerId.toInt64(), forKey: "peerId")
|
||||
if let state = self.state {
|
||||
@ -138,22 +138,22 @@ func ==(lhs: AuthorizedAccountState.State, rhs: AuthorizedAccountState.State) ->
|
||||
lhs.seq == rhs.seq
|
||||
}
|
||||
|
||||
func currentAccountId() -> AccountId {
|
||||
let key = "Telegram_currentAccountId"
|
||||
if let id = UserDefaults.standard.object(forKey: key) as? String {
|
||||
public func currentAccountId(appGroupPath: String) -> AccountId {
|
||||
let filePath = "\(appGroupPath)/currentAccountId"
|
||||
if let id = try? String(contentsOfFile: filePath) {
|
||||
return AccountId(stringValue: id)
|
||||
} else {
|
||||
let id = generateAccountId()
|
||||
UserDefaults.standard.set(id.stringValue, forKey: key)
|
||||
let _ = try? id.stringValue.write(toFile: filePath, atomically: true, encoding: .utf8)
|
||||
return id
|
||||
}
|
||||
}
|
||||
|
||||
func generateAccountId() -> AccountId {
|
||||
public func generateAccountId() -> AccountId {
|
||||
return AccountId(stringValue: NSUUID().uuidString)
|
||||
}
|
||||
|
||||
class UnauthorizedAccount {
|
||||
public class UnauthorizedAccount {
|
||||
let id: AccountId
|
||||
let postbox: Postbox
|
||||
let network: Network
|
||||
@ -186,31 +186,37 @@ class UnauthorizedAccount {
|
||||
}
|
||||
}
|
||||
|
||||
func accountWithId(_ id: AccountId) -> Signal<Either<UnauthorizedAccount, Account>, NoError> {
|
||||
private var declaredEncodables: Void = {
|
||||
declareEncodable(UnauthorizedAccountState.self, f: { UnauthorizedAccountState(decoder: $0) })
|
||||
declareEncodable(AuthorizedAccountState.self, f: { AuthorizedAccountState(decoder: $0) })
|
||||
declareEncodable(TelegramUser.self, f: { TelegramUser(decoder: $0) })
|
||||
declareEncodable(TelegramGroup.self, f: { TelegramGroup(decoder: $0) })
|
||||
declareEncodable(TelegramMediaImage.self, f: { TelegramMediaImage(decoder: $0) })
|
||||
declareEncodable(TelegramMediaImageRepresentation.self, f: { TelegramMediaImageRepresentation(decoder: $0) })
|
||||
declareEncodable(TelegramMediaVoiceNote.self, f: { TelegramMediaVoiceNote(decoder: $0) })
|
||||
declareEncodable(TelegramMediaContact.self, f: { TelegramMediaContact(decoder: $0) })
|
||||
declareEncodable(TelegramMediaMap.self, f: { TelegramMediaMap(decoder: $0) })
|
||||
declareEncodable(TelegramMediaFile.self, f: { TelegramMediaFile(decoder: $0) })
|
||||
declareEncodable(TelegramMediaFileAttribute.self, f: { TelegramMediaFileAttribute(decoder: $0) })
|
||||
declareEncodable(TelegramCloudFileLocation.self, f: { TelegramCloudFileLocation(decoder: $0) })
|
||||
declareEncodable(ChannelState.self, f: { ChannelState(decoder: $0) })
|
||||
declareEncodable(InlineBotMessageAttribute.self, f: { InlineBotMessageAttribute(decoder: $0) })
|
||||
declareEncodable(TextEntitiesMessageAttribute.self, f: { TextEntitiesMessageAttribute(decoder: $0) })
|
||||
declareEncodable(ReplyMessageAttribute.self, f: { ReplyMessageAttribute(decoder: $0) })
|
||||
declareEncodable(TelegramCloudDocumentLocation.self, f: { TelegramCloudDocumentLocation(decoder: $0) })
|
||||
declareEncodable(TelegramMediaWebpage.self, f: { TelegramMediaWebpage(decoder: $0) })
|
||||
declareEncodable(ViewCountMessageAttribute.self, f: { ViewCountMessageAttribute(decoder: $0) })
|
||||
declareEncodable(TelegramMediaAction.self, f: { TelegramMediaAction(decoder: $0) })
|
||||
declareEncodable(StreamingResource.self, f: { StreamingResource(decoder: $0) })
|
||||
|
||||
return
|
||||
}()
|
||||
|
||||
public func accountWithId(_ id: AccountId, appGroupPath: String) -> Signal<Either<UnauthorizedAccount, Account>, NoError> {
|
||||
return Signal<(Postbox, AccountState?), NoError> { subscriber in
|
||||
declareEncodable(UnauthorizedAccountState.self, f: { UnauthorizedAccountState(decoder: $0) })
|
||||
declareEncodable(AuthorizedAccountState.self, f: { AuthorizedAccountState(decoder: $0) })
|
||||
declareEncodable(TelegramUser.self, f: { TelegramUser(decoder: $0) })
|
||||
declareEncodable(TelegramGroup.self, f: { TelegramGroup(decoder: $0) })
|
||||
declareEncodable(TelegramMediaImage.self, f: { TelegramMediaImage(decoder: $0) })
|
||||
declareEncodable(TelegramMediaImageRepresentation.self, f: { TelegramMediaImageRepresentation(decoder: $0) })
|
||||
declareEncodable(TelegramMediaVoiceNote.self, f: { TelegramMediaVoiceNote(decoder: $0) })
|
||||
declareEncodable(TelegramMediaContact.self, f: { TelegramMediaContact(decoder: $0) })
|
||||
declareEncodable(TelegramMediaMap.self, f: { TelegramMediaMap(decoder: $0) })
|
||||
declareEncodable(TelegramMediaFile.self, f: { TelegramMediaFile(decoder: $0) })
|
||||
declareEncodable(TelegramMediaFileAttribute.self, f: { TelegramMediaFileAttribute(decoder: $0) })
|
||||
declareEncodable(TelegramCloudFileLocation.self, f: { TelegramCloudFileLocation(decoder: $0) })
|
||||
declareEncodable(ChannelState.self, f: { ChannelState(decoder: $0) })
|
||||
declareEncodable(InlineBotMessageAttribute.self, f: { InlineBotMessageAttribute(decoder: $0) })
|
||||
declareEncodable(TextEntitiesMessageAttribute.self, f: { TextEntitiesMessageAttribute(decoder: $0) })
|
||||
declareEncodable(ReplyMessageAttribute.self, f: { ReplyMessageAttribute(decoder: $0) })
|
||||
declareEncodable(TelegramCloudDocumentLocation.self, f: { TelegramCloudDocumentLocation(decoder: $0) })
|
||||
declareEncodable(TelegramMediaWebpage.self, f: { TelegramMediaWebpage(decoder: $0) })
|
||||
declareEncodable(ViewCountMessageAttribute.self, f: { ViewCountMessageAttribute(decoder: $0) })
|
||||
declareEncodable(TelegramMediaAction.self, f: { TelegramMediaAction(decoder: $0) })
|
||||
declareEncodable(StreamingResource.self, f: { StreamingResource(decoder: $0) })
|
||||
let _ = declaredEncodables
|
||||
|
||||
let path = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] as String) + "/\(id.stringValue)"
|
||||
let path = "\(appGroupPath)/account\(id.stringValue)"
|
||||
|
||||
let seedConfiguration = SeedConfiguration(initializeChatListWithHoles: [ChatListHole(index: MessageIndex(id: MessageId(peerId: PeerId(namespace: Namespaces.Peer.Empty, id: 0), namespace: Namespaces.Message.Cloud, id: 1), timestamp: 1))], initializeMessageNamespacesWithHoles: [Namespaces.Message.Cloud], existingMessageTags: [.PhotoOrVideo])
|
||||
|
||||
@ -245,7 +251,7 @@ func accountWithId(_ id: AccountId) -> Signal<Either<UnauthorizedAccount, Accoun
|
||||
}
|
||||
}
|
||||
|
||||
struct TwoStepAuthData {
|
||||
public struct TwoStepAuthData {
|
||||
let nextSalt: Data
|
||||
let currentSalt: Data?
|
||||
let hasRecovery: Bool
|
||||
@ -253,7 +259,7 @@ struct TwoStepAuthData {
|
||||
let unconfirmedEmailPattern: String?
|
||||
}
|
||||
|
||||
func twoStepAuthData(_ network: Network) -> Signal<TwoStepAuthData, MTRpcError> {
|
||||
public func twoStepAuthData(_ network: Network) -> Signal<TwoStepAuthData, MTRpcError> {
|
||||
return network.request(Api.functions.account.getPassword(), dependsOnPasswordEntry: false)
|
||||
|> map { config -> TwoStepAuthData in
|
||||
switch config {
|
||||
@ -276,7 +282,7 @@ private func sha256(_ data : Data) -> Data {
|
||||
return res
|
||||
}
|
||||
|
||||
func verifyPassword(_ account: UnauthorizedAccount, password: String) -> Signal<Api.auth.Authorization, MTRpcError> {
|
||||
public func verifyPassword(_ account: UnauthorizedAccount, password: String) -> Signal<Api.auth.Authorization, MTRpcError> {
|
||||
return twoStepAuthData(account.network)
|
||||
|> mapToSignal { authData -> Signal<Api.auth.Authorization, MTRpcError> in
|
||||
var data = Data()
|
||||
@ -289,15 +295,23 @@ func verifyPassword(_ account: UnauthorizedAccount, password: String) -> Signal<
|
||||
}
|
||||
}
|
||||
|
||||
class Account {
|
||||
public enum AccountServiceTaskMasterMode {
|
||||
case now
|
||||
case always
|
||||
case never
|
||||
}
|
||||
|
||||
public class Account {
|
||||
let id: AccountId
|
||||
let postbox: Postbox
|
||||
let network: Network
|
||||
let peerId: PeerId
|
||||
public let postbox: Postbox
|
||||
public let network: Network
|
||||
public let peerId: PeerId
|
||||
|
||||
private(set) var stateManager: StateManager!
|
||||
private(set) var viewTracker: AccountViewTracker!
|
||||
public private(set) var stateManager: StateManager!
|
||||
public private(set) var viewTracker: AccountViewTracker!
|
||||
private let managedContactsDisposable = MetaDisposable()
|
||||
private let becomeMasterDisposable = MetaDisposable()
|
||||
private let managedServiceViewsDisposable = MetaDisposable()
|
||||
|
||||
let graphicsThreadPool = ThreadPool(threadCount: 3, threadPriority: 0.1)
|
||||
//let imageCache: ImageCache = ImageCache(maxResidentSize: 5 * 1024 * 1024)
|
||||
@ -306,6 +320,11 @@ class Account {
|
||||
|
||||
var player: AnyObject?
|
||||
|
||||
public let notificationToken = Promise<Data>()
|
||||
private let notificationTokenDisposable = MetaDisposable()
|
||||
|
||||
public let shouldBeServiceTaskMaster = Promise<AccountServiceTaskMasterMode>()
|
||||
|
||||
init(id: AccountId, postbox: Postbox, network: Network, peerId: PeerId) {
|
||||
self.id = id
|
||||
self.postbox = postbox
|
||||
@ -314,50 +333,70 @@ class Account {
|
||||
|
||||
self.stateManager = StateManager(account: self)
|
||||
self.viewTracker = AccountViewTracker(account: self)
|
||||
|
||||
let appliedNotificationToken = self.notificationToken.get()
|
||||
|> distinctUntilChanged
|
||||
|> mapToSignal { token -> Signal<Void, NoError> in
|
||||
var tokenString = ""
|
||||
token.withUnsafeBytes { (bytes: UnsafePointer<UInt8>) -> Void in
|
||||
for i in 0 ..< token.count {
|
||||
let byte = bytes.advanced(by: i).pointee
|
||||
tokenString = tokenString.appendingFormat("%02x", Int32(byte))
|
||||
}
|
||||
}
|
||||
|
||||
let appVersionString = "\(Bundle.main.infoDictionary?["CFBundleShortVersionString"] ?? "") (\(Bundle.main.infoDictionary?["CFBundleVersion"] ?? ""))"
|
||||
|
||||
|
||||
let langCode = NSLocale.preferredLanguages.first ?? "en"
|
||||
|
||||
return network.request(Api.functions.account.registerDevice(tokenType: 1, token: tokenString, deviceModel: "iPhome Simulator", systemVersion: UIDevice.current.systemVersion, appVersion: appVersionString, appSandbox: .boolTrue, langCode: langCode))
|
||||
|> retryRequest
|
||||
|> mapToSignal { _ -> Signal<Void, NoError> in
|
||||
return .complete()
|
||||
}
|
||||
}
|
||||
self.notificationTokenDisposable.set(appliedNotificationToken.start())
|
||||
|
||||
let serviceTasksMasterBecomeMaster = shouldBeServiceTaskMaster.get()
|
||||
|> distinctUntilChanged
|
||||
|> deliverOn(Queue.concurrentDefaultQueue())
|
||||
|
||||
self.becomeMasterDisposable.set(serviceTasksMasterBecomeMaster.start(next: { [weak self] value in
|
||||
if let strongSelf = self, (value == .now || value == .always) {
|
||||
strongSelf.postbox.becomeMasterClient()
|
||||
}
|
||||
}))
|
||||
|
||||
let serviceTasksMaster = combineLatest(shouldBeServiceTaskMaster.get(), postbox.isMasterClient())
|
||||
|> map { [weak self] shouldBeMaster, isMaster -> Bool in
|
||||
if shouldBeMaster == .always && !isMaster {
|
||||
self?.postbox.becomeMasterClient()
|
||||
}
|
||||
return ((shouldBeMaster == .now || shouldBeMaster == .always) || true) && isMaster
|
||||
}
|
||||
|> distinctUntilChanged
|
||||
|> deliverOn(Queue.concurrentDefaultQueue())
|
||||
|> mapToSignal { [weak self] value -> Signal<Void, NoError> in
|
||||
if let strongSelf = self, value {
|
||||
trace("Account", what: "Became master")
|
||||
return managedServiceViews(network: strongSelf.network, postbox: strongSelf.postbox, stateManager: strongSelf.stateManager)
|
||||
} else {
|
||||
trace("Account", what: "Resigned master")
|
||||
return .never()
|
||||
}
|
||||
}
|
||||
self.managedServiceViewsDisposable.set(serviceTasksMaster.start())
|
||||
}
|
||||
|
||||
deinit {
|
||||
self.managedContactsDisposable.dispose()
|
||||
self.notificationTokenDisposable.dispose()
|
||||
self.managedServiceViewsDisposable.dispose()
|
||||
}
|
||||
}
|
||||
|
||||
func setupAccount(_ account: Account) {
|
||||
account.postbox.setFetchMessageHistoryHole { [weak account] hole, direction, tagMask in
|
||||
if let strongAccount = account {
|
||||
return fetchMessageHistoryHole(strongAccount, hole: hole, direction: direction, tagMask: tagMask)
|
||||
} else {
|
||||
return never(Void.self, NoError.self)
|
||||
}
|
||||
}
|
||||
account.postbox.setFetchChatListHole { [weak account] hole in
|
||||
if let strongAccount = account {
|
||||
return fetchChatListHole(strongAccount, hole: hole)
|
||||
} else {
|
||||
return never(Void.self, NoError.self)
|
||||
}
|
||||
}
|
||||
|
||||
account.postbox.setSendUnsentMessage { [weak account] message in
|
||||
if let strongAccount = account {
|
||||
return sendUnsentMessage(account: strongAccount, message: message)
|
||||
} else {
|
||||
return never(Void.self, NoError.self)
|
||||
}
|
||||
}
|
||||
|
||||
account.postbox.setSynchronizePeerReadState { [weak account] peerId, operation -> Signal<Void, NoError> in
|
||||
if let strongAccount = account {
|
||||
switch operation {
|
||||
case .Validate:
|
||||
return synchronizePeerReadState(account: strongAccount, peerId: peerId, push: false, validate: true)
|
||||
case let .Push(thenSync):
|
||||
return synchronizePeerReadState(account: strongAccount, peerId: peerId, push: true, validate: thenSync)
|
||||
}
|
||||
} else {
|
||||
return .never()
|
||||
}
|
||||
}
|
||||
|
||||
public func setupAccount(_ account: Account) {
|
||||
account.postbox.mediaBox.fetchResource = { [weak account] resource, range -> Signal<Data, NoError> in
|
||||
if let strongAccount = account {
|
||||
return fetchResource(account: strongAccount, resource: resource, range: range)
|
||||
|
@ -99,7 +99,7 @@ private func fetchWebpage(account: Account, messageId: MessageId) -> Signal<Void
|
||||
}
|
||||
}
|
||||
|
||||
final class AccountViewTracker {
|
||||
public final class AccountViewTracker {
|
||||
weak var account: Account?
|
||||
let queue = Queue()
|
||||
var nextViewId: Int32 = 0
|
||||
@ -195,7 +195,7 @@ final class AccountViewTracker {
|
||||
})
|
||||
}
|
||||
|
||||
func aroundUnreadMessageHistoryViewForPeerId(_ peerId: PeerId, count: Int, tagMask: MessageTags? = nil) -> Signal<(MessageHistoryView, ViewUpdateType), NoError> {
|
||||
public func aroundUnreadMessageHistoryViewForPeerId(_ peerId: PeerId, count: Int, tagMask: MessageTags? = nil) -> Signal<(MessageHistoryView, ViewUpdateType), NoError> {
|
||||
if let account = self.account {
|
||||
let signal = account.postbox.aroundUnreadMessageHistoryViewForPeerId(peerId, count: count, tagMask: tagMask)
|
||||
return wrappedMessageHistorySignal(signal)
|
||||
@ -204,7 +204,7 @@ final class AccountViewTracker {
|
||||
}
|
||||
}
|
||||
|
||||
func aroundIdMessageHistoryViewForPeerId(_ peerId: PeerId, count: Int, messageId: MessageId, tagMask: MessageTags? = nil) -> Signal<(MessageHistoryView, ViewUpdateType), NoError> {
|
||||
public func aroundIdMessageHistoryViewForPeerId(_ peerId: PeerId, count: Int, messageId: MessageId, tagMask: MessageTags? = nil) -> Signal<(MessageHistoryView, ViewUpdateType), NoError> {
|
||||
if let account = self.account {
|
||||
let signal = account.postbox.aroundIdMessageHistoryViewForPeerId(peerId, count: count, messageId: messageId, tagMask: tagMask)
|
||||
return wrappedMessageHistorySignal(signal)
|
||||
@ -213,7 +213,7 @@ final class AccountViewTracker {
|
||||
}
|
||||
}
|
||||
|
||||
func aroundMessageHistoryViewForPeerId(_ peerId: PeerId, index: MessageIndex, count: Int, anchorIndex: MessageIndex, fixedCombinedReadState: CombinedPeerReadState?, tagMask: MessageTags? = nil) -> Signal<(MessageHistoryView, ViewUpdateType), NoError> {
|
||||
public func aroundMessageHistoryViewForPeerId(_ peerId: PeerId, index: MessageIndex, count: Int, anchorIndex: MessageIndex, fixedCombinedReadState: CombinedPeerReadState?, tagMask: MessageTags? = nil) -> Signal<(MessageHistoryView, ViewUpdateType), NoError> {
|
||||
if let account = self.account {
|
||||
let signal = account.postbox.aroundMessageHistoryViewForPeerId(peerId, index: index, count: count, anchorIndex: anchorIndex, fixedCombinedReadState: fixedCombinedReadState, tagMask: tagMask)
|
||||
return wrappedMessageHistorySignal(signal)
|
||||
|
82
TelegramCore/AuthorizationController.swift
Normal file
@ -0,0 +1,82 @@
|
||||
import Foundation
|
||||
import Display
|
||||
import SwiftSignalKit
|
||||
|
||||
public class AuthorizationController: NavigationController {
|
||||
private var account: UnauthorizedAccount!
|
||||
|
||||
private let authorizedAccountValue = Promise<Account>()
|
||||
public var authorizedAccount: Signal<Account, NoError> {
|
||||
return authorizedAccountValue.get()
|
||||
}
|
||||
|
||||
public init(account: UnauthorizedAccount) {
|
||||
self.account = account
|
||||
let phoneController = AuthorizationPhoneController(account: account)
|
||||
|
||||
super.init()
|
||||
|
||||
self.pushViewController(phoneController, animated: false)
|
||||
|
||||
let authorizationSequence = phoneController.result |> mapToSignal { (account, sentCode, phone) -> Signal<Api.auth.Authorization, NoError> in
|
||||
return deferred { [weak self] in
|
||||
if let strongSelf = self {
|
||||
strongSelf.account = account
|
||||
let codeController = AuthorizationCodeController(account: account, phone: phone, sentCode: sentCode)
|
||||
strongSelf.pushViewController(codeController, animated: true)
|
||||
|
||||
return codeController.result |> mapToSignal { result -> Signal<Api.auth.Authorization, NoError> in
|
||||
switch result {
|
||||
case let .Authorization(authorization):
|
||||
return single(authorization, NoError.self)
|
||||
case .Password:
|
||||
return deferred { [weak self] () -> Signal<Api.auth.Authorization, NoError> in
|
||||
if let strongSelf = self {
|
||||
let passwordController = AuthorizationPasswordController(account: account)
|
||||
strongSelf.pushViewController(passwordController, animated: true)
|
||||
|
||||
return passwordController.result
|
||||
} else {
|
||||
return complete(Api.auth.Authorization.self, NoError.self)
|
||||
}
|
||||
} |> runOn(Queue.mainQueue())
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return complete(Api.auth.Authorization.self, NoError.self)
|
||||
}
|
||||
} |> runOn(Queue.mainQueue())
|
||||
}
|
||||
|
||||
let accountSignal = authorizationSequence |> mapToSignal { [weak self] authorization -> Signal<Account, NoError> in
|
||||
if let strongSelf = self {
|
||||
switch authorization {
|
||||
case let .authorization(user):
|
||||
let user = TelegramUser(user: user)
|
||||
return account.postbox.modify { modifier -> AccountState in
|
||||
let state = AuthorizedAccountState(masterDatacenterId: strongSelf.account.masterDatacenterId, peerId: user.id, state: nil)
|
||||
modifier.setState(state)
|
||||
return state
|
||||
} |> map { state in
|
||||
return Account(id: account.id, postbox: account.postbox, network: account.network, peerId: user.id)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return .complete()
|
||||
}
|
||||
}
|
||||
|
||||
self.authorizedAccountValue.set(accountSignal)
|
||||
}
|
||||
|
||||
override public init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
}
|
||||
|
||||
required public init(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
deinit {
|
||||
}
|
||||
}
|
@ -47,20 +47,20 @@ class AuthorizationPhoneController: ViewController {
|
||||
@objc func nextPressed() {
|
||||
let phone = self.node.phoneNode.attributedText?.string ?? ""
|
||||
let account = self.account
|
||||
let sendCode = Api.functions.auth.sendCode(flags: 0, phoneNumber: phone, currentNumber: nil, apiId: 1, apiHash: "b6b154c3707471f5339bd661645ed3d6", langCode: "en")
|
||||
let sendCode = Api.functions.auth.sendCode(flags: 0, phoneNumber: phone, currentNumber: nil, apiId: 10840, apiHash: "33c45224029d59cb3ad0c16134215aeb", langCode: "en")
|
||||
|
||||
let signal = account.network.request(sendCode)
|
||||
|> map { result in
|
||||
return (result, account)
|
||||
} |> `catch` { error -> Signal<(Api.auth.SentCode, UnauthorizedAccount), MTRpcError> in
|
||||
switch error.errorDescription {
|
||||
case Regex("(PHONE_|USER_|NETWORK_)MIGRATE_(\\d+)"):
|
||||
let range = error.errorDescription.range(of: "MIGRATE_")!
|
||||
let updatedMasterDatacenterId = Int32(error.errorDescription.substring(from: range.upperBound))!
|
||||
let updatedAccount = account.changedMasterDatacenterId(updatedMasterDatacenterId)
|
||||
return updatedAccount.network.request(sendCode) |> map { sentCode in return (sentCode, updatedAccount) }
|
||||
case _:
|
||||
return .fail(error)
|
||||
case Regex("(PHONE_|USER_|NETWORK_)MIGRATE_(\\d+)"):
|
||||
let range = error.errorDescription.range(of: "MIGRATE_")!
|
||||
let updatedMasterDatacenterId = Int32(error.errorDescription.substring(from: range.upperBound))!
|
||||
let updatedAccount = account.changedMasterDatacenterId(updatedMasterDatacenterId)
|
||||
return updatedAccount.network.request(sendCode) |> map { sentCode in return (sentCode, updatedAccount) }
|
||||
case _:
|
||||
return .fail(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,9 @@ private func historyEntriesForView(_ view: MessageHistoryView) -> [ChatHistoryEn
|
||||
|
||||
private func preparedHistoryViewTransition(from fromView: ChatHistoryView?, to toView: ChatHistoryView, reason: ChatHistoryViewTransitionReason, account: Account, peerId: PeerId, controllerInteraction: ChatControllerInteraction, scrollPosition: ChatControllerScrollPosition?) -> Signal<ChatHistoryViewTransition, NoError> {
|
||||
return Signal { subscriber in
|
||||
let (deleteIndices, indicesAndItems, updateIndices) = mergeListsStableWithUpdates(leftList: fromView?.filteredEntries ?? [], rightList: toView.filteredEntries)
|
||||
let updateIndices: [(Int, ChatHistoryEntry)] = []
|
||||
//let (deleteIndices, indicesAndItems, updateIndices) = mergeListsStableWithUpdates(leftList: fromView?.filteredEntries ?? [], rightList: toView.filteredEntries)
|
||||
let (deleteIndices, indicesAndItems) = mergeListsStable(leftList: fromView?.filteredEntries ?? [], rightList: toView.filteredEntries)
|
||||
|
||||
var adjustedDeleteIndices: [ListViewDeleteItem] = []
|
||||
let previousCount: Int
|
||||
@ -360,7 +362,7 @@ private func maxIncomingMessageIdForEntries(_ entries: [ChatHistoryEntry], index
|
||||
|
||||
private var useDarkMode = false
|
||||
|
||||
class ChatController: ViewController {
|
||||
public class ChatController: ViewController {
|
||||
private var containerLayout = ContainerViewLayout()
|
||||
|
||||
private let account: Account
|
||||
@ -381,7 +383,7 @@ class ChatController: ViewController {
|
||||
private var layoutActionOnViewTransition: (() -> Void)?
|
||||
|
||||
private let _ready = Promise<Bool>()
|
||||
override var ready: Promise<Bool> {
|
||||
override public var ready: Promise<Bool> {
|
||||
return self._ready
|
||||
}
|
||||
private var didSetReady = false
|
||||
@ -398,7 +400,7 @@ class ChatController: ViewController {
|
||||
|
||||
private var controllerInteraction: ChatControllerInteraction?
|
||||
|
||||
init(account: Account, peerId: PeerId, messageId: MessageId? = nil) {
|
||||
public init(account: Account, peerId: PeerId, messageId: MessageId? = nil) {
|
||||
self.account = account
|
||||
self.peerId = peerId
|
||||
self.messageId = messageId
|
||||
@ -605,7 +607,7 @@ class ChatController: ViewController {
|
||||
}
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required public init(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
@ -638,7 +640,7 @@ class ChatController: ViewController {
|
||||
}
|
||||
}
|
||||
|
||||
override func loadDisplayNode() {
|
||||
override public func loadDisplayNode() {
|
||||
self.displayNode = ChatControllerNode(account: self.account, peerId: self.peerId)
|
||||
|
||||
self.chatDisplayNode.listView.displayedItemRangeChanged = { [weak self] displayedRange in
|
||||
@ -723,11 +725,11 @@ class ChatController: ViewController {
|
||||
self.dequeueHistoryViewTransition()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
override public func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
override public func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
self.chatDisplayNode.listView.preloadPages = true
|
||||
@ -831,7 +833,7 @@ class ChatController: ViewController {
|
||||
}
|
||||
}
|
||||
|
||||
override func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||
override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||
super.containerLayoutUpdated(layout, transition: transition)
|
||||
|
||||
self.containerLayout = layout
|
||||
|
@ -2,12 +2,12 @@ import Foundation
|
||||
import Postbox
|
||||
import AsyncDisplayKit
|
||||
|
||||
final class ChatControllerInteraction {
|
||||
public final class ChatControllerInteraction {
|
||||
let openMessage: (MessageId) -> Void
|
||||
let testNavigateToMessage: (MessageId, MessageId) -> Void
|
||||
var hiddenMedia: [MessageId: [Media]] = [:]
|
||||
|
||||
init(openMessage: (MessageId) -> Void, testNavigateToMessage: (MessageId, MessageId) -> Void) {
|
||||
public init(openMessage: (MessageId) -> Void, testNavigateToMessage: (MessageId, MessageId) -> Void) {
|
||||
self.openMessage = openMessage
|
||||
self.testNavigateToMessage = testNavigateToMessage
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import Postbox
|
||||
import SwiftSignalKit
|
||||
import Display
|
||||
|
||||
private let backgroundImage = UIImage(named: "Chat/Wallpapers/Builtin0")
|
||||
private let backgroundImage = UIImage(bundleImageName: "Chat/Wallpapers/Builtin0")
|
||||
|
||||
enum ChatMessageViewPosition: Equatable {
|
||||
case AroundUnread(count: Int)
|
||||
|
@ -22,7 +22,7 @@ private let textInputViewBackground: UIImage = {
|
||||
return image
|
||||
}()
|
||||
|
||||
private let attachmentIcon = UIImage(named: "Chat/Input/Text/IconAttachment")?.precomposed()
|
||||
private let attachmentIcon = UIImage(bundleImageName: "Chat/Input/Text/IconAttachment")?.precomposed()
|
||||
|
||||
class ChatInputNode: ASDisplayNode, ASEditableTextNodeDelegate {
|
||||
var textPlaceholderNode: TextNode
|
||||
|
@ -45,14 +45,14 @@ private func ==(lhs: ChatListAvatarNodeState, rhs: ChatListAvatarNodeState) -> B
|
||||
}
|
||||
}
|
||||
|
||||
class ChatListAvatarNode: ASDisplayNode {
|
||||
public final class ChatListAvatarNode: ASDisplayNode {
|
||||
let font: UIFont
|
||||
private var parameters: ChatListAvatarNodeParameters?
|
||||
let imageNode: ImageNode
|
||||
|
||||
private var state: ChatListAvatarNodeState = .Empty
|
||||
|
||||
init(font: UIFont) {
|
||||
public init(font: UIFont) {
|
||||
self.font = font
|
||||
self.imageNode = ImageNode()
|
||||
|
||||
@ -65,7 +65,7 @@ class ChatListAvatarNode: ASDisplayNode {
|
||||
self.addSubnode(self.imageNode)
|
||||
}
|
||||
|
||||
override var frame: CGRect {
|
||||
override public var frame: CGRect {
|
||||
get {
|
||||
return super.frame
|
||||
} set(value) {
|
||||
@ -74,7 +74,7 @@ class ChatListAvatarNode: ASDisplayNode {
|
||||
}
|
||||
}
|
||||
|
||||
func setPeer(account: Account, peer: Peer) {
|
||||
public func setPeer(account: Account, peer: Peer) {
|
||||
let updatedState = ChatListAvatarNodeState.PeerAvatar(peer)
|
||||
if updatedState != self.state {
|
||||
self.state = updatedState
|
||||
@ -96,11 +96,11 @@ class ChatListAvatarNode: ASDisplayNode {
|
||||
}
|
||||
}
|
||||
|
||||
override func drawParameters(forAsyncLayer layer: _ASDisplayLayer) -> NSObjectProtocol {
|
||||
override public func drawParameters(forAsyncLayer layer: _ASDisplayLayer) -> NSObjectProtocol {
|
||||
return parameters ?? NSObject()
|
||||
}
|
||||
|
||||
@objc override class func draw(_ bounds: CGRect, withParameters parameters: NSObjectProtocol!, isCancelled: asdisplaynode_iscancelled_block_t, isRasterizing: Bool) {
|
||||
@objc override public class func draw(_ bounds: CGRect, withParameters parameters: NSObjectProtocol!, isCancelled: asdisplaynode_iscancelled_block_t, isRasterizing: Bool) {
|
||||
assertNotOnMainThread()
|
||||
|
||||
let context = UIGraphicsGetCurrentContext()!
|
||||
|
@ -137,7 +137,7 @@ extension ChatListEntry: Identifiable {
|
||||
}
|
||||
}
|
||||
|
||||
class ChatListController: ViewController {
|
||||
public class ChatListController: ViewController {
|
||||
let account: Account
|
||||
|
||||
private var chatListViewAndEntries: (ChatListView, [ChatListControllerEntry])?
|
||||
@ -157,15 +157,15 @@ class ChatListController: ViewController {
|
||||
}
|
||||
}
|
||||
|
||||
init(account: Account) {
|
||||
public init(account: Account) {
|
||||
self.account = account
|
||||
|
||||
super.init()
|
||||
|
||||
self.title = "Chats"
|
||||
self.tabBarItem.title = "Chats"
|
||||
self.tabBarItem.image = UIImage(named: "Chat List/Tabs/IconChats")
|
||||
self.tabBarItem.selectedImage = UIImage(named: "Chat List/Tabs/IconChatsSelected")
|
||||
self.tabBarItem.image = UIImage(bundleImageName: "Chat List/Tabs/IconChats")
|
||||
self.tabBarItem.selectedImage = UIImage(bundleImageName: "Chat List/Tabs/IconChatsSelected")
|
||||
|
||||
self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "Edit", style: .plain, target: self, action: #selector(self.editPressed))
|
||||
//self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Compose, target: self, action: Selector("composePressed"))
|
||||
@ -183,7 +183,7 @@ class ChatListController: ViewController {
|
||||
self.setMessageViewPosition(.Tail(count: 50), hint: "initial", force: false)
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required public init(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ class ChatListController: ViewController {
|
||||
self.openMessageFromSearchDisposable.dispose()
|
||||
}
|
||||
|
||||
override func loadDisplayNode() {
|
||||
override public func loadDisplayNode() {
|
||||
self.displayNode = ChatListControllerNode(account: self.account)
|
||||
|
||||
self.chatListDisplayNode.listView.displayedItemRangeChanged = { [weak self] range in
|
||||
@ -289,11 +289,11 @@ class ChatListController: ViewController {
|
||||
}
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
override public func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
}
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
override public func viewDidDisappear(_ animated: Bool) {
|
||||
super.viewDidDisappear(animated)
|
||||
}
|
||||
|
||||
@ -468,7 +468,7 @@ class ChatListController: ViewController {
|
||||
}
|
||||
}
|
||||
|
||||
override func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||
override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||
super.containerLayoutUpdated(layout, transition: transition)
|
||||
|
||||
self.chatListDisplayNode.containerLayoutUpdated(layout, navigationBarHeight: self.navigationBar.frame.maxY, transition: transition)
|
||||
|
@ -42,15 +42,15 @@ private func ==(lhs: ChatMessageBackgroundType, rhs: ChatMessageBackgroundType)
|
||||
}
|
||||
}
|
||||
|
||||
private let chatMessageBackgroundIncomingImage = UIImage(named: "Chat/Message/Background/BubbleIncoming")?.precomposed()
|
||||
private let chatMessageBackgroundOutgoingImage = UIImage(named: "Chat/Message/Background/BubbleOutgoing")?.precomposed()
|
||||
private let chatMessageBackgroundIncomingMergedTopImage = UIImage(named: "Chat/Message/Background/BubbleIncomingMergedTop")?.precomposed()
|
||||
private let chatMessageBackgroundIncomingMergedBottomImage = UIImage(named: "Chat/Message/Background/BubbleIncomingMergedBottom")?.precomposed()
|
||||
private let chatMessageBackgroundIncomingMergedBothImage = UIImage(named: "Chat/Message/Background/BubbleIncomingMergedBoth")?.precomposed()
|
||||
private let chatMessageBackgroundOutgoingMergedImage = UIImage(named: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed()
|
||||
private let chatMessageBackgroundOutgoingMergedTopImage = UIImage(named: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed()
|
||||
private let chatMessageBackgroundOutgoingMergedBottomImage = UIImage(named: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed()
|
||||
private let chatMessageBackgroundOutgoingMergedBothImage = UIImage(named: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed()
|
||||
private let chatMessageBackgroundIncomingImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleIncoming")?.precomposed()
|
||||
private let chatMessageBackgroundOutgoingImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleOutgoing")?.precomposed()
|
||||
private let chatMessageBackgroundIncomingMergedTopImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleIncomingMergedTop")?.precomposed()
|
||||
private let chatMessageBackgroundIncomingMergedBottomImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleIncomingMergedBottom")?.precomposed()
|
||||
private let chatMessageBackgroundIncomingMergedBothImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleIncomingMergedBoth")?.precomposed()
|
||||
private let chatMessageBackgroundOutgoingMergedImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed()
|
||||
private let chatMessageBackgroundOutgoingMergedTopImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed()
|
||||
private let chatMessageBackgroundOutgoingMergedBottomImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed()
|
||||
private let chatMessageBackgroundOutgoingMergedBothImage = UIImage(bundleImageName: "Chat/Message/Background/BubbleOutgoingMerged")?.precomposed()
|
||||
|
||||
class ChatMessageBackground: ASImageNode {
|
||||
private var type: ChatMessageBackgroundType?
|
||||
@ -448,7 +448,9 @@ class ChatMessageBubbleItemNode: ChatMessageItemView {
|
||||
if let nameNode = nameNodeSizeApply.1() {
|
||||
strongSelf.nameNode = nameNode
|
||||
if nameNode.supernode == nil {
|
||||
nameNode.isLayerBacked = true
|
||||
if !nameNode.isNodeLoaded {
|
||||
nameNode.isLayerBacked = true
|
||||
}
|
||||
strongSelf.addSubnode(nameNode)
|
||||
}
|
||||
nameNode.frame = CGRect(origin: CGPoint(x: contentOrigin.x + layoutConstants.text.bubbleInsets.left, y: layoutConstants.bubble.contentInsets.top + nameNodeOriginY), size: nameNodeSizeApply.0)
|
||||
|
@ -17,8 +17,8 @@ private let outgoingTitleColor = UIColor(0x3faa3c)
|
||||
private let incomingDescriptionColor = UIColor(0x999999)
|
||||
private let outgoingDescriptionColor = UIColor(0x6fb26a)
|
||||
|
||||
private let fileIconIncomingImage = UIImage(named: "Chat/Message/RadialProgressIconDocumentIncoming")?.precomposed()
|
||||
private let fileIconOutgoingImage = UIImage(named: "Chat/Message/RadialProgressIconDocumentOutgoing")?.precomposed()
|
||||
private let fileIconIncomingImage = UIImage(bundleImageName: "Chat/Message/RadialProgressIconDocumentIncoming")?.precomposed()
|
||||
private let fileIconOutgoingImage = UIImage(bundleImageName: "Chat/Message/RadialProgressIconDocumentOutgoing")?.precomposed()
|
||||
|
||||
final class ChatMessageInteractiveFileNode: ASTransformNode {
|
||||
private let titleNode: TextNode
|
||||
|
@ -35,15 +35,15 @@ private func messagesShouldBeMerged(_ lhs: Message, _ rhs: Message) -> Bool {
|
||||
return false
|
||||
}
|
||||
|
||||
class ChatMessageItem: ListViewItem, CustomStringConvertible {
|
||||
public class ChatMessageItem: ListViewItem, CustomStringConvertible {
|
||||
let account: Account
|
||||
let peerId: PeerId
|
||||
let controllerInteraction: ChatControllerInteraction
|
||||
let message: Message
|
||||
|
||||
let accessoryItem: ListViewAccessoryItem?
|
||||
public let accessoryItem: ListViewAccessoryItem?
|
||||
|
||||
init(account: Account, peerId: PeerId, controllerInteraction: ChatControllerInteraction, message: Message) {
|
||||
public init(account: Account, peerId: PeerId, controllerInteraction: ChatControllerInteraction, message: Message) {
|
||||
self.account = account
|
||||
self.peerId = peerId
|
||||
self.controllerInteraction = controllerInteraction
|
||||
@ -70,7 +70,7 @@ class ChatMessageItem: ListViewItem, CustomStringConvertible {
|
||||
self.accessoryItem = accessoryItem
|
||||
}
|
||||
|
||||
func nodeConfiguredForWidth(async: (() -> Void) -> Void, width: CGFloat, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: (ListViewItemNode, () -> Void) -> Void) {
|
||||
public func nodeConfiguredForWidth(async: (() -> Void) -> Void, width: CGFloat, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: (ListViewItemNode, () -> Void) -> Void) {
|
||||
var viewClassName: AnyClass = ChatMessageBubbleItemNode.self
|
||||
|
||||
for media in message.media {
|
||||
@ -119,7 +119,7 @@ class ChatMessageItem: ListViewItem, CustomStringConvertible {
|
||||
return (mergedTop, mergedBottom)
|
||||
}
|
||||
|
||||
func updateNode(async: (() -> Void) -> Void, node: ListViewItemNode, width: CGFloat, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: (ListViewItemNodeLayout, () -> Void) -> Void) {
|
||||
public func updateNode(async: (() -> Void) -> Void, node: ListViewItemNode, width: CGFloat, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: (ListViewItemNodeLayout, () -> Void) -> Void) {
|
||||
if let node = node as? ChatMessageItemView {
|
||||
Queue.mainQueue().async {
|
||||
node.setupItem(self)
|
||||
@ -140,7 +140,7 @@ class ChatMessageItem: ListViewItem, CustomStringConvertible {
|
||||
}
|
||||
}
|
||||
|
||||
var description: String {
|
||||
public var description: String {
|
||||
return "(ChatMessageItem id: \(self.message.id), text: \"\(self.message.text)\")"
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Foundation
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
|
||||
private func md5(_ data : Data) -> Data {
|
||||
var res = Data()
|
||||
|
@ -110,7 +110,7 @@ private func entriesForView(_ view: ContactPeersView) -> [ContactsEntry] {
|
||||
return entries
|
||||
}
|
||||
|
||||
class ContactsController: ViewController {
|
||||
public class ContactsController: ViewController {
|
||||
private let queue = Queue()
|
||||
|
||||
private let account: Account
|
||||
@ -124,15 +124,15 @@ class ContactsController: ViewController {
|
||||
|
||||
private let index: PeerNameIndex = .lastNameFirst
|
||||
|
||||
init(account: Account) {
|
||||
public init(account: Account) {
|
||||
self.account = account
|
||||
|
||||
super.init()
|
||||
|
||||
self.title = "Contacts"
|
||||
self.tabBarItem.title = "Contacts"
|
||||
self.tabBarItem.image = UIImage(named: "Chat List/Tabs/IconContacts")
|
||||
self.tabBarItem.selectedImage = UIImage(named: "Chat List/Tabs/IconContactsSelected")
|
||||
self.tabBarItem.image = UIImage(bundleImageName: "Chat List/Tabs/IconContacts")
|
||||
self.tabBarItem.selectedImage = UIImage(bundleImageName: "Chat List/Tabs/IconContactsSelected")
|
||||
|
||||
self.disposable.set((account.postbox.contactPeersView(index: self.index, accountPeerId: account.peerId) |> deliverOn(self.queue)).start(next: { [weak self] view in
|
||||
self?.updateView(view)
|
||||
@ -145,7 +145,7 @@ class ContactsController: ViewController {
|
||||
}
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required public init(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ class ContactsController: ViewController {
|
||||
self.disposable.dispose()
|
||||
}
|
||||
|
||||
override func loadDisplayNode() {
|
||||
override public func loadDisplayNode() {
|
||||
self.displayNode = ContactsControllerNode(account: self.account)
|
||||
|
||||
self.contactsNode.navigationBar = self.navigationBar
|
||||
@ -171,7 +171,7 @@ class ContactsController: ViewController {
|
||||
self.displayNodeDidLoad()
|
||||
}
|
||||
|
||||
override func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||
override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||
super.containerLayoutUpdated(layout, transition: transition)
|
||||
|
||||
self.contactsNode.containerLayoutUpdated(layout, navigationBarHeight: self.navigationBar.frame.maxY, transition: transition)
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Foundation
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
import CoreMedia
|
||||
|
||||
final class FFMpegAudioFrameDecoder: MediaTrackFrameDecoder {
|
||||
private let codecContext: UnsafeMutablePointer<AVCodecContext>
|
||||
@ -12,7 +13,6 @@ final class FFMpegAudioFrameDecoder: MediaTrackFrameDecoder {
|
||||
self.codecContext = codecContext
|
||||
self.audioFrame = av_frame_alloc()
|
||||
|
||||
|
||||
self.swrContext = FFMpegSwResample(sourceChannelCount: Int(codecContext.pointee.channels), sourceSampleRate: Int(codecContext.pointee.sample_rate), sourceSampleFormat: codecContext.pointee.sample_fmt, destinationChannelCount: 2, destinationSampleRate: 44100, destinationSampleFormat: AV_SAMPLE_FMT_S16)
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ import Foundation
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import CoreMedia
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
|
||||
private struct StreamContext {
|
||||
private let index: Int
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Foundation
|
||||
import CoreMedia
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
|
||||
final class FFMpegMediaFrameSourceContextHelpers {
|
||||
static let registerFFMpegGlobals: Void = {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Foundation
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
|
||||
final class FFMpegPacket {
|
||||
var packet = AVPacket()
|
||||
|
@ -1,8 +1,8 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "libavutil/avutil.h"
|
||||
#import "libavutil/channel_layout.h"
|
||||
#import "libswresample/swresample.h"
|
||||
#import "../third-party/FFMpeg-iOS/include/libavutil/avutil.h"
|
||||
#import "../third-party/FFMpeg-iOS/include/libavutil/channel_layout.h"
|
||||
#import "../third-party/FFMpeg-iOS/include/libswresample/swresample.h"
|
||||
|
||||
@interface FFMpegSwResample : NSObject
|
||||
|
||||
|
13
TelegramCore/FrameworkBundle.swift
Normal file
@ -0,0 +1,13 @@
|
||||
import Foundation
|
||||
|
||||
private class FrameworkBundleClass: NSObject {
|
||||
}
|
||||
|
||||
private let frameworkBundle: Bundle = Bundle(for: FrameworkBundleClass.self)
|
||||
private let screenScaleFactor = Int(UIScreen.main.scale)
|
||||
|
||||
extension UIImage {
|
||||
convenience init?(bundleImageName: String) {
|
||||
self.init(named: bundleImageName, in: frameworkBundle, compatibleWith: nil)
|
||||
}
|
||||
}
|
@ -11,8 +11,8 @@ private func messageFilterForTagMask(_ tagMask: MessageTags) -> Api.MessagesFilt
|
||||
}
|
||||
}
|
||||
|
||||
func fetchMessageHistoryHole(_ account: Account, hole: MessageHistoryHole, direction: HoleFillDirection, tagMask: MessageTags?) -> Signal<Void, NoError> {
|
||||
return account.postbox.peerWithId(hole.maxIndex.id.peerId)
|
||||
func fetchMessageHistoryHole(network: Network, postbox: Postbox, hole: MessageHistoryHole, direction: HoleFillDirection, tagMask: MessageTags?) -> Signal<Void, NoError> {
|
||||
return postbox.peerWithId(hole.maxIndex.id.peerId)
|
||||
|> take(1)
|
||||
//|> delay(4.0, queue: Queue.concurrentDefaultQueue())
|
||||
|> mapToSignal { peer in
|
||||
@ -29,7 +29,7 @@ func fetchMessageHistoryHole(_ account: Account, hole: MessageHistoryHole, direc
|
||||
case .AroundIndex:
|
||||
assertionFailure(".AroundIndex not supported")
|
||||
}
|
||||
request = account.network.request(Api.functions.messages.search(flags: 0, peer: inputPeer, q: "", filter: filter, minDate: 0, maxDate: hole.maxIndex.timestamp, offset: 0, maxId: hole.maxIndex.id.id + 1, limit: Int32(limit)))
|
||||
request = network.request(Api.functions.messages.search(flags: 0, peer: inputPeer, q: "", filter: filter, minDate: 0, maxDate: hole.maxIndex.timestamp, offset: 0, maxId: hole.maxIndex.id.id + 1, limit: Int32(limit)))
|
||||
} else {
|
||||
let offsetId: Int32
|
||||
let addOffset: Int32
|
||||
@ -46,7 +46,7 @@ func fetchMessageHistoryHole(_ account: Account, hole: MessageHistoryHole, direc
|
||||
addOffset = Int32(-limit / 2)
|
||||
}
|
||||
|
||||
request = account.network.request(Api.functions.messages.getHistory(peer: inputPeer, offsetId: offsetId, offsetDate: hole.maxIndex.timestamp, addOffset: addOffset, limit: Int32(selectedLimit), maxId: hole.maxIndex.id.id == Int32.max ? hole.maxIndex.id.id : (hole.maxIndex.id.id + 1), minId: hole.min - 1))
|
||||
request = network.request(Api.functions.messages.getHistory(peer: inputPeer, offsetId: offsetId, offsetDate: hole.maxIndex.timestamp, addOffset: addOffset, limit: Int32(selectedLimit), maxId: hole.maxIndex.id.id == Int32.max ? hole.maxIndex.id.id : (hole.maxIndex.id.id + 1), minId: hole.min - 1))
|
||||
}
|
||||
|
||||
return request
|
||||
@ -69,7 +69,7 @@ func fetchMessageHistoryHole(_ account: Account, hole: MessageHistoryHole, direc
|
||||
chats = apiChats
|
||||
users = apiUsers
|
||||
}
|
||||
return account.postbox.modify { modifier in
|
||||
return postbox.modify { modifier in
|
||||
var storeMessages: [StoreMessage] = []
|
||||
|
||||
for message in messages {
|
||||
@ -105,12 +105,12 @@ func fetchMessageHistoryHole(_ account: Account, hole: MessageHistoryHole, direc
|
||||
}
|
||||
}
|
||||
|
||||
func fetchChatListHole(_ account: Account, hole: ChatListHole) -> Signal<Void, NoError> {
|
||||
func fetchChatListHole(network: Network, postbox: Postbox, hole: ChatListHole) -> Signal<Void, NoError> {
|
||||
let offset: Signal<(Int32, Int32, Api.InputPeer), NoError>
|
||||
if hole.index.id.peerId.namespace == Namespaces.Peer.Empty {
|
||||
offset = single((0, 0, Api.InputPeer.inputPeerEmpty), NoError.self)
|
||||
} else {
|
||||
offset = account.postbox.peerWithId(hole.index.id.peerId)
|
||||
offset = postbox.peerWithId(hole.index.id.peerId)
|
||||
|> take(1)
|
||||
|> map { peer in
|
||||
return (hole.index.timestamp, hole.index.id.id + 1, apiInputPeer(peer) ?? .inputPeerEmpty)
|
||||
@ -118,9 +118,9 @@ func fetchChatListHole(_ account: Account, hole: ChatListHole) -> Signal<Void, N
|
||||
}
|
||||
return offset
|
||||
|> mapToSignal { (timestamp, id, peer) in
|
||||
return account.network.request(Api.functions.messages.getDialogs(offsetDate: timestamp, offsetId: id, offsetPeer: peer, limit: 100))
|
||||
return network.request(Api.functions.messages.getDialogs(offsetDate: timestamp, offsetId: id, offsetPeer: peer, limit: 100))
|
||||
|> retryRequest
|
||||
|> mapToSignal { result in
|
||||
|> mapToSignal { result -> Signal<Void, NoError> in
|
||||
let dialogsChats: [Api.Chat]
|
||||
let dialogsUsers: [Api.User]
|
||||
|
||||
@ -244,7 +244,7 @@ func fetchChatListHole(_ account: Account, hole: ChatListHole) -> Signal<Void, N
|
||||
peers.append(telegramUser)
|
||||
}
|
||||
|
||||
return account.postbox.modify { modifier in
|
||||
return postbox.modify { modifier in
|
||||
modifier.updatePeers(peers, update: { _, updated -> Peer in
|
||||
return updated
|
||||
})
|
||||
|
9
TelegramCore/Images.xcassets/Chat List/Contents.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"provides-namespace" : true
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"provides-namespace" : true
|
||||
}
|
||||
}
|
21
TelegramCore/Images.xcassets/Chat List/Tabs/IconChats.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "TabIconMessages@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
TelegramCore/Images.xcassets/Chat List/Tabs/IconChats.imageset/TabIconMessages@2x.png
vendored
Normal file
After Width: | Height: | Size: 1.0 KiB |
21
TelegramCore/Images.xcassets/Chat List/Tabs/IconChatsSelected.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "TabIconMessages_Highlighted@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 877 B |
21
TelegramCore/Images.xcassets/Chat List/Tabs/IconContacts.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "TabIconContacts@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
TelegramCore/Images.xcassets/Chat List/Tabs/IconContacts.imageset/TabIconContacts@2x.png
vendored
Normal file
After Width: | Height: | Size: 1011 B |
21
TelegramCore/Images.xcassets/Chat List/Tabs/IconContactsSelected.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "TabIconContacts_Highlighted@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 845 B |
21
TelegramCore/Images.xcassets/Chat List/Tabs/IconSettings.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "TabIconSettings@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
TelegramCore/Images.xcassets/Chat List/Tabs/IconSettings.imageset/TabIconSettings@2x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
21
TelegramCore/Images.xcassets/Chat List/Tabs/IconSettingsSelected.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "TabIconSettings_Highlighted@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.4 KiB |
9
TelegramCore/Images.xcassets/Chat/Contents.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"provides-namespace" : true
|
||||
}
|
||||
}
|
9
TelegramCore/Images.xcassets/Chat/Input/Contents.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"provides-namespace" : true
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"provides-namespace" : true
|
||||
}
|
||||
}
|
12
TelegramCore/Images.xcassets/Chat/Input/Text/IconAttachment.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "IconAttachment.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
TelegramCore/Images.xcassets/Chat/Input/Text/IconAttachment.imageset/IconAttachment.pdf
vendored
Normal file
35
TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncoming.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"resizing" : {
|
||||
"mode" : "9-part",
|
||||
"center" : {
|
||||
"mode" : "stretch",
|
||||
"width" : 3,
|
||||
"height" : 1
|
||||
},
|
||||
"cap-insets" : {
|
||||
"bottom" : 32,
|
||||
"top" : 32,
|
||||
"right" : 33,
|
||||
"left" : 41
|
||||
}
|
||||
},
|
||||
"idiom" : "universal",
|
||||
"filename" : "ModernBubbleIncomingFullPad@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.5 KiB |
35
TelegramCore/Images.xcassets/Chat/Message/Background/BubbleIncomingMerged.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"resizing" : {
|
||||
"mode" : "9-part",
|
||||
"center" : {
|
||||
"mode" : "stretch",
|
||||
"width" : 1,
|
||||
"height" : 1
|
||||
},
|
||||
"cap-insets" : {
|
||||
"bottom" : 33,
|
||||
"top" : 32,
|
||||
"right" : 34,
|
||||
"left" : 44
|
||||
}
|
||||
},
|
||||
"idiom" : "universal",
|
||||
"filename" : "ModernBubbleIncomingPartialPad@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,35 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"resizing" : {
|
||||
"mode" : "9-part",
|
||||
"center" : {
|
||||
"mode" : "stretch",
|
||||
"width" : 1,
|
||||
"height" : 1
|
||||
},
|
||||
"cap-insets" : {
|
||||
"bottom" : 32,
|
||||
"top" : 33,
|
||||
"right" : 49,
|
||||
"left" : 30
|
||||
}
|
||||
},
|
||||
"idiom" : "universal",
|
||||
"filename" : "ModernBubbleIncomingMergedBoth@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,35 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"resizing" : {
|
||||
"mode" : "9-part",
|
||||
"center" : {
|
||||
"mode" : "stretch",
|
||||
"width" : 1,
|
||||
"height" : 1
|
||||
},
|
||||
"cap-insets" : {
|
||||
"bottom" : 32,
|
||||
"top" : 33,
|
||||
"right" : 35,
|
||||
"left" : 44
|
||||
}
|
||||
},
|
||||
"idiom" : "universal",
|
||||
"filename" : "ModernBubbleIncomingMergedBottom@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,35 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"resizing" : {
|
||||
"mode" : "9-part",
|
||||
"center" : {
|
||||
"mode" : "stretch",
|
||||
"width" : 1,
|
||||
"height" : 1
|
||||
},
|
||||
"cap-insets" : {
|
||||
"bottom" : 33,
|
||||
"top" : 32,
|
||||
"right" : 36,
|
||||
"left" : 43
|
||||
}
|
||||
},
|
||||
"idiom" : "universal",
|
||||
"filename" : "ModernBubbleIncomingMergedTop@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 16 KiB |
35
TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoing.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"resizing" : {
|
||||
"mode" : "9-part",
|
||||
"center" : {
|
||||
"mode" : "stretch",
|
||||
"width" : 1,
|
||||
"height" : 1
|
||||
},
|
||||
"cap-insets" : {
|
||||
"bottom" : 33,
|
||||
"top" : 31,
|
||||
"right" : 43,
|
||||
"left" : 34
|
||||
}
|
||||
},
|
||||
"idiom" : "universal",
|
||||
"filename" : "ModernBubbleOutgoingFullPad@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.5 KiB |
35
TelegramCore/Images.xcassets/Chat/Message/Background/BubbleOutgoingMerged.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"resizing" : {
|
||||
"mode" : "9-part",
|
||||
"center" : {
|
||||
"mode" : "stretch",
|
||||
"width" : 1,
|
||||
"height" : 1
|
||||
},
|
||||
"cap-insets" : {
|
||||
"bottom" : 33,
|
||||
"top" : 32,
|
||||
"right" : 44,
|
||||
"left" : 34
|
||||
}
|
||||
},
|
||||
"idiom" : "universal",
|
||||
"filename" : "ModernBubbleOutgoingPartialPad@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,9 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"provides-namespace" : true
|
||||
}
|
||||
}
|
9
TelegramCore/Images.xcassets/Chat/Message/Contents.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"provides-namespace" : true
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ModernMessageDocumentIconIncoming@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ModernMessageDocumentIconIncoming@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ModernMessageDocumentIconOutgoing@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ModernMessageDocumentIconOutgoing@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 14 KiB |
21
TelegramCore/Images.xcassets/Chat/Wallpapers/Builtin0.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "builtin-wallpaper-0.jpg",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
TelegramCore/Images.xcassets/Chat/Wallpapers/Builtin0.imageset/builtin-wallpaper-0.jpg
vendored
Normal file
After Width: | Height: | Size: 168 KiB |
@ -0,0 +1,9 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"provides-namespace" : true
|
||||
}
|
||||
}
|
6
TelegramCore/Images.xcassets/Contents.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
@ -3,16 +3,16 @@ import UIKit
|
||||
import Display
|
||||
import AsyncDisplayKit
|
||||
|
||||
class ListController: ViewController {
|
||||
var items: [ListControllerItem] = []
|
||||
public class ListController: ViewController {
|
||||
public var items: [ListControllerItem] = []
|
||||
|
||||
var listDisplayNode: ListControllerNode {
|
||||
public var listDisplayNode: ListControllerNode {
|
||||
get {
|
||||
return super.displayNode as! ListControllerNode
|
||||
}
|
||||
}
|
||||
|
||||
override func loadDisplayNode() {
|
||||
override public func loadDisplayNode() {
|
||||
self.displayNode = ListControllerNode()
|
||||
|
||||
self.displayNode.backgroundColor = UIColor(0xefeff4)
|
||||
@ -22,7 +22,7 @@ class ListController: ViewController {
|
||||
self.displayNodeDidLoad()
|
||||
}
|
||||
|
||||
override func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||
override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) {
|
||||
super.containerLayoutUpdated(layout, transition: transition)
|
||||
|
||||
self.listDisplayNode.containerLayoutUpdated(layout, navigationBarHeight: self.navigationBar.frame.maxY, transition: transition)
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Display
|
||||
|
||||
protocol ListControllerItem: ListViewItem {
|
||||
public protocol ListControllerItem: ListViewItem {
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import Foundation
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
|
||||
class ListControllerNode: ASDisplayNode {
|
||||
public class ListControllerNode: ASDisplayNode {
|
||||
let listView: ListView
|
||||
|
||||
override init() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Foundation
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
|
||||
private let queue = DispatchQueue(label: "org.telegram.Telegram.trace", qos: .background)
|
||||
|
||||
|
64
TelegramCore/ManagedChatListHoles.swift
Normal file
@ -0,0 +1,64 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
|
||||
private final class ManagedChatListHolesState {
|
||||
private var holeDisposables: [ChatListHole: Disposable] = [:]
|
||||
|
||||
func clearDisposables() -> [Disposable] {
|
||||
let disposables = Array(self.holeDisposables.values)
|
||||
self.holeDisposables.removeAll()
|
||||
return disposables
|
||||
}
|
||||
|
||||
func update(entries: Set<ChatListHole>) -> (removed: [Disposable], added: [ChatListHole: MetaDisposable]) {
|
||||
var removed: [Disposable] = []
|
||||
var added: [ChatListHole: MetaDisposable] = [:]
|
||||
|
||||
for (entry, disposable) in self.holeDisposables {
|
||||
if !entries.contains(entry) {
|
||||
removed.append(disposable)
|
||||
self.holeDisposables.removeValue(forKey: entry)
|
||||
}
|
||||
}
|
||||
|
||||
for entry in entries {
|
||||
if self.holeDisposables[entry] == nil {
|
||||
let disposable = MetaDisposable()
|
||||
self.holeDisposables[entry] = disposable
|
||||
added[entry] = disposable
|
||||
}
|
||||
}
|
||||
|
||||
return (removed, added)
|
||||
}
|
||||
}
|
||||
|
||||
func managedChatListHoles(network: Network, postbox: Postbox) -> Signal<Void, NoError> {
|
||||
return Signal { _ in
|
||||
let state = Atomic(value: ManagedChatListHolesState())
|
||||
|
||||
let disposable = postbox.chatListHolesView().start(next: { view in
|
||||
let (removed, added) = state.with { state -> (removed: [Disposable], added: [ChatListHole: MetaDisposable]) in
|
||||
return state.update(entries: view.entries)
|
||||
}
|
||||
|
||||
for disposable in removed {
|
||||
disposable.dispose()
|
||||
}
|
||||
|
||||
for (entry, disposable) in added {
|
||||
disposable.set(fetchChatListHole(network: network, postbox: postbox, hole: entry).start())
|
||||
}
|
||||
})
|
||||
|
||||
return ActionDisposable {
|
||||
disposable.dispose()
|
||||
for disposable in state.with({ state -> [Disposable] in
|
||||
state.clearDisposables()
|
||||
}) {
|
||||
disposable.dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
70
TelegramCore/ManagedMessageHistoryHoles.swift
Normal file
@ -0,0 +1,70 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
|
||||
private final class ManagedMessageHistoryHolesState {
|
||||
private var holeDisposables: [MessageHistoryHolesViewEntry: Disposable] = [:]
|
||||
|
||||
func clearDisposables() -> [Disposable] {
|
||||
let disposables = Array(self.holeDisposables.values)
|
||||
self.holeDisposables.removeAll()
|
||||
return disposables
|
||||
}
|
||||
|
||||
func update(entries: Set<MessageHistoryHolesViewEntry>) -> (removed: [Disposable], added: [MessageHistoryHolesViewEntry: MetaDisposable]) {
|
||||
var removed: [Disposable] = []
|
||||
var added: [MessageHistoryHolesViewEntry: MetaDisposable] = [:]
|
||||
|
||||
for (entry, disposable) in self.holeDisposables {
|
||||
if !entries.contains(entry) {
|
||||
removed.append(disposable)
|
||||
self.holeDisposables.removeValue(forKey: entry)
|
||||
}
|
||||
}
|
||||
|
||||
for entry in entries {
|
||||
if self.holeDisposables[entry] == nil {
|
||||
let disposable = MetaDisposable()
|
||||
self.holeDisposables[entry] = disposable
|
||||
added[entry] = disposable
|
||||
}
|
||||
}
|
||||
|
||||
return (removed, added)
|
||||
}
|
||||
}
|
||||
|
||||
func managedMessageHistoryHoles(network: Network, postbox: Postbox) -> Signal<Void, NoError> {
|
||||
return Signal { _ in
|
||||
let state = Atomic(value: ManagedMessageHistoryHolesState())
|
||||
|
||||
let disposable = postbox.messageHistoryHolesView().start(next: { view in
|
||||
let (removed, added) = state.with { state -> (removed: [Disposable], added: [MessageHistoryHolesViewEntry: MetaDisposable]) in
|
||||
var entries = Set<MessageHistoryHolesViewEntry>()
|
||||
for (_, entrySet) in view.entries {
|
||||
for entry in entrySet {
|
||||
entries.insert(entry)
|
||||
}
|
||||
}
|
||||
return state.update(entries: entries)
|
||||
}
|
||||
|
||||
for disposable in removed {
|
||||
disposable.dispose()
|
||||
}
|
||||
|
||||
for (entry, disposable) in added {
|
||||
disposable.set(fetchMessageHistoryHole(network: network, postbox: postbox, hole: entry.hole, direction: entry.direction, tagMask: entry.tags).start())
|
||||
}
|
||||
})
|
||||
|
||||
return ActionDisposable {
|
||||
disposable.dispose()
|
||||
for disposable in state.with({ state -> [Disposable] in
|
||||
state.clearDisposables()
|
||||
}) {
|
||||
disposable.dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
14
TelegramCore/ManagedServiceViews.swift
Normal file
@ -0,0 +1,14 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
|
||||
func managedServiceViews(network: Network, postbox: Postbox, stateManager: StateManager) -> Signal<Void, NoError> {
|
||||
return Signal { _ in
|
||||
let disposable = DisposableSet()
|
||||
disposable.add(managedMessageHistoryHoles(network: network, postbox: postbox).start())
|
||||
disposable.add(managedChatListHoles(network: network, postbox: postbox).start())
|
||||
disposable.add(managedUnsentMessageIndices(network: network, postbox: postbox, stateManager: stateManager).start())
|
||||
disposable.add(managedSynchronizePeerReadStates(network: network, postbox: postbox, stateManager: stateManager).start())
|
||||
return disposable
|
||||
}
|
||||
}
|
71
TelegramCore/ManagedSynchronizePeerReadStates.swift
Normal file
@ -0,0 +1,71 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
|
||||
private final class ManagedSynchronizePeerReadStatesState {
|
||||
private var synchronizeDisposables: [PeerId: (PeerReadStateSynchronizationOperation, Disposable)] = [:]
|
||||
|
||||
func clearDisposables() -> [Disposable] {
|
||||
let disposables = Array(self.synchronizeDisposables.values.map({ $0.1 }))
|
||||
self.synchronizeDisposables.removeAll()
|
||||
return disposables
|
||||
}
|
||||
|
||||
func update(operations: [PeerId: PeerReadStateSynchronizationOperation]) -> (removed: [Disposable], added: [(PeerId, PeerReadStateSynchronizationOperation, MetaDisposable)]) {
|
||||
var removed: [Disposable] = []
|
||||
var added: [(PeerId, PeerReadStateSynchronizationOperation, MetaDisposable)] = []
|
||||
|
||||
for (peerId, (operation, disposable)) in self.synchronizeDisposables {
|
||||
if operations[peerId] != operation {
|
||||
removed.append(disposable)
|
||||
self.synchronizeDisposables.removeValue(forKey: peerId)
|
||||
}
|
||||
}
|
||||
|
||||
for (peerId, operation) in operations {
|
||||
if self.synchronizeDisposables[peerId] == nil {
|
||||
let disposable = MetaDisposable()
|
||||
self.synchronizeDisposables[peerId] = (operation, disposable)
|
||||
added.append((peerId, operation, disposable))
|
||||
}
|
||||
}
|
||||
|
||||
return (removed, added)
|
||||
}
|
||||
}
|
||||
|
||||
func managedSynchronizePeerReadStates(network: Network, postbox: Postbox, stateManager: StateManager) -> Signal<Void, NoError> {
|
||||
return Signal { _ in
|
||||
let state = Atomic(value: ManagedSynchronizePeerReadStatesState())
|
||||
|
||||
let disposable = postbox.synchronizePeerReadStatesView().start(next: { view in
|
||||
let (removed, added) = state.with { state -> (removed: [Disposable], added: [(PeerId, PeerReadStateSynchronizationOperation, MetaDisposable)]) in
|
||||
return state.update(operations: view.operations)
|
||||
}
|
||||
|
||||
for disposable in removed {
|
||||
disposable.dispose()
|
||||
}
|
||||
|
||||
for (peerId, operation, disposable) in added {
|
||||
let synchronizeOperation: Signal<Void, NoError>
|
||||
switch operation {
|
||||
case .Validate:
|
||||
synchronizeOperation = synchronizePeerReadState(network: network, postbox: postbox, stateManager: stateManager, peerId: peerId, push: false, validate: true)
|
||||
case let .Push(thenSync):
|
||||
synchronizeOperation = synchronizePeerReadState(network: network, postbox: postbox, stateManager: stateManager, peerId: peerId, push: true, validate: thenSync)
|
||||
}
|
||||
disposable.set(synchronizeOperation.start())
|
||||
}
|
||||
})
|
||||
|
||||
return ActionDisposable {
|
||||
disposable.dispose()
|
||||
for disposable in state.with({ state -> [Disposable] in
|
||||
state.clearDisposables()
|
||||
}) {
|
||||
disposable.dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
70
TelegramCore/ManagedUnsentMessageIndices.swift
Normal file
@ -0,0 +1,70 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
|
||||
private final class ManagedUnsentMessageIndicesState {
|
||||
private var sendDisposables: [MessageIndex: Disposable] = [:]
|
||||
|
||||
func clearDisposables() -> [Disposable] {
|
||||
let disposables = Array(self.sendDisposables.values)
|
||||
self.sendDisposables.removeAll()
|
||||
return disposables
|
||||
}
|
||||
|
||||
func update(entries: Set<MessageIndex>) -> (removed: [Disposable], added: [MessageIndex: MetaDisposable]) {
|
||||
var removed: [Disposable] = []
|
||||
var added: [MessageIndex: MetaDisposable] = [:]
|
||||
|
||||
for (entry, disposable) in self.sendDisposables {
|
||||
if !entries.contains(entry) {
|
||||
removed.append(disposable)
|
||||
self.sendDisposables.removeValue(forKey: entry)
|
||||
}
|
||||
}
|
||||
|
||||
for entry in entries {
|
||||
if self.sendDisposables[entry] == nil {
|
||||
let disposable = MetaDisposable()
|
||||
self.sendDisposables[entry] = disposable
|
||||
added[entry] = disposable
|
||||
}
|
||||
}
|
||||
|
||||
return (removed, added)
|
||||
}
|
||||
}
|
||||
|
||||
func managedUnsentMessageIndices(network: Network, postbox: Postbox, stateManager: StateManager) -> Signal<Void, NoError> {
|
||||
return Signal { _ in
|
||||
let state = Atomic(value: ManagedUnsentMessageIndicesState())
|
||||
|
||||
let disposable = postbox.unsentMessageIndicesView().start(next: { view in
|
||||
let (removed, added) = state.with { state -> (removed: [Disposable], added: [MessageIndex: MetaDisposable]) in
|
||||
return state.update(entries: view.indices)
|
||||
}
|
||||
|
||||
for disposable in removed {
|
||||
disposable.dispose()
|
||||
}
|
||||
|
||||
for (index, disposable) in added {
|
||||
let sendMessage = postbox.messageAtId(index.id)
|
||||
|> filter { $0 != nil }
|
||||
|> take(1)
|
||||
|> mapToSignal { message -> Signal<Void, NoError> in
|
||||
return sendUnsentMessage(network: network, postbox: postbox, stateManager: stateManager, message: message!)
|
||||
}
|
||||
disposable.set(sendMessage.start())
|
||||
}
|
||||
})
|
||||
|
||||
return ActionDisposable {
|
||||
disposable.dispose()
|
||||
for disposable in state.with({ state -> [Disposable] in
|
||||
state.clearDisposables()
|
||||
}) {
|
||||
disposable.dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -182,40 +182,62 @@ private final class MediaPlayerContext {
|
||||
queue.async { [weak self] in
|
||||
if let strongSelf = self {
|
||||
if let playerNode = strongSelf.playerNode {
|
||||
let queue = strongSelf.queue
|
||||
|
||||
DispatchQueue.main.async {
|
||||
playerNode.reset()
|
||||
playerNode.controlTimebase = controlTimebase.timebase
|
||||
|
||||
queue.async { [weak self] in
|
||||
if let strongSelf = self {
|
||||
switch action {
|
||||
case .play:
|
||||
strongSelf.state = .playing(loadedState)
|
||||
strongSelf.audioRenderer?.start()
|
||||
case .pause:
|
||||
strongSelf.state = .paused(loadedState)
|
||||
}
|
||||
|
||||
strongSelf.tick()
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
switch action {
|
||||
case .play:
|
||||
strongSelf.state = .playing(loadedState)
|
||||
strongSelf.audioRenderer?.start()
|
||||
case .pause:
|
||||
strongSelf.state = .paused(loadedState)
|
||||
}
|
||||
|
||||
strongSelf.tick()
|
||||
}
|
||||
|
||||
switch action {
|
||||
case .play:
|
||||
strongSelf.state = .playing(loadedState)
|
||||
strongSelf.audioRenderer?.start()
|
||||
case .pause:
|
||||
strongSelf.state = .paused(loadedState)
|
||||
}
|
||||
|
||||
strongSelf.tick()
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if let playerNode = self.playerNode {
|
||||
let queue = self.queue
|
||||
|
||||
DispatchQueue.main.async {
|
||||
playerNode.reset()
|
||||
playerNode.controlTimebase = controlTimebase.timebase
|
||||
|
||||
queue.async { [weak self] in
|
||||
if let strongSelf = self {
|
||||
switch action {
|
||||
case .play:
|
||||
strongSelf.state = .playing(loadedState)
|
||||
case .pause:
|
||||
strongSelf.state = .paused(loadedState)
|
||||
}
|
||||
|
||||
strongSelf.tick()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch action {
|
||||
case .play:
|
||||
self.state = .playing(loadedState)
|
||||
case .pause:
|
||||
self.state = .paused(loadedState)
|
||||
}
|
||||
|
||||
self.tick()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -471,6 +471,7 @@ final class MediaPlayerAudioRenderer {
|
||||
didSet {
|
||||
let rate = self.rate
|
||||
if !oldValue.isEqual(to: rate) {
|
||||
print("setting audio rate to \(rate)")
|
||||
assert(rate.isEqual(to: 1.0) || rate.isEqual(to: 0.0))
|
||||
|
||||
audioPlayerRendererQueue.async {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Foundation
|
||||
import CoreMedia
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
|
||||
enum MediaTrackFrameType {
|
||||
case video
|
||||
|
@ -25,7 +25,7 @@ public struct Namespaces {
|
||||
}
|
||||
}
|
||||
|
||||
extension MessageTags {
|
||||
public extension MessageTags {
|
||||
static let PhotoOrVideo = MessageTags(rawValue: 1 << 0)
|
||||
static let File = MessageTags(rawValue: 2 << 0)
|
||||
static let Voice = MessageTags(rawValue: 3 << 0)
|
||||
|
@ -2,7 +2,7 @@ import Foundation
|
||||
import MtProtoKit
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
|
||||
enum ConnectionStatus {
|
||||
case WaitingForNetwork
|
||||
@ -76,7 +76,7 @@ private class MTProtoConnectionStatusDelegate: NSObject, MTProtoDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
class Network {
|
||||
public class Network {
|
||||
let datacenterId: Int
|
||||
let context: MTContext
|
||||
let mtProto: MTProto
|
||||
@ -91,6 +91,7 @@ class Network {
|
||||
|
||||
init(datacenterId: Int, keychain: Keychain) {
|
||||
NetworkRegisterLoggingFunction()
|
||||
registerLoggingFunctions()
|
||||
|
||||
self.datacenterId = datacenterId
|
||||
|
||||
|
@ -11,7 +11,7 @@ void setBridgingTraceFunction(void (*f)(NSString *, NSString *)) {
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
static bool loggingEnabled = false;
|
||||
#else
|
||||
static bool loggingEnabled = false;
|
||||
static bool loggingEnabled = true;
|
||||
#endif
|
||||
|
||||
static void TGTelegramLoggingFunction(NSString *format, va_list args) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Foundation
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
|
||||
private let phoneNumberUtil = NBPhoneNumberUtil()
|
||||
|
||||
|
@ -4,7 +4,7 @@ import SwiftSignalKit
|
||||
import Display
|
||||
import AVFoundation
|
||||
import ImageIO
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
|
||||
func largestRepresentationForPhoto(_ photo: TelegramMediaImage) -> TelegramMediaImageRepresentation? {
|
||||
return photo.representationForDisplayAtSize(CGSize(width: 1280.0, height: 1280.0))
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Foundation
|
||||
import Darwin
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
|
||||
public final class RingByteBuffer {
|
||||
public let size: Int
|
||||
|
@ -96,6 +96,7 @@ class SearchBarNode: ASDisplayNode, UITextFieldDelegate {
|
||||
self.cancelButton = ASButtonNode()
|
||||
self.cancelButton.hitTestSlop = UIEdgeInsets(top: -8.0, left: -8.0, bottom: -8.0, right: -8.0)
|
||||
self.cancelButton.setAttributedTitle(NSAttributedString(string: "Cancel", font: Font.regular(17.0), textColor: UIColor(0x1195f2)), for: [])
|
||||
self.cancelButton.displaysAsynchronously = false
|
||||
|
||||
super.init()
|
||||
|
||||
|
@ -2,15 +2,15 @@ import Foundation
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
|
||||
func sendUnsentMessage(account: Account, message: Message) -> Signal<Void, NoError> {
|
||||
return account.postbox.peerWithId(message.id.peerId)
|
||||
func sendUnsentMessage(network: Network, postbox: Postbox, stateManager: StateManager, message: Message) -> Signal<Void, NoError> {
|
||||
return postbox.peerWithId(message.id.peerId)
|
||||
|> take(1)
|
||||
//|> delay(2.0, queue: Queue.concurrentDefaultQueue())
|
||||
|> mapToSignal { peer -> Signal<Void, NoError> in
|
||||
if let inputPeer = apiInputPeer(peer) {
|
||||
var randomId: Int64 = 0
|
||||
arc4random_buf(&randomId, 8)
|
||||
return account.network.request(Api.functions.messages.sendMessage(flags: 0, peer: inputPeer, replyToMsgId: 0, message: message.text, randomId: randomId, replyMarkup: nil, entities: nil))
|
||||
return network.request(Api.functions.messages.sendMessage(flags: 0, peer: inputPeer, replyToMsgId: 0, message: message.text, randomId: randomId, replyMarkup: nil, entities: nil))
|
||||
|> mapError { _ -> NoError in
|
||||
return NoError()
|
||||
}
|
||||
@ -18,7 +18,7 @@ func sendUnsentMessage(account: Account, message: Message) -> Signal<Void, NoErr
|
||||
let messageId = result.messageIds.first
|
||||
let apiMessage = result.messages.first
|
||||
|
||||
let modify = account.postbox.modify { modifier -> Void in
|
||||
let modify = postbox.modify { modifier -> Void in
|
||||
modifier.updateMessage(MessageIndex(message), update: { currentMessage in
|
||||
let updatedId: MessageId
|
||||
if let messageId = messageId {
|
||||
@ -61,13 +61,13 @@ func sendUnsentMessage(account: Account, message: Message) -> Signal<Void, NoErr
|
||||
return StoreMessage(id: updatedId, timestamp: currentMessage.timestamp, flags: [], tags: currentMessage.tags, forwardInfo: storeForwardInfo, authorId: currentMessage.author?.id, text: text, attributes: attributes, media: media)
|
||||
})
|
||||
} |> afterDisposed {
|
||||
account.stateManager.addUpdates(result)
|
||||
stateManager.addUpdates(result)
|
||||
}
|
||||
|
||||
return modify
|
||||
}
|
||||
|> `catch` { _ -> Signal<Void, NoError> in
|
||||
let modify = account.postbox.modify { modifier -> Void in
|
||||
let modify = postbox.modify { modifier -> Void in
|
||||
modifier.updateMessage(MessageIndex(message), update: { currentMessage in
|
||||
var storeForwardInfo: StoreMessageForwardInfo?
|
||||
if let forwardInfo = currentMessage.forwardInfo {
|
||||
|
@ -3,22 +3,22 @@ import Display
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
|
||||
class SettingsController: ListController {
|
||||
public class SettingsController: ListController {
|
||||
private let account: Account
|
||||
|
||||
private let peer = Promise<Peer>()
|
||||
private let connectionStatus = Promise<ConnectionStatus>(.Online)
|
||||
private let peerAndConnectionStatusDisposable = MetaDisposable()
|
||||
|
||||
init(account: Account) {
|
||||
public init(account: Account) {
|
||||
self.account = account
|
||||
|
||||
super.init()
|
||||
|
||||
self.title = "Settings"
|
||||
self.tabBarItem.title = "Settings"
|
||||
self.tabBarItem.image = UIImage(named: "Chat List/Tabs/IconSettings")?.precomposed()
|
||||
self.tabBarItem.selectedImage = UIImage(named: "Chat List/Tabs/IconSettingsSelected")?.precomposed()
|
||||
self.tabBarItem.image = UIImage(bundleImageName: "Chat List/Tabs/IconSettings")?.precomposed()
|
||||
self.tabBarItem.selectedImage = UIImage(bundleImageName: "Chat List/Tabs/IconSettingsSelected")?.precomposed()
|
||||
|
||||
let deselectAction = { [weak self] () -> Void in
|
||||
self?.listDisplayNode.listView.clearHighlightAnimated(true)
|
||||
@ -58,7 +58,7 @@ class SettingsController: ListController {
|
||||
connectionStatus.set(account.network.connectionStatus)
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required public init(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
|
@ -1055,7 +1055,7 @@ private func pollDifference(_ account: Account) -> Signal<Void, NoError> {
|
||||
return signal
|
||||
}
|
||||
|
||||
class StateManager {
|
||||
public class StateManager {
|
||||
private let stateQueue = Queue()
|
||||
|
||||
private let account: Account
|
||||
@ -1079,7 +1079,7 @@ class StateManager {
|
||||
timer?.invalidate()
|
||||
}
|
||||
|
||||
func reset() {
|
||||
public func reset() {
|
||||
if self.updateService == nil {
|
||||
self.updateService = UpdateMessageService(peerId: self.account.peerId)
|
||||
updatesDisposable.set(self.updateService!.pipe.signal().start(next: { [weak self] groups in
|
||||
|
@ -2,7 +2,7 @@ import Foundation
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
import Display
|
||||
import TelegramCorePrivate
|
||||
import TelegramCorePrivateModule
|
||||
|
||||
private func chatMessageStickerDatas(account: Account, file: TelegramMediaFile) -> Signal<(Data?, Data?, Int), NoError> {
|
||||
let fullSizeResource = fileResource(file)
|
||||
|
@ -12,8 +12,8 @@ private enum PeerReadStateMarker: Equatable {
|
||||
case Channel(Int32)
|
||||
}
|
||||
|
||||
private func inputPeer(account: Account, peerId: PeerId) -> Signal<Api.InputPeer, VerifyReadStateError> {
|
||||
return account.postbox.peerWithId(peerId)
|
||||
private func inputPeer(postbox: Postbox, peerId: PeerId) -> Signal<Api.InputPeer, VerifyReadStateError> {
|
||||
return postbox.peerWithId(peerId)
|
||||
|> mapToSignalPromotingError { peer -> Signal<Api.InputPeer, VerifyReadStateError> in
|
||||
if let inputPeer = apiInputPeer(peer) {
|
||||
return .single(inputPeer)
|
||||
@ -23,10 +23,10 @@ private func inputPeer(account: Account, peerId: PeerId) -> Signal<Api.InputPeer
|
||||
} |> take(1)
|
||||
}
|
||||
|
||||
private func dialogTopMessage(account: Account, peerId: PeerId) -> Signal<(Int32, Int32), VerifyReadStateError> {
|
||||
return inputPeer(account: account, peerId: peerId)
|
||||
private func dialogTopMessage(network: Network, postbox: Postbox, peerId: PeerId) -> Signal<(Int32, Int32), VerifyReadStateError> {
|
||||
return inputPeer(postbox: postbox, peerId: peerId)
|
||||
|> mapToSignal { inputPeer -> Signal<(Int32, Int32), VerifyReadStateError> in
|
||||
return account.network.request(Api.functions.messages.getHistory(peer: inputPeer, offsetId: Int32.max, offsetDate: Int32.max, addOffset: 0, limit: 1, maxId: Int32.max, minId: 1))
|
||||
return network.request(Api.functions.messages.getHistory(peer: inputPeer, offsetId: Int32.max, offsetDate: Int32.max, addOffset: 0, limit: 1, maxId: Int32.max, minId: 1))
|
||||
|> retryRequest
|
||||
|> mapToSignalPromotingError { result -> Signal<(Int32, Int32), VerifyReadStateError> in
|
||||
let apiMessages: [Api.Message]
|
||||
@ -47,12 +47,12 @@ private func dialogTopMessage(account: Account, peerId: PeerId) -> Signal<(Int32
|
||||
}
|
||||
}
|
||||
|
||||
private func dialogReadState(account: Account, peerId: PeerId) -> Signal<(PeerReadState, PeerReadStateMarker), VerifyReadStateError> {
|
||||
return dialogTopMessage(account: account, peerId: peerId)
|
||||
private func dialogReadState(network: Network, postbox: Postbox, peerId: PeerId) -> Signal<(PeerReadState, PeerReadStateMarker), VerifyReadStateError> {
|
||||
return dialogTopMessage(network: network, postbox: postbox, peerId: peerId)
|
||||
|> mapToSignal { topMessage -> Signal<(PeerReadState, PeerReadStateMarker), VerifyReadStateError> in
|
||||
return inputPeer(account: account, peerId: peerId)
|
||||
return inputPeer(postbox: postbox, peerId: peerId)
|
||||
|> mapToSignal { inputPeer -> Signal<(PeerReadState, PeerReadStateMarker), VerifyReadStateError> in
|
||||
return account.network.request(Api.functions.messages.getPeerDialogs(peers: [inputPeer]))
|
||||
return network.request(Api.functions.messages.getPeerDialogs(peers: [inputPeer]))
|
||||
|> retryRequest
|
||||
|> mapToSignalPromotingError { result -> Signal<(PeerReadState, PeerReadStateMarker), VerifyReadStateError> in
|
||||
switch result {
|
||||
@ -132,8 +132,8 @@ private func localReadStateMarker(modifier: Modifier, peerId: PeerId) -> PeerRea
|
||||
}
|
||||
}
|
||||
|
||||
private func localReadStateMarker(account: Account, peerId: PeerId) -> Signal<PeerReadStateMarker, VerifyReadStateError> {
|
||||
return account.postbox.modify { modifier -> PeerReadStateMarker? in
|
||||
private func localReadStateMarker(network: Network, postbox: Postbox, peerId: PeerId) -> Signal<PeerReadStateMarker, VerifyReadStateError> {
|
||||
return postbox.modify { modifier -> PeerReadStateMarker? in
|
||||
return localReadStateMarker(modifier: modifier, peerId: peerId)
|
||||
} |> mapToSignalPromotingError { marker -> Signal<PeerReadStateMarker, VerifyReadStateError> in
|
||||
if let marker = marker {
|
||||
@ -144,15 +144,15 @@ private func localReadStateMarker(account: Account, peerId: PeerId) -> Signal<Pe
|
||||
}
|
||||
}
|
||||
|
||||
private func validatePeerReadState(account: Account, peerId: PeerId) -> Signal<Void, NoError> {
|
||||
let readStateWithInitialState = localReadStateMarker(account: account, peerId: peerId)
|
||||
private func validatePeerReadState(network: Network, postbox: Postbox, stateManager: StateManager, peerId: PeerId) -> Signal<Void, NoError> {
|
||||
let readStateWithInitialState = localReadStateMarker(network: network, postbox: postbox, peerId: peerId)
|
||||
|> mapToSignal { marker -> Signal<(PeerReadState, PeerReadStateMarker, PeerReadStateMarker), VerifyReadStateError> in
|
||||
return dialogReadState(account: account, peerId: peerId)
|
||||
return dialogReadState(network: network, postbox: postbox, peerId: peerId)
|
||||
|> map { ($0.0, marker, $0.1) }
|
||||
}
|
||||
|
||||
let maybeAppliedReadState = readStateWithInitialState |> mapToSignal { (readState, initialMarker, finalMarker) -> Signal<Void, VerifyReadStateError> in
|
||||
return account.stateManager.injectedStateModification(account.postbox.modify { modifier -> VerifyReadStateError? in
|
||||
return stateManager.injectedStateModification(postbox.modify { modifier -> VerifyReadStateError? in
|
||||
if initialMarker == finalMarker {
|
||||
modifier.resetIncomingReadStates([peerId: [Namespaces.Message.Cloud: readState]])
|
||||
return nil
|
||||
@ -181,18 +181,18 @@ private func validatePeerReadState(account: Account, peerId: PeerId) -> Signal<V
|
||||
|> retry(0.1, maxDelay: 5.0, onQueue: Queue.concurrentDefaultQueue())
|
||||
}
|
||||
|
||||
private func pushPeerReadState(account: Account, peerId: PeerId, readState: PeerReadState) -> Signal<PeerReadState, VerifyReadStateError> {
|
||||
return inputPeer(account: account, peerId: peerId)
|
||||
private func pushPeerReadState(network: Network, postbox: Postbox, peerId: PeerId, readState: PeerReadState) -> Signal<PeerReadState, VerifyReadStateError> {
|
||||
return inputPeer(postbox: postbox, peerId: peerId)
|
||||
|> mapToSignal { inputPeer -> Signal<PeerReadState, VerifyReadStateError> in
|
||||
switch inputPeer {
|
||||
case let .inputPeerChannel(channelId, accessHash):
|
||||
return account.network.request(Api.functions.channels.readHistory(channel: Api.InputChannel.inputChannel(channelId: channelId, accessHash: accessHash), maxId: readState.maxIncomingReadId))
|
||||
return network.request(Api.functions.channels.readHistory(channel: Api.InputChannel.inputChannel(channelId: channelId, accessHash: accessHash), maxId: readState.maxIncomingReadId))
|
||||
|> retryRequest
|
||||
|> mapToSignalPromotingError { _ -> Signal<PeerReadState, VerifyReadStateError> in
|
||||
return .single(readState)
|
||||
}
|
||||
default:
|
||||
return account.network.request(Api.functions.messages.readHistory(peer: inputPeer, maxId: readState.maxIncomingReadId))
|
||||
return network.request(Api.functions.messages.readHistory(peer: inputPeer, maxId: readState.maxIncomingReadId))
|
||||
|> retryRequest
|
||||
|> mapToSignalPromotingError { _ -> Signal<PeerReadState, VerifyReadStateError> in
|
||||
return .single(readState)
|
||||
@ -201,8 +201,8 @@ private func pushPeerReadState(account: Account, peerId: PeerId, readState: Peer
|
||||
}
|
||||
}
|
||||
|
||||
private func pushPeerReadState(account: Account, peerId: PeerId) -> Signal<Void, NoError> {
|
||||
let currentReadState = account.postbox.modify { modifier -> PeerReadState? in
|
||||
private func pushPeerReadState(network: Network, postbox: Postbox, stateManager: StateManager, peerId: PeerId) -> Signal<Void, NoError> {
|
||||
let currentReadState = postbox.modify { modifier -> PeerReadState? in
|
||||
if let readStates = modifier.getPeerReadStates(peerId) {
|
||||
for (namespace, readState) in readStates {
|
||||
if namespace == Namespaces.Message.Cloud {
|
||||
@ -216,7 +216,7 @@ private func pushPeerReadState(account: Account, peerId: PeerId) -> Signal<Void,
|
||||
let pushedState = currentReadState
|
||||
|> mapToSignalPromotingError { readState -> Signal<PeerReadState, VerifyReadStateError> in
|
||||
if let readState = readState {
|
||||
return pushPeerReadState(account: account, peerId: peerId, readState: readState)
|
||||
return pushPeerReadState(network: network, postbox: postbox, peerId: peerId, readState: readState)
|
||||
} else {
|
||||
return .complete()
|
||||
}
|
||||
@ -224,7 +224,7 @@ private func pushPeerReadState(account: Account, peerId: PeerId) -> Signal<Void,
|
||||
|
||||
let verifiedState = pushedState
|
||||
|> mapToSignal { readState -> Signal<Void, VerifyReadStateError> in
|
||||
return account.stateManager.injectedStateModification(account.postbox.modify { modifier -> VerifyReadStateError? in
|
||||
return stateManager.injectedStateModification(postbox.modify { modifier -> VerifyReadStateError? in
|
||||
if let readStates = modifier.getPeerReadStates(peerId) {
|
||||
for (namespace, currentReadState) in readStates where namespace == Namespaces.Message.Cloud {
|
||||
if currentReadState == readState {
|
||||
@ -259,13 +259,13 @@ private func pushPeerReadState(account: Account, peerId: PeerId) -> Signal<Void,
|
||||
|> retry(0.1, maxDelay: 5.0, onQueue: Queue.concurrentDefaultQueue())
|
||||
}
|
||||
|
||||
func synchronizePeerReadState(account: Account, peerId: PeerId, push: Bool, validate: Bool) -> Signal<Void, NoError> {
|
||||
func synchronizePeerReadState(network: Network, postbox: Postbox, stateManager: StateManager, peerId: PeerId, push: Bool, validate: Bool) -> Signal<Void, NoError> {
|
||||
var signal: Signal<Void, NoError> = .complete()
|
||||
if push {
|
||||
signal = signal |> then(pushPeerReadState(account: account, peerId: peerId))
|
||||
signal = signal |> then(pushPeerReadState(network: network, postbox: postbox, stateManager: stateManager, peerId: peerId))
|
||||
}
|
||||
if validate {
|
||||
signal = signal |> then(validatePeerReadState(account: account, peerId: peerId))
|
||||
signal = signal |> then(validatePeerReadState(network: network, postbox: postbox, stateManager: stateManager, peerId: peerId))
|
||||
}
|
||||
return signal
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
module TelegramCorePrivate {
|
||||
module TelegramCorePrivateModule {
|
||||
header "../../third-party/FFmpeg-iOS/include/libavcodec/avcodec.h"
|
||||
header "../../third-party/FFmpeg-iOS/include/libavformat/avformat.h"
|
||||
header "../../third-party/FFmpeg-iOS/include/libavformat/avio.h"
|
||||
@ -14,5 +14,4 @@ module TelegramCorePrivate {
|
||||
header "../TryCatchCpp.h"
|
||||
header "../RingBuffer.h"
|
||||
header "../TelegramCoreIncludes.h"
|
||||
export *
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
module TelegramCorePrivateModule {
|
||||
module TelegramCorePrivate {
|
||||
export *
|
||||
}
|
||||
|
@ -28,17 +28,17 @@
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include "libavutil/samplefmt.h"
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/avutil.h"
|
||||
#include "libavutil/buffer.h"
|
||||
#include "libavutil/cpu.h"
|
||||
#include "libavutil/channel_layout.h"
|
||||
#include "libavutil/dict.h"
|
||||
#include "libavutil/frame.h"
|
||||
#include "libavutil/log.h"
|
||||
#include "libavutil/pixfmt.h"
|
||||
#include "libavutil/rational.h"
|
||||
#include "../libavutil/samplefmt.h"
|
||||
#include "../libavutil/attributes.h"
|
||||
#include "../libavutil/avutil.h"
|
||||
#include "../libavutil/buffer.h"
|
||||
#include "../libavutil/cpu.h"
|
||||
#include "../libavutil/channel_layout.h"
|
||||
#include "../libavutil/dict.h"
|
||||
#include "../libavutil/frame.h"
|
||||
#include "../libavutil/log.h"
|
||||
#include "../libavutil/pixfmt.h"
|
||||
#include "../libavutil/rational.h"
|
||||
|
||||
#include "version.h"
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef AVCODEC_AVDCT_H
|
||||
#define AVCODEC_AVDCT_H
|
||||
|
||||
#include "libavutil/opt.h"
|
||||
#include "../libavutilopt.h"
|
||||
|
||||
/**
|
||||
* AVDCT context.
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/pixfmt.h"
|
||||
#include "libavutil/rational.h"
|
||||
#include "../libavutilpixfmt.h"
|
||||
#include "../libavutilrational.h"
|
||||
#include "avcodec.h"
|
||||
|
||||
/* minimum number of bytes to read from a DV stream in order to
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include <mfx/mfxvideo.h>
|
||||
|
||||
#include "libavutil/buffer.h"
|
||||
#include "../libavutilbuffer.h"
|
||||
|
||||
/**
|
||||
* This struct is used for communicating QSV parameters between libavcodec and
|
||||
|
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "libavutil/attributes.h"
|
||||
#include "../libavutilattributes.h"
|
||||
#include "version.h"
|
||||
|
||||
/**
|
||||
|
@ -29,7 +29,7 @@
|
||||
* Public libavcodec VDA header.
|
||||
*/
|
||||
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "../libavcodecavcodec.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
#include <VideoDecodeAcceleration/VDADecoder.h>
|
||||
#undef Picture
|
||||
|
||||
#include "libavcodec/version.h"
|
||||
#include "../libavcodecversion.h"
|
||||
|
||||
// extra flags not defined in VDADecoder.h
|
||||
enum {
|
||||
|