chatViewccc2.rtf 736 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409
  1. {\rtf1\ansi\ansicpg936\cocoartf2513
  2. \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;\f1\fnil\fcharset134 PingFangSC-Regular;\f2\fnil\fcharset0 Menlo-Bold;
  3. \f3\fnil\fcharset0 HelveticaNeue;\f4\fnil\fcharset134 PingFangSC-Semibold;\f5\fnil\fcharset0 AppleColorEmoji;
  4. }
  5. {\colortbl;\red255\green255\blue255;\red93\green108\blue121;\red255\green255\blue255;\red0\green0\blue0;
  6. \red100\green56\blue32;\red196\green26\blue22;\red28\green0\blue207;\red155\green35\blue147;\red28\green70\blue74;
  7. \red57\green0\blue160;\red15\green104\blue160;\red93\green108\blue121;\red11\green79\blue121;\red108\green54\blue169;
  8. \red50\green109\blue116;\red74\green85\blue96;\red14\green14\blue255;}
  9. {\*\expandedcolortbl;;\csgenericrgb\c36526\c42188\c47515;\csgenericrgb\c100000\c100000\c100000;\csgenericrgb\c0\c0\c0\c85000;
  10. \csgenericrgb\c39147\c22031\c12446;\csgenericrgb\c77000\c10200\c8600;\csgenericrgb\c11000\c0\c81000;\csgenericrgb\c60759\c13753\c57628;\csgenericrgb\c10981\c27276\c28869;
  11. \csgenericrgb\c22454\c0\c62803;\csgenericrgb\c5882\c40784\c62745;\csgenericrgb\c36526\c42188\c47515\c35000;\csgenericrgb\c4314\c30980\c47451;\csgenericrgb\c42190\c21278\c66379;
  12. \csgenericrgb\c19418\c42935\c45455;\csgenericrgb\c29020\c33333\c37647;\csgenericrgb\c5500\c5500\c100000;}
  13. \margl1440\margr1440\vieww9000\viewh8400\viewkind0
  14. \deftab593
  15. \pard\tx593\pardeftab593\pardirnatural\partightenfactor0
  16. \f0\fs24 \cf2 \cb3 //\cf4 \
  17. \cf2 // JXChatViewC.m\cf4 \
  18. \cf2 //\cf4 \
  19. \cf2 // Created by Reese on 13-8-11.\cf4 \
  20. \cf2 // Copyright (c) 2013
  21. \f1 \'c4\'ea
  22. \f0 Reese. All rights reserved.\cf4 \
  23. \cf2 //
  24. \f1 \'a3\'bf
  25. \f0 1111\cf4 \
  26. \
  27. \
  28. \cf5 #import \cf6 "JXChatViewC.h"\cf2 //\cf4 \
  29. \
  30. \cf5 #import \cf6 "ChatCacheFileUtil.h"\cf4 \
  31. \cf5 #import \cf6 "VoiceConverter.h"\cf4 \
  32. \cf5 #import \cf6 "Photo.h"\cf4 \
  33. \cf5 #import \cf6 "NSData+XMPP.h"\cf4 \
  34. \cf5 #import \cf6 "AppDelegate.h"\cf4 \
  35. \cf5 #import \cf6 "JXEmoji.h"\cf4 \
  36. \cf5 #import \cf6 "FaceViewController.h"\cf4 \
  37. \cf5 #import \cf6 "gifViewController.h"\cf4 \
  38. \cf5 #import \cf6 "emojiViewController.h"\cf4 \
  39. \cf5 #import \cf6 "SCGIFImageView.h"\cf4 \
  40. \cf2 //#import "JXImageView.h"\cf4 \
  41. \cf5 #import \cf6 "JXSelectImageView.h"\cf4 \
  42. \cf5 #import \cf6 "emojiViewController.h"\cf4 \
  43. \cf5 #import \cf6 "JXTableView.h"\cf4 \
  44. \cf5 #import \cf6 "LXActionSheet.h"\cf4 \
  45. \cf5 #import \cf6 "JXVolumeView.h"\cf4 \
  46. \cf5 #import \cf6 "myMediaVC.h"\cf4 \
  47. \cf5 #import \cf6 "JXMediaObject.h"\cf4 \
  48. \cf5 #import \cf6 "FMDatabase.h"\cf4 \
  49. \cf5 #import \cf6 "JXMyTools.h"\cf4 \
  50. \cf5 #if TAR_IM\cf4 \
  51. \cf5 #ifdef Meeting_Version\cf4 \
  52. \cf5 #import \cf6 "JXMeetingObject.h"\cf4 \
  53. \cf5 #import \cf6 "AskCallViewController.h"\cf4 \
  54. \cf5 #import \cf6 "JXAVCallViewController.h"\cf4 \
  55. \cf5 #endif\cf4 \
  56. \cf5 #endif\cf4 \
  57. \cf5 #ifdef Live_Version\cf4 \
  58. \cf5 #import \cf6 "JXLiveJidManager.h"\cf4 \
  59. \cf5 #endif\cf4 \
  60. \cf5 #import \cf6 "JXUserInfoVC.h"\cf4 \
  61. \cf5 #import \cf6 "JXRoomMemberVC.h"\cf4 \
  62. \cf5 #import \cf6 "JXRoomObject.h"\cf4 \
  63. \cf5 #import \cf6 "JXRoomRemind.h"\cf4 \
  64. \cf5 #import \cf6 "JXSelFriendVC.h"\cf4 \
  65. \cf5 #import \cf6 "JXMyFile.h"\cf4 \
  66. \cf5 #import \cf6 "JXShareFileObject.h"\cf4 \
  67. \cf5 #import \cf6 "JXFileDetailViewController.h"\cf4 \
  68. \
  69. \cf5 #import \cf6 "JXMapData.h"\cf4 \
  70. \cf5 #import \cf6 "JXSendRedPacketViewController.h"\cf4 \
  71. \
  72. \cf5 #import \cf6 "JXredPacketDetailVC.h"\cf4 \
  73. \cf5 #import \cf6 "JXOpenRedPacketVC.h"\cf4 \
  74. \cf2 //
  75. \f1 \'cc\'ed\'bc\'d3
  76. \f0 VC
  77. \f1 \'d7\'aa\'b3\'a1\'b6\'af\'bb\'ad
  78. \f0 \cf4 \
  79. \cf5 #import \cf6 "DMScaleTransition.h"\cf4 \
  80. \cf2 //
  81. \f1 \'b8\'f7\'d6\'d6
  82. \f0 Cell\cf4 \
  83. \cf5 #import \cf6 "JXBaseChatCell.h"\cf4 \
  84. \cf5 #import \cf6 "JXMessageCell.h"\cf4 \
  85. \cf5 #import \cf6 "JXImageCell.h"\cf4 \
  86. \cf5 #import \cf6 "JXFileCell.h"\cf4 \
  87. \cf5 #import \cf6 "JXVideoCell.h"\cf4 \
  88. \cf5 #import \cf6 "JXAudioCell.h"\cf4 \
  89. \cf5 #import \cf6 "JXLocationCell.h"\cf4 \
  90. \cf5 #import \cf6 "JXCardCell.h"\cf4 \
  91. \cf5 #import \cf6 "JXRedPacketCell.h"\cf4 \
  92. \cf5 #import \cf6 "JXRemindCell.h"\cf4 \
  93. \cf5 #import \cf6 "JXGifCell.h"\cf4 \
  94. \cf5 #import \cf6 "JXSystemImage1Cell.h"\cf4 \
  95. \cf5 #import \cf6 "JXSystemImage2Cell.h"\cf4 \
  96. \cf5 #import \cf6 "JXAVCallCell.h"\cf4 \
  97. \cf5 #import \cf6 "JXLinkCell.h"\cf4 \
  98. \cf5 #import \cf6 "JXShakeCell.h"\cf4 \
  99. \cf5 #import \cf6 "JXNewShakeCell.h"\cf4 \
  100. \cf5 #import \cf6 "JXMergeRelayCell.h"\cf4 \
  101. \cf5 #import \cf6 "JXShareCell.h"\cf4 \
  102. \cf5 #import \cf6 "JXTransferCell.h"\cf4 \
  103. \cf5 #import \cf6 "JXReplyCell.h"\cf4 \
  104. \
  105. \cf5 #import \cf6 "EmojiTextAttachment.h"\cf4 \
  106. \cf5 #import \cf6 "NSAttributedString+EmojiExtension.h"\cf4 \
  107. \
  108. \cf5 #import \cf6 "ImageBrowserViewController.h"\cf4 \
  109. \cf5 #import \cf6 "JXRelayVC.h"\cf4 \
  110. \cf5 #import \cf6 "webpageVC.h"\cf4 \
  111. \cf5 #import \cf6 "JX_DownListView.h"\cf4 \
  112. \cf5 #import \cf6 "JXReadListVC.h"\cf4 \
  113. \cf5 #import \cf6 <AssetsLibrary/AssetsLibrary.h>\cf4 \
  114. \cf5 #import \cf6 "UIImageView+WebCache.h"\cf4 \
  115. \cf5 #import \cf6 "JXCameraVC.h"\cf4 \
  116. \cf5 #import \cf6 "JXChatSettingVC.h"\cf4 \
  117. \cf5 #import \cf6 "JXVerifyDetailVC.h"\cf4 \
  118. \cf5 #import \cf6 "JXDevice.h"\cf4 \
  119. \cf5 #import \cf6 "JXChatLogVC.h"\cf4 \
  120. \cf5 #import \cf6 "JXSelectFriendsVC.h"\cf4 \
  121. \cf5 #import \cf6 "JXMsgViewController.h"\cf4 \
  122. \cf5 #import \cf6 "WeiboViewControlle.h"\cf4 \
  123. \cf5 #import \cf6 "ObjUrlData.h"\cf4 \
  124. \cf5 #import \cf6 "JXSynTask.h"\cf4 \
  125. \cf5 #import \cf6 "JXGoogleMapVC.h"\cf4 \
  126. \cf5 #import \cf6 "RITLPhotosViewController.h"\cf4 \
  127. \cf5 #import \cf6 "RITLPhotosDataManager.h"\cf4 \
  128. \cf5 #import \cf6 "JXActionSheetVC.h"\cf4 \
  129. \cf5 #import \cf6 "JXInputVC.h"\cf4 \
  130. \cf5 #import \cf6 "JXRoomPool.h"\cf4 \
  131. \cf5 #import \cf6 "KKImageEditorViewController.h"\cf4 \
  132. \cf5 #import \cf6 "JXTransferViewController.h"\cf4 \
  133. \cf5 #import \cf6 "JXTransferDeatilVC.h"\cf4 \
  134. \cf5 #import \cf6 "JXSelectAddressBookVC.h"\cf4 \
  135. \cf5 #import \cf6 "JXInputMoneyVC.h"\cf4 \
  136. \cf5 #import \cf6 "JXGroupHelperListVC.h"\cf4 \
  137. \cf5 #import \cf6 "JXGroupHeplerModel.h"\cf4 \
  138. \cf5 #import \cf6 "JXAutoReplyAideVC.h"\cf4 \
  139. \cf5 #import \cf6 "JXLabelObject.h"\cf4 \
  140. \cf5 #import \cf6 "JXEmojiCell.h"\cf4 \
  141. \cf5 #import \cf6 "JXFaceCustomCell.h"\cf4 \
  142. \cf5 #import \cf6 "CYGroupSendHelperViewController.h"\cf4 \
  143. \cf5 #import \cf6 "DYAdAlertView.h"\cf4 \
  144. \cf5 #import \cf6 "DYWKWebVC.h"\cf4 \
  145. \cf5 #import \cf6 "DYAdModel.h"\cf4 \
  146. \cf5 #import \cf6 "STAlertView.h"\cf4 \
  147. \cf5 #import \cf6 "XLsn0wInputBox.h"\cf4 \
  148. \cf5 #import \cf6 "JLGroupActivityModel.h"\cf4 \
  149. \cf5 #import \cf6 "DSHPopupContainer.h"\cf4 \
  150. \cf5 #import \cf6 "JLSelectView.h"\cf4 \
  151. \cf5 #import \cf6 "MISFloatingBall.h"\cf4 \
  152. \cf5 #import \cf6 "CYWebCustomerServiceVC.h"\cf4 \
  153. \cf5 #import \cf6 "JXUserDetialVc.h"\cf4 \
  154. \cf5 #import \cf6 "JXtopShowVIew.h"\cf4 \
  155. \cf5 #import \cf6 "JxChatGetNoticePersonVc.h"\cf4 \
  156. \cf5 #import \cf6 "JxChatGetNoticePersonGVc.h"\cf4 \
  157. \cf5 #import \cf6 "JXSiDaiWebView.h"\cf4 \
  158. \cf5 #import \cf6 "JXBigReelVc.h"\cf4 \
  159. \cf5 #import \cf6 "JXLuckRescueFundVc.h"\cf4 \
  160. \cf5 #import \cf6 "JXApplyViewController.h"\cf4 \
  161. \cf5 #import \cf6 "JXGoldMangVc.h"\cf4 \
  162. \
  163. \cf5 #define faceHeight (THE_DEVICE_HAVE_HEAD ? \cf7 253\cf5 : \cf7 218\cf5 )\cf4 \
  164. \cf5 #define PAGECOUNT \cf7 50\cf4 \
  165. \cf5 #define NOTICE_WIDTH \cf7 120\cf5 \cf2 //
  166. \f1 \'b5\'f7\'d5\'fb\'c1\'bd\'cc\'f5\'b9\'ab\'b8\'e6\'bc\'e4\'b5\'c4\'be\'e0\'c0\'eb
  167. \f0 \cf4 \
  168. \
  169. \cf5 #define UpdateAcceptCallMsg @\cf6 "UpdateAcceptCallMsg"\cf4 \
  170. \
  171. \cf5 #define groupsend_msgType_text \cf7 1\cf4 \
  172. \cf5 #define groupsend_msgType_image \cf7 2\cf4 \
  173. \cf5 #define groupsend_msgType_video \cf7 3\cf4 \
  174. \cf5 #define groupsend_msgType_audio \cf7 4\cf4 \
  175. \cf5 #define groupsend_msgType_file \cf7 5\cf4 \
  176. \cf5 #define groupsend_msgType_shake \cf7 6\cf4 \
  177. \cf5 #define groupsend_msgType_addressbook \cf7 7\cf4 \
  178. \cf5 #define groupsend_msgType_card \cf7 8\cf4 \
  179. \cf5 #define groupsend_msgType_collect \cf7 9\cf4 \
  180. \cf5 #define groupsend_msgType_imagesAndVideos \cf7 10\cf4 \
  181. \cf5 #define groupsend_msgType_location \cf7 11\cf4 \
  182. \
  183. \f2\b \cf8 @interface
  184. \f0\b0 \cf4 \cf9 JXChatViewC\cf4 ()<\cf9 FaceViewControllerDelegate\cf4 ,\cf9 gifViewControllerDelegate\cf4 ,\cf9 FavoritesVCDelegate\cf4 ,\cf9 JXChatCellDelegate\cf4 ,\cf9 JXRoomMemberVCDelegate\cf4 ,\cf9 SendRedPacketVCDelegate\cf4 ,\cf10 UIAlertViewDelegate\cf4 ,\cf9 JXRelayVCDelegate\cf4 ,\cf9 JXCameraVCDelegate\cf4 ,\cf9 ImageBrowserVCDelegate\cf4 ,\cf9 weiboVCDelegate\cf4 ,\cf9 RITLPhotosViewControllerDelegate\cf4 ,\cf9 JXVideoCellDelegate\cf4 ,\cf9 JXActionSheetVCDelegate\cf4 ,\cf10 UINavigationControllerDelegate\cf4 ,\cf9 KKImageEditorDelegate\cf4 ,\cf9 transferVCDelegate\cf4 ,\cf9 JXSelectAddressBookVCDelegate\cf4 ,\cf9 JXRoomObjectDelegate\cf4 >\{\
  185. \
  186. \cf10 CGRect\cf4 _lastFrame;\
  187. \}\
  188. \f2\b \cf8 @property
  189. \f0\b0 \cf4 (
  190. \f2\b \cf8 nonatomic
  191. \f0\b0 \cf4 ,
  192. \f2\b \cf8 strong
  193. \f0\b0 \cf4 ) \cf10 UIButton\cf4 *\cf11 selectButton\cf4 ;\
  194. \f2\b \cf8 @property
  195. \f0\b0 \cf4 (
  196. \f2\b \cf8 nonatomic
  197. \f0\b0 \cf4 ,
  198. \f2\b \cf8 strong
  199. \f0\b0 \cf4 ) \cf9 DSHPopupContainer\cf4 *\cf11 container\cf4 ;\
  200. \f2\b \cf8 @property
  201. \f0\b0 \cf4 (
  202. \f2\b \cf8 nonatomic
  203. \f0\b0 \cf4 ,
  204. \f2\b \cf8 strong
  205. \f0\b0 \cf4 )\cf9 JLGroupActivityModel\cf4 *\cf11 activityModel\cf4 ;\
  206. \f2\b \cf8 @property
  207. \f0\b0 \cf4 (
  208. \f2\b \cf8 nonatomic
  209. \f0\b0 \cf4 ,
  210. \f2\b \cf8 assign
  211. \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 deltaY\cf4 ;\
  212. \f2\b \cf8 @property
  213. \f0\b0 \cf4 (
  214. \f2\b \cf8 nonatomic
  215. \f0\b0 \cf4 ,
  216. \f2\b \cf8 assign
  217. \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 deltaHeight\cf4 ;\
  218. \cf2 //@property (nonatomic, strong) DMAlphaTransition *alphaTransition;\cf4 \
  219. \f2\b \cf8 @property
  220. \f0\b0 \cf4 (
  221. \f2\b \cf8 nonatomic
  222. \f0\b0 \cf4 ,
  223. \f2\b \cf8 strong
  224. \f0\b0 \cf4 ) \cf9 DMScaleTransition\cf4 *\cf11 scaleTransition\cf4 ;\
  225. \cf2 //@property (nonatomic, strong) DMSlideTransition *slideTransition;\cf4 \
  226. \f2\b \cf8 @property
  227. \f0\b0 \cf4 (
  228. \f2\b \cf8 nonatomic
  229. \f0\b0 \cf4 ,
  230. \f2\b \cf8 strong
  231. \f0\b0 \cf4 ) \cf10 NSArray\cf4 *\cf11 allChatImageArr\cf4 ;\cf2 //
  232. \f1 \'cf\'fb\'cf\'a2\'bc\'c7\'c2\'bc\'c0\'ef\'cb\'f9\'d3\'d0\'cd\'bc\'c6\'ac
  233. \f0 \cf4 \
  234. \f2\b \cf8 @property
  235. \f0\b0 \cf4 (
  236. \f2\b \cf8 nonatomic
  237. \f0\b0 \cf4 ,
  238. \f2\b \cf8 assign
  239. \f0\b0 \cf4 )
  240. \f2\b \cf8 BOOL
  241. \f0\b0 \cf4 \cf11 isReadDelete\cf4 ;\
  242. \f2\b \cf8 @property
  243. \f0\b0 \cf4 (
  244. \f2\b \cf8 nonatomic
  245. \f0\b0 \cf4 ,
  246. \f2\b \cf8 copy
  247. \f0\b0 \cf4 ) \cf10 NSMutableString\cf4 *\cf11 sendText\cf4 ;\
  248. \f2\b \cf8 @property
  249. \f0\b0 \cf4 (
  250. \f2\b \cf8 nonatomic
  251. \f0\b0 \cf4 ,
  252. \f2\b \cf8 strong
  253. \f0\b0 \cf4 ) \cf10 NSMutableString\cf4 *\cf11 names\cf4 ; \cf2 //
  254. \f1 \'c8\'ba\'b7\'a2\'d6\'fa\'ca\'d6\'b1\'ea\'c7\'a9\'c6\'b4\'bd\'d3\'d7\'d6\'b7\'fb\'b4\'ae
  255. \f0 \cf4 \
  256. \f2\b \cf8 @property
  257. \f0\b0 \cf4 (
  258. \f2\b \cf8 nonatomic
  259. \f0\b0 \cf4 ,
  260. \f2\b \cf8 strong
  261. \f0\b0 \cf4 ) \cf10 NSMutableString\cf4 *\cf11 names2\cf4 ; \cf2 //
  262. \f1 \'c8\'ba\'b7\'a2\'d6\'fa\'ca\'d6\'c8\'ba\'d7\'e9\'c6\'b4\'bd\'d3\'d7\'d6\'b7\'fb\'b4\'ae
  263. \f0 \cf4 \
  264. \
  265. \f2\b \cf8 @property
  266. \f0\b0 \cf4 (
  267. \f2\b \cf8 nonatomic
  268. \f0\b0 \cf4 ,
  269. \f2\b \cf8 strong
  270. \f0\b0 \cf4 ) \cf10 NSTimer\cf4 *\cf11 timer\cf4 ;\
  271. \f2\b \cf8 @property
  272. \f0\b0 \cf4 (
  273. \f2\b \cf8 nonatomic
  274. \f0\b0 \cf4 ,
  275. \f2\b \cf8 assign
  276. \f0\b0 \cf4 )
  277. \f2\b \cf8 BOOL
  278. \f0\b0 \cf4 \cf11 loginStatus\cf4 ;\
  279. \f2\b \cf8 @property
  280. \f0\b0 \cf4 (
  281. \f2\b \cf8 nonatomic
  282. \f0\b0 \cf4 ,
  283. \f2\b \cf8 strong
  284. \f0\b0 \cf4 ) \cf10 NSTimer\cf4 *\cf11 enteringTimer\cf4 ;\
  285. \f2\b \cf8 @property
  286. \f0\b0 \cf4 (
  287. \f2\b \cf8 nonatomic
  288. \f0\b0 \cf4 ,
  289. \f2\b \cf8 strong
  290. \f0\b0 \cf4 ) \cf10 NSTimer\cf4 *\cf11 noEnteringTimer\cf4 ;\
  291. \f2\b \cf8 @property
  292. \f0\b0 \cf4 (
  293. \f2\b \cf8 nonatomic
  294. \f0\b0 \cf4 ,
  295. \f2\b \cf8 assign
  296. \f0\b0 \cf4 )
  297. \f2\b \cf8 BOOL
  298. \f0\b0 \cf4 \cf11 isSendEntering\cf4 ;\
  299. \f2\b \cf8 @property
  300. \f0\b0 \cf4 (
  301. \f2\b \cf8 nonatomic
  302. \f0\b0 \cf4 ,
  303. \f2\b \cf8 assign
  304. \f0\b0 \cf4 )
  305. \f2\b \cf8 BOOL
  306. \f0\b0 \cf4 \cf11 isGetServerMsg\cf4 ;\
  307. \f2\b \cf8 @property
  308. \f0\b0 \cf4 (
  309. \f2\b \cf8 nonatomic
  310. \f0\b0 \cf4 ,
  311. \f2\b \cf8 assign
  312. \f0\b0 \cf4 )
  313. \f2\b \cf8 int
  314. \f0\b0 \cf4 \cf11 serverMsgPage\cf4 ;\
  315. \f2\b \cf8 @property
  316. \f0\b0 \cf4 (
  317. \f2\b \cf8 nonatomic
  318. \f0\b0 \cf4 ,
  319. \f2\b \cf8 strong
  320. \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 * \cf11 atMemberArray\cf4 ;\
  321. \
  322. \f2\b \cf8 @property
  323. \f0\b0 \cf4 (
  324. \f2\b \cf8 nonatomic
  325. \f0\b0 \cf4 ,
  326. \f2\b \cf8 copy
  327. \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 userNickName\cf4 ;\
  328. \f2\b \cf8 @property
  329. \f0\b0 \cf4 (
  330. \f2\b \cf8 nonatomic
  331. \f0\b0 \cf4 ,
  332. \f2\b \cf8 assign
  333. \f0\b0 \cf4 )
  334. \f2\b \cf8 BOOL
  335. \f0\b0 \cf4 \cf11 firstGetUser\cf4 ;\
  336. \f2\b \cf8 @property
  337. \f0\b0 \cf4 (
  338. \f2\b \cf8 nonatomic
  339. \f0\b0 \cf4 ,
  340. \f2\b \cf8 assign
  341. \f0\b0 \cf4 )
  342. \f2\b \cf8 BOOL
  343. \f0\b0 \cf4 \cf11 onlinestate\cf4 ;\
  344. \
  345. \f2\b \cf8 @property
  346. \f0\b0 \cf4 (
  347. \f2\b \cf8 nonatomic
  348. \f0\b0 \cf4 ,
  349. \f2\b \cf8 strong
  350. \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 publicMenuBar\cf4 ;\
  351. \f2\b \cf8 @property
  352. \f0\b0 \cf4 (
  353. \f2\b \cf8 nonatomic
  354. \f0\b0 \cf4 ,
  355. \f2\b \cf8 strong
  356. \f0\b0 \cf4 ) \cf10 NSArray\cf4 *\cf11 menuList\cf4 ;\
  357. \f2\b \cf8 @property
  358. \f0\b0 \cf4 (
  359. \f2\b \cf8 nonatomic
  360. \f0\b0 \cf4 ,
  361. \f2\b \cf8 assign
  362. \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 selMenuIndex\cf4 ;\
  363. \
  364. \f2\b \cf8 @property
  365. \f0\b0 \cf4 (
  366. \f2\b \cf8 nonatomic
  367. \f0\b0 \cf4 ,
  368. \f2\b \cf8 assign
  369. \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 withdrawIndex\cf4 ;\
  370. \
  371. \f2\b \cf8 @property
  372. \f0\b0 \cf4 (
  373. \f2\b \cf8 nonatomic
  374. \f0\b0 \cf4 ,
  375. \f2\b \cf8 strong
  376. \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 recordArray\cf4 ;\
  377. \f2\b \cf8 @property
  378. \f0\b0 \cf4 (
  379. \f2\b \cf8 nonatomic
  380. \f0\b0 \cf4 ,
  381. \f2\b \cf8 copy
  382. \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 recordName\cf4 ;\
  383. \f2\b \cf8 @property
  384. \f0\b0 \cf4 (
  385. \f2\b \cf8 nonatomic
  386. \f0\b0 \cf4 ,
  387. \f2\b \cf8 assign
  388. \f0\b0 \cf4 )
  389. \f2\b \cf8 BOOL
  390. \f0\b0 \cf4 \cf11 isRecording\cf4 ;\
  391. \f2\b \cf8 @property
  392. \f0\b0 \cf4 (
  393. \f2\b \cf8 nonatomic
  394. \f0\b0 \cf4 ,
  395. \f2\b \cf8 assign
  396. \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 recordStarNum\cf4 ;\
  397. \
  398. \f2\b \cf8 @property
  399. \f0\b0 \cf4 (
  400. \f2\b \cf8 nonatomic
  401. \f0\b0 \cf4 ,
  402. \f2\b \cf8 strong
  403. \f0\b0 \cf4 ) \cf9 ATMHud\cf4 *\cf11 chatWait\cf4 ;\
  404. \f2\b \cf8 @property
  405. \f0\b0 \cf4 (
  406. \f2\b \cf8 nonatomic
  407. \f0\b0 \cf4 ,
  408. \f2\b \cf8 assign
  409. \f0\b0 \cf4 )
  410. \f2\b \cf8 int
  411. \f0\b0 \cf4 \cf11 sendIndex\cf4 ;\
  412. \
  413. \f2\b \cf8 @property
  414. \f0\b0 \cf4 (
  415. \f2\b \cf8 nonatomic
  416. \f0\b0 \cf4 ,
  417. \f2\b \cf8 strong
  418. \f0\b0 \cf4 ) \cf9 JXLocationVC\cf4 *\cf11 locVC\cf4 ;\
  419. \f2\b \cf8 @property
  420. \f0\b0 \cf4 (
  421. \f2\b \cf8 nonatomic
  422. \f0\b0 \cf4 ,
  423. \f2\b \cf8 strong
  424. \f0\b0 \cf4 ) \cf9 JXGoogleMapVC\cf4 *\cf11 gooMap\cf4 ;\
  425. \
  426. \f2\b \cf8 @property
  427. \f0\b0 \cf4 (
  428. \f2\b \cf8 nonatomic
  429. \f0\b0 \cf4 ,
  430. \f2\b \cf8 assign
  431. \f0\b0 \cf4 )
  432. \f2\b \cf8 int
  433. \f0\b0 \cf4 \cf11 isBeenBlack\cf4 ;\
  434. \f2\b \cf8 @property
  435. \f0\b0 \cf4 (
  436. \f2\b \cf8 nonatomic
  437. \f0\b0 \cf4 ,
  438. \f2\b \cf8 assign
  439. \f0\b0 \cf4 )
  440. \f2\b \cf8 int
  441. \f0\b0 \cf4 \cf11 friendStatus\cf4 ;\
  442. \
  443. \f2\b \cf8 @property
  444. \f0\b0 \cf4 (
  445. \f2\b \cf8 nonatomic
  446. \f0\b0 \cf4 ,
  447. \f2\b \cf8 copy
  448. \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 meetingNo\cf4 ;\
  449. \f2\b \cf8 @property
  450. \f0\b0 \cf4 (
  451. \f2\b \cf8 nonatomic
  452. \f0\b0 \cf4 ,
  453. \f2\b \cf8 assign
  454. \f0\b0 \cf4 )
  455. \f2\b \cf8 BOOL
  456. \f0\b0 \cf4 \cf11 isAudioMeeting\cf4 ;\
  457. \f2\b \cf8 @property
  458. \f0\b0 \cf4 (
  459. \f2\b \cf8 nonatomic
  460. \f0\b0 \cf4 ,
  461. \f2\b \cf8 assign
  462. \f0\b0 \cf4 )
  463. \f2\b \cf8 BOOL
  464. \f0\b0 \cf4 \cf11 isTalkMeeting\cf4 ;\
  465. \
  466. \f2\b \cf8 @property
  467. \f0\b0 \cf4 (
  468. \f2\b \cf8 nonatomic
  469. \f0\b0 \cf4 ,
  470. \f2\b \cf8 assign
  471. \f0\b0 \cf4 )
  472. \f2\b \cf8 int
  473. \f0\b0 \cf4 \cf11 groupMessagesIndex\cf4 ;\
  474. \
  475. \f2\b \cf8 @property
  476. \f0\b0 \cf4 (
  477. \f2\b \cf8 nonatomic
  478. \f0\b0 \cf4 ,
  479. \f2\b \cf8 strong
  480. \f0\b0 \cf4 ) \cf9 JXMessageObject\cf4 *\cf11 shakeMsg\cf4 ;\
  481. \
  482. \f2\b \cf8 @property
  483. \f0\b0 \cf4 (
  484. \f2\b \cf8 nonatomic
  485. \f0\b0 \cf4 ,
  486. \f2\b \cf8 strong
  487. \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 screenShotView\cf4 ;\
  488. \f2\b \cf8 @property
  489. \f0\b0 \cf4 (
  490. \f2\b \cf8 nonatomic
  491. \f0\b0 \cf4 ,
  492. \f2\b \cf8 strong
  493. \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 screenShotImageView\cf4 ;\
  494. \
  495. \f2\b \cf8 @property
  496. \f0\b0 \cf4 (
  497. \f2\b \cf8 nonatomic
  498. \f0\b0 \cf4 ,
  499. \f2\b \cf8 strong
  500. \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 backGroundImageView\cf4 ;\
  501. \
  502. \f2\b \cf8 @property
  503. \f0\b0 \cf4 (
  504. \f2\b \cf8 nonatomic
  505. \f0\b0 \cf4 ,
  506. \f2\b \cf8 assign
  507. \f0\b0 \cf4 )
  508. \f2\b \cf8 BOOL
  509. \f0\b0 \cf4 \cf11 isSelectMore\cf4 ;\
  510. \f2\b \cf8 @property
  511. \f0\b0 \cf4 (
  512. \f2\b \cf8 nonatomic
  513. \f0\b0 \cf4 ,
  514. \f2\b \cf8 strong
  515. \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 selectMoreArr\cf4 ;\
  516. \f2\b \cf8 @property
  517. \f0\b0 \cf4 (
  518. \f2\b \cf8 nonatomic
  519. \f0\b0 \cf4 ,
  520. \f2\b \cf8 strong
  521. \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 selectMoreView\cf4 ;\
  522. \
  523. \f2\b \cf8 @property
  524. \f0\b0 \cf4 (
  525. \f2\b \cf8 nonatomic
  526. \f0\b0 \cf4 ,
  527. \f2\b \cf8 assign
  528. \f0\b0 \cf4 )
  529. \f2\b \cf8 int
  530. \f0\b0 \cf4 \cf11 readDelNum\cf4 ;\
  531. \
  532. \f2\b \cf8 @property
  533. \f0\b0 \cf4 (
  534. \f2\b \cf8 nonatomic
  535. \f0\b0 \cf4 ,
  536. \f2\b \cf8 assign
  537. \f0\b0 \cf4 )
  538. \f2\b \cf8 BOOL
  539. \f0\b0 \cf4 \cf11 isAdmin\cf4 ;\
  540. \
  541. \f2\b \cf8 @property
  542. \f0\b0 \cf4 (
  543. \f2\b \cf8 nonatomic
  544. \f0\b0 \cf4 ,
  545. \f2\b \cf8 strong
  546. \f0\b0 \cf4 ) \cf10 UIButton\cf4 *\cf11 shareMore\cf4 ;\
  547. \f2\b \cf8 @property
  548. \f0\b0 \cf4 (
  549. \f2\b \cf8 nonatomic
  550. \f0\b0 \cf4 ,
  551. \f2\b \cf8 strong
  552. \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 talkTimeLabel\cf4 ;\
  553. \
  554. \f2\b \cf8 @property
  555. \f0\b0 \cf4 (
  556. \f2\b \cf8 nonatomic
  557. \f0\b0 \cf4 ,
  558. \f2\b \cf8 strong
  559. \f0\b0 \cf4 ) \cf10 UIButton\cf4 *\cf11 jumpNewMsgBtn\cf4 ;\
  560. \
  561. \f2\b \cf8 @property
  562. \f0\b0 \cf4 (
  563. \f2\b \cf8 nonatomic
  564. \f0\b0 \cf4 ,
  565. \f2\b \cf8 strong
  566. \f0\b0 \cf4 ) \cf9 WeiboData\cf4 *\cf11 collectionData\cf4 ;\
  567. \
  568. \f2\b \cf8 @property
  569. \f0\b0 \cf4 (
  570. \f2\b \cf8 nonatomic
  571. \f0\b0 \cf4 ,
  572. \f2\b \cf8 strong
  573. \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 taskList\cf4 ; \cf2 //
  574. \f1 \'c8\'ce\'ce\'f1\'c1\'d0\'b1\'ed
  575. \f0 \cf4 \
  576. \
  577. \f2\b \cf8 @property
  578. \f0\b0 \cf4 (
  579. \f2\b \cf8 nonatomic
  580. \f0\b0 \cf4 ,
  581. \f2\b \cf8 strong
  582. \f0\b0 \cf4 ) \cf10 NSArray\cf4 *\cf11 imgDataArr\cf4 ;\
  583. \
  584. \f2\b \cf8 @property
  585. \f0\b0 \cf4 (
  586. \f2\b \cf8 nonatomic
  587. \f0\b0 \cf4 ,
  588. \f2\b \cf8 assign
  589. \f0\b0 \cf4 )
  590. \f2\b \cf8 int
  591. \f0\b0 \cf4 \cf11 indexNum\cf4 ; \cf2 //
  592. \f1 \'cf\'fb\'cf\'a2\'d6\'d8\'b7\'a2\'b4\'ab\'c0\'b4\'b5\'c4
  593. \f0 cell.tag\cf4 \
  594. \
  595. \f2\b \cf8 @property
  596. \f0\b0 \cf4 (
  597. \f2\b \cf8 nonatomic
  598. \f0\b0 \cf4 ,
  599. \f2\b \cf8 strong
  600. \f0\b0 \cf4 ) \cf10 NSDictionary\cf4 *\cf11 dataDict\cf4 ;\
  601. \f2\b \cf8 @property
  602. \f0\b0 \cf4 (
  603. \f2\b \cf8 nonatomic
  604. \f0\b0 \cf4 ,
  605. \f2\b \cf8 assign
  606. \f0\b0 \cf4 )
  607. \f2\b \cf8 BOOL
  608. \f0\b0 \cf4 \cf11 isMapMsg\cf4 ; \cf2 //
  609. \f1 \'b7\'a2\'cb\'cd\'b5\'c4\'ca\'c7\'b2\'bb\'ca\'c7\'b5\'d8\'cd\'bc\'cf\'fb\'cf\'a2
  610. \f0 \cf4 \
  611. \f2\b \cf8 @property
  612. \f0\b0 \cf4 (
  613. \f2\b \cf8 nonatomic
  614. \f0\b0 \cf4 ,
  615. \f2\b \cf8 strong
  616. \f0\b0 \cf4 ) \cf9 JXMapData\cf4 *\cf11 mapData\cf4 ;\
  617. \
  618. \f2\b \cf8 @property
  619. \f0\b0 \cf4 (
  620. \f2\b \cf8 nonatomic
  621. \f0\b0 \cf4 ,
  622. \f2\b \cf8 strong
  623. \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 objToMsg\cf4 ;\cf2 //
  624. \f1 \'bb\'d8\'b8\'b4\'cb\'ad\'b5\'c4\'cf\'fb\'cf\'a2\'a3\'ac\'b4\'e6
  625. \f0 json
  626. \f1 \'ca\'fd\'be\'dd
  627. \f0 \cf4 \
  628. \f2\b \cf8 @property
  629. \f0\b0 \cf4 (
  630. \f2\b \cf8 nonatomic
  631. \f0\b0 \cf4 ,
  632. \f2\b \cf8 strong
  633. \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 hisReplyMsg\cf4 ; \cf2 //
  634. \f1 \'bb\'d8\'b8\'b4\'c0\'fa\'ca\'b7\'cb\'ae\'d3\'a1
  635. \f0 \cf4 \
  636. \
  637. \f2\b \cf8 @property
  638. \f0\b0 \cf4 (
  639. \f2\b \cf8 nonatomic
  640. \f0\b0 \cf4 ,
  641. \f2\b \cf8 copy
  642. \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 meetUrl\cf4 ;\
  643. \
  644. \f2\b \cf8 @property
  645. \f0\b0 \cf4 (
  646. \f2\b \cf8 nonatomic
  647. \f0\b0 \cf4 ,
  648. \f2\b \cf8 strong
  649. \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 shareView\cf4 ;\
  650. \
  651. \f2\b \cf8 @property
  652. \f0\b0 \cf4 (
  653. \f2\b \cf8 nonatomic
  654. \f0\b0 \cf4 ,
  655. \f2\b \cf8 strong
  656. \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 noticeView\cf4 ;\
  657. \f2\b \cf8 @property
  658. \f0\b0 \cf4 (
  659. \f2\b \cf8 nonatomic
  660. \f0\b0 \cf4 ,
  661. \f2\b \cf8 strong
  662. \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 noticeImgV\cf4 ;\
  663. \f2\b \cf8 @property
  664. \f0\b0 \cf4 (
  665. \f2\b \cf8 nonatomic
  666. \f0\b0 \cf4 ,
  667. \f2\b \cf8 strong
  668. \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 noticeLabel\cf4 ;\
  669. \f2\b \cf8 @property
  670. \f0\b0 \cf4 (
  671. \f2\b \cf8 nonatomic
  672. \f0\b0 \cf4 ,
  673. \f2\b \cf8 strong
  674. \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 showNoticeView\cf4 ;\
  675. \f2\b \cf8 @property
  676. \f0\b0 \cf4 (
  677. \f2\b \cf8 nonatomic
  678. \f0\b0 \cf4 ,
  679. \f2\b \cf8 strong
  680. \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 leftLabel\cf4 ;\
  681. \f2\b \cf8 @property
  682. \f0\b0 \cf4 (
  683. \f2\b \cf8 nonatomic
  684. \f0\b0 \cf4 ,
  685. \f2\b \cf8 strong
  686. \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 rightLabel\cf4 ;\
  687. \f2\b \cf8 @property
  688. \f0\b0 \cf4 (
  689. \f2\b \cf8 nonatomic
  690. \f0\b0 \cf4 ,
  691. \f2\b \cf8 strong
  692. \f0\b0 \cf4 ) \cf10 NSTimer\cf4 *\cf11 noticeTimer\cf4 ;\
  693. \f2\b \cf8 @property
  694. \f0\b0 \cf4 (
  695. \f2\b \cf8 nonatomic
  696. \f0\b0 \cf4 ,
  697. \f2\b \cf8 strong
  698. \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 noticeStr\cf4 ;\
  699. \f2\b \cf8 @property
  700. \f0\b0 \cf4 (
  701. \f2\b \cf8 nonatomic
  702. \f0\b0 \cf4 ,
  703. \f2\b \cf8 assign
  704. \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 leftW\cf4 ;\
  705. \f2\b \cf8 @property
  706. \f0\b0 \cf4 (
  707. \f2\b \cf8 nonatomic
  708. \f0\b0 \cf4 ,
  709. \f2\b \cf8 assign
  710. \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 rightW\cf4 ;\
  711. \f2\b \cf8 @property
  712. \f0\b0 \cf4 (
  713. \f2\b \cf8 nonatomic
  714. \f0\b0 \cf4 ,
  715. \f2\b \cf8 assign
  716. \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 noticeStrW\cf4 ;\
  717. \f2\b \cf8 @property
  718. \f0\b0 \cf4 (
  719. \f2\b \cf8 nonatomic
  720. \f0\b0 \cf4 ,
  721. \f2\b \cf8 assign
  722. \f0\b0 \cf4 )
  723. \f2\b \cf8 int
  724. \f0\b0 \cf4 \cf11 noticeHeight\cf4 ;\
  725. \f2\b \cf8 @property
  726. \f0\b0 \cf4 (
  727. \f2\b \cf8 nonatomic
  728. \f0\b0 \cf4 ,
  729. \f2\b \cf8 strong
  730. \f0\b0 \cf4 ) \cf10 UIButton\cf4 *\cf11 textViewBtn\cf4 ;\
  731. \
  732. \f2\b \cf8 @property
  733. \f0\b0 \cf4 (
  734. \f2\b \cf8 nonatomic
  735. \f0\b0 \cf4 ,
  736. \f2\b \cf8 strong
  737. \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 noticeView2\cf4 ;\
  738. \f2\b \cf8 @property
  739. \f0\b0 \cf4 (
  740. \f2\b \cf8 nonatomic
  741. \f0\b0 \cf4 ,
  742. \f2\b \cf8 strong
  743. \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 noticeImgV2\cf4 ;\
  744. \f2\b \cf8 @property
  745. \f0\b0 \cf4 (
  746. \f2\b \cf8 nonatomic
  747. \f0\b0 \cf4 ,
  748. \f2\b \cf8 strong
  749. \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 noticeLabel2\cf4 ;\
  750. \f2\b \cf8 @property
  751. \f0\b0 \cf4 (
  752. \f2\b \cf8 nonatomic
  753. \f0\b0 \cf4 ,
  754. \f2\b \cf8 strong
  755. \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 showNoticeView2\cf4 ;\
  756. \f2\b \cf8 @property
  757. \f0\b0 \cf4 (
  758. \f2\b \cf8 nonatomic
  759. \f0\b0 \cf4 ,
  760. \f2\b \cf8 strong
  761. \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 leftLabel2\cf4 ;\
  762. \f2\b \cf8 @property
  763. \f0\b0 \cf4 (
  764. \f2\b \cf8 nonatomic
  765. \f0\b0 \cf4 ,
  766. \f2\b \cf8 strong
  767. \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 rightLabel2\cf4 ;\
  768. \f2\b \cf8 @property
  769. \f0\b0 \cf4 (
  770. \f2\b \cf8 nonatomic
  771. \f0\b0 \cf4 ,
  772. \f2\b \cf8 strong
  773. \f0\b0 \cf4 ) \cf10 NSTimer\cf4 *\cf11 noticeTimer2\cf4 ;\
  774. \f2\b \cf8 @property
  775. \f0\b0 \cf4 (
  776. \f2\b \cf8 nonatomic
  777. \f0\b0 \cf4 ,
  778. \f2\b \cf8 strong
  779. \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 noticeStr2\cf4 ;\
  780. \f2\b \cf8 @property
  781. \f0\b0 \cf4 (
  782. \f2\b \cf8 nonatomic
  783. \f0\b0 \cf4 ,
  784. \f2\b \cf8 assign
  785. \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 leftW2\cf4 ;\
  786. \f2\b \cf8 @property
  787. \f0\b0 \cf4 (
  788. \f2\b \cf8 nonatomic
  789. \f0\b0 \cf4 ,
  790. \f2\b \cf8 assign
  791. \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 rightW2\cf4 ;\
  792. \f2\b \cf8 @property
  793. \f0\b0 \cf4 (
  794. \f2\b \cf8 nonatomic
  795. \f0\b0 \cf4 ,
  796. \f2\b \cf8 assign
  797. \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 noticeStrW2\cf4 ;\
  798. \f2\b \cf8 @property
  799. \f0\b0 \cf4 (
  800. \f2\b \cf8 nonatomic
  801. \f0\b0 \cf4 ,
  802. \f2\b \cf8 assign
  803. \f0\b0 \cf4 )
  804. \f2\b \cf8 int
  805. \f0\b0 \cf4 \cf11 noticeHeight2\cf4 ;\
  806. \
  807. \f2\b \cf8 @property
  808. \f0\b0 \cf4 (
  809. \f2\b \cf8 nonatomic
  810. \f0\b0 \cf4 ,
  811. \f2\b \cf8 assign
  812. \f0\b0 \cf4 )
  813. \f2\b \cf8 BOOL
  814. \f0\b0 \cf4 \cf11 scrollBottom\cf4 ;\
  815. \f2\b \cf8 @property
  816. \f0\b0 \cf4 (
  817. \f2\b \cf8 nonatomic
  818. \f0\b0 \cf4 ,
  819. \f2\b \cf8 assign
  820. \f0\b0 \cf4 )
  821. \f2\b \cf8 BOOL
  822. \f0\b0 \cf4 \cf11 isGotoLast\cf4 ;\
  823. \f2\b \cf8 @property
  824. \f0\b0 \cf4 (
  825. \f2\b \cf8 nonatomic
  826. \f0\b0 \cf4 ,
  827. \f2\b \cf8 assign
  828. \f0\b0 \cf4 )
  829. \f2\b \cf8 BOOL
  830. \f0\b0 \cf4 \cf11 isSyncMsg\cf4 ;\
  831. \
  832. \f2\b \cf8 @property
  833. \f0\b0 \cf4 (
  834. \f2\b \cf8 nonatomic
  835. \f0\b0 \cf4 ,
  836. \f2\b \cf8 assign
  837. \f0\b0 \cf4 )
  838. \f2\b \cf8 BOOL
  839. \f0\b0 \cf4 \cf11 isFirst\cf4 ; \cf2 //
  840. \f1 \'b5\'da\'d2\'bb\'b4\'ce\'b5\'f7\'d3\'c3
  841. \f0 GetRoom\cf4 \
  842. \f2\b \cf8 @property
  843. \f0\b0 \cf4 (
  844. \f2\b \cf8 nonatomic
  845. \f0\b0 \cf4 ,
  846. \f2\b \cf8 assign
  847. \f0\b0 \cf4 )
  848. \f2\b \cf8 BOOL
  849. \f0\b0 \cf4 \cf11 isDisable\cf4 ; \cf2 //
  850. \f1 \'c8\'ba\'d7\'e9\'ca\'c7\'b7\'f1\'bd\'fb\'d3\'c3
  851. \f0 \cf4 \
  852. \f2\b \cf8 @property
  853. \f0\b0 \cf4 (
  854. \f2\b \cf8 nonatomic
  855. \f0\b0 \cf4 ,
  856. \f2\b \cf8 strong
  857. \f0\b0 \cf4 ) \cf10 UIImage\cf4 *\cf11 screenImage\cf4 ; \cf2 //
  858. \f1 \'bc\'c7\'c2\'bc\'d2\'bb\'cf\'c2\'c6\'c1\'c4\'bb\'bf\'ec\'d5\'d5
  859. \f0 \cf4 \
  860. \
  861. \f2\b \cf8 @property
  862. \f0\b0 \cf4 (
  863. \f2\b \cf8 nonatomic
  864. \f0\b0 \cf4 ,
  865. \f2\b \cf8 strong
  866. \f0\b0 \cf4 ) \cf10 NSArray\cf4 *\cf11 helperArr\cf4 ;\cf2 //
  867. \f1 \'c8\'ba\'d6\'fa\'ca\'d6\'ca\'fd\'be\'dd
  868. \f0 \cf4 \
  869. \
  870. \cf2 //
  871. \f1 \'ba\'ec\'b0\'fc\'b5\'e3\'bb\'f7\'ba\'f3\'b5\'c4\'bd\'e7\'c3\'e6
  872. \f0 \cf4 \
  873. \f2\b \cf8 @property
  874. \f0\b0 \cf4 (
  875. \f2\b \cf8 nonatomic
  876. \f0\b0 \cf4 ,
  877. \f2\b \cf8 strong
  878. \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 redBaseView\cf4 ;\
  879. \f2\b \cf8 @property
  880. \f0\b0 \cf4 (
  881. \f2\b \cf8 nonatomic
  882. \f0\b0 \cf4 ,
  883. \f2\b \cf8 strong
  884. \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 openImgV\cf4 ;\
  885. \f2\b \cf8 @property
  886. \f0\b0 \cf4 (
  887. \f2\b \cf8 nonatomic
  888. \f0\b0 \cf4 ,
  889. \f2\b \cf8 strong
  890. \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 redBackV\cf4 ;\
  891. \f2\b \cf8 @property
  892. \f0\b0 \cf4 (
  893. \f2\b \cf8 nonatomic
  894. \f0\b0 \cf4 ,
  895. \f2\b \cf8 strong
  896. \f0\b0 \cf4 ) \cf10 NSDictionary\cf4 *\cf11 redPacketDict\cf4 ;\
  897. \f2\b \cf8 @property
  898. \f0\b0 \cf4 (
  899. \f2\b \cf8 nonatomic
  900. \f0\b0 \cf4 ,
  901. \f2\b \cf8 assign
  902. \f0\b0 \cf4 )
  903. \f2\b \cf8 BOOL
  904. \f0\b0 \cf4 \cf11 isDidRedPacketRemind\cf4 ;\
  905. \f2\b \cf8 @property
  906. \f0\b0 \cf4 (
  907. \f2\b \cf8 nonatomic
  908. \f0\b0 \cf4 ,
  909. \f2\b \cf8 strong
  910. \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 tintLab\cf4 ;\
  911. \f2\b \cf8 @property
  912. \f0\b0 \cf4 (
  913. \f2\b \cf8 nonatomic
  914. \f0\b0 \cf4 ,
  915. \f2\b \cf8 strong
  916. \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 seeLab\cf4 ;\
  917. \
  918. \f2\b \cf8 @property
  919. \f0\b0 \cf4 (
  920. \f2\b \cf8 nonatomic
  921. \f0\b0 \cf4 ,
  922. \f2\b \cf8 assign
  923. \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 lastY\cf4 ;\
  924. \f2\b \cf8 @property
  925. \f0\b0 \cf4 (
  926. \f2\b \cf8 nonatomic
  927. \f0\b0 \cf4 ,
  928. \f2\b \cf8 assign
  929. \f0\b0 \cf4 )
  930. \f2\b \cf8 BOOL
  931. \f0\b0 \cf4 \cf11 isRefresh\cf4 ;\
  932. \
  933. \f2\b \cf8 @property
  934. \f0\b0 \cf4 (
  935. \f2\b \cf8 nonatomic
  936. \f0\b0 \cf4 ,
  937. \f2\b \cf8 strong
  938. \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 audioIcon\cf4 ;\
  939. \
  940. \f2\b \cf8 @property
  941. \f0\b0 \cf4 (
  942. \f2\b \cf8 nonatomic
  943. \f0\b0 \cf4 ,
  944. \f2\b \cf8 assign
  945. \f0\b0 \cf4 )
  946. \f2\b \cf8 BOOL
  947. \f0\b0 \cf4 \cf11 isShowAT\cf4 ;\
  948. \
  949. \f2\b \cf8 @property
  950. \f0\b0 \cf4 (
  951. \f2\b \cf8 nonatomic
  952. \f0\b0 \cf4 ,
  953. \f2\b \cf8 assign
  954. \f0\b0 \cf4 )
  955. \f2\b \cf8 BOOL
  956. \f0\b0 \cf4 \cf11 isSendRedPacket\cf4 ;\
  957. \
  958. \f2\b \cf8 @property
  959. \f0\b0 \cf4 (
  960. \f2\b \cf8 nonatomic
  961. \f0\b0 \cf4 ,
  962. \f2\b \cf8 assign
  963. \f0\b0 \cf4 )
  964. \f2\b \cf8 BOOL
  965. \f0\b0 \cf4 \cf11 isRefreshing\cf4 ;\
  966. \
  967. \f2\b \cf8 @property
  968. \f0\b0 \cf4 (
  969. \f2\b \cf8 nonatomic
  970. \f0\b0 \cf4 ,
  971. \f2\b \cf8 strong
  972. \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 waitGroupSendView\cf4 ; \cf2 //
  973. \f1 \'c8\'ba\'b7\'a2\'cc\'e1\'ca\'be\'b4\'b0\'bf\'da
  974. \f0 \cf4 \
  975. \f2\b \cf8 @property
  976. \f0\b0 \cf4 (
  977. \f2\b \cf8 nonatomic
  978. \f0\b0 \cf4 ,
  979. \f2\b \cf8 strong
  980. \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 waitGroupSendLable\cf4 ; \cf2 //
  981. \f1 \'c8\'ba\'b7\'a2\'ca\'b5\'ca\'b1\'b8\'fc\'d0\'c2\'d2\'d1\'b7\'a2\'cb\'cd\'ca\'fd\'c1\'bf
  982. \f0 \cf4 \
  983. \f2\b \cf8 @property
  984. \f0\b0 \cf4 (
  985. \f2\b \cf8 nonatomic
  986. \f0\b0 \cf4 ,
  987. \f2\b \cf8 assign
  988. \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 sendedNum\cf4 ; \cf2 //
  989. \f1 \'c8\'ba\'b7\'a2\'d2\'d1\'b7\'a2\'cb\'cd\'ca\'fd\'c1\'bf
  990. \f0 \cf4 \
  991. \f2\b \cf8 @property
  992. \f0\b0 \cf4 (
  993. \f2\b \cf8 nonatomic
  994. \f0\b0 \cf4 ,
  995. \f2\b \cf8 strong
  996. \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 groupUploadObjArray\cf4 ; \cf2 //
  997. \f1 \'c8\'ba\'b7\'a2\'d0\'e8\'d2\'aa\'c9\'cf\'b4\'ab\'b5\'c4\'ca\'fd\'be\'dd
  998. \f0 \cf4 \
  999. \f2\b \cf8 @property
  1000. \f0\b0 \cf4 (
  1001. \f2\b \cf8 nonatomic
  1002. \f0\b0 \cf4 ,
  1003. \f2\b \cf8 assign
  1004. \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 onceSendNum\cf4 ; \cf2 //
  1005. \f1 \'c8\'ba\'b7\'a2\'c3\'bf\'d7\'e9\'b7\'a2\'cb\'cd\'b5\'c4\'cf\'fb\'cf\'a2\'ca\'fd\'c1\'bf
  1006. \f0 \cf4 \
  1007. \f2\b \cf8 @property
  1008. \f0\b0 \cf4 (
  1009. \f2\b \cf8 nonatomic
  1010. \f0\b0 \cf4 ,
  1011. \f2\b \cf8 assign
  1012. \f0\b0 \cf4 )
  1013. \f2\b \cf8 BOOL
  1014. \f0\b0 \cf4 \cf11 isOriginal\cf4 ; \cf2 //
  1015. \f1 \'ca\'c7\'b7\'f1\'b1\'a3\'b4\'e6\'b1\'be\'b5\'d8
  1016. \f0 \cf4 \
  1017. \f2\b \cf8 @property
  1018. \f0\b0 \cf4 (
  1019. \f2\b \cf8 nonatomic
  1020. \f0\b0 \cf4 ,
  1021. \f2\b \cf8 assign
  1022. \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 groupSendType\cf4 ; \cf2 //
  1023. \f1 \'c8\'ba\'b7\'a2\'cf\'fb\'cf\'a2\'c0\'e0\'d0\'cd
  1024. \f0 \cf4 \
  1025. \f2\b \cf8 @property
  1026. \f0\b0 \cf4 (
  1027. \f2\b \cf8 nonatomic
  1028. \f0\b0 \cf4 ,
  1029. \f2\b \cf8 strong
  1030. \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 groupSendMsgArray\cf4 ; \cf2 //
  1031. \f1 \'c8\'ba\'b7\'a2\'b5\'c4\'c4\'da\'c8\'dd
  1032. \f0 \cf4 \
  1033. \f2\b \cf8 @property
  1034. \f0\b0 \cf4 (
  1035. \f2\b \cf8 nonatomic
  1036. \f0\b0 \cf4 ,
  1037. \f2\b \cf8 assign
  1038. \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 groupSendAllNum\cf4 ; \cf2 //
  1039. \f1 \'c8\'ba\'b7\'a2\'cf\'fb\'cf\'a2\'d7\'dc\'ca\'fd
  1040. \f0 \cf4 \
  1041. \f2\b \cf8 @property
  1042. \f0\b0 \cf4 (
  1043. \f2\b \cf8 nonatomic
  1044. \f0\b0 \cf4 ,
  1045. \f2\b \cf8 assign
  1046. \f0\b0 \cf4 )
  1047. \f2\b \cf8 BOOL
  1048. \f0\b0 \cf4 \cf11 isGroupSendCancel\cf4 ; \cf2 //
  1049. \f1 \'c8\'a1\'cf\'fb\'c8\'ba\'b7\'a2
  1050. \f0 \cf4 \
  1051. \f2\b \cf8 @property
  1052. \f0\b0 \cf4 (
  1053. \f2\b \cf8 nonatomic
  1054. \f0\b0 \cf4 ,
  1055. \f2\b \cf8 strong
  1056. \f0\b0 \cf4 ) \cf10 NSDictionary\cf4 *\cf11 imgsAndVideosDic\cf4 ;\cf2 //
  1057. \f1 \'c8\'ba\'b7\'a2\'cd\'bc\'b2\'e1\'d1\'a1\'d6\'d0\'b5\'c4\'cd\'bc\'c6\'ac\'ba\'cd\'ca\'d3\'c6\'b5
  1058. \f0 \cf4 \
  1059. \f2\b \cf8 @property
  1060. \f0\b0 \cf4 (
  1061. \f2\b \cf8 nonatomic
  1062. \f0\b0 \cf4 ,
  1063. \f2\b \cf8 strong
  1064. \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 imgArr\cf4 ;\
  1065. \f2\b \cf8 @property
  1066. \f0\b0 \cf4 (
  1067. \f2\b \cf8 nonatomic
  1068. \f0\b0 \cf4 ,
  1069. \f2\b \cf8 strong
  1070. \f0\b0 \cf4 ) \cf10 UIButton\cf4 *\cf11 showBtn\cf4 ;\
  1071. \f2\b \cf8 @property
  1072. \f0\b0 \cf4 (
  1073. \f2\b \cf8 nonatomic
  1074. \f0\b0 \cf4 ,
  1075. \f2\b \cf8 strong
  1076. \f0\b0 \cf4 ) \cf9 STAlertView\cf4 *\cf11 alert\cf4 ;\
  1077. \f2\b \cf8 @property
  1078. \f0\b0 \cf4 (
  1079. \f2\b \cf8 nonatomic
  1080. \f0\b0 \cf4 ,
  1081. \f2\b \cf8 strong
  1082. \f0\b0 \cf4 ) \cf9 MISFloatingBall\cf4 *\cf11 floating\cf4 ;\
  1083. \f2\b \cf8 @property
  1084. \f0\b0 \cf4 (
  1085. \f2\b \cf8 nonatomic
  1086. \f0\b0 \cf4 ,
  1087. \f2\b \cf8 weak
  1088. \f0\b0 \cf4 ) \cf9 JXtopShowVIew\cf4 *\cf11 showTopView\cf4 ;\
  1089. \f2\b \cf8 @property
  1090. \f0\b0 \cf4 (
  1091. \f2\b \cf8 nonatomic
  1092. \f0\b0 \cf4 ,
  1093. \f2\b \cf8 strong
  1094. \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 dataArrGetGroundPersonArr\cf4 ;\
  1095. \
  1096. \f2\b \cf8 @property
  1097. \f0\b0 \cf4 (
  1098. \f2\b \cf8 nonatomic
  1099. \f0\b0 \cf4 ,
  1100. \f2\b \cf8 strong
  1101. \f0\b0 \cf4 ) \cf10 UIScrollView\cf4 *\cf11 dataArr\cf4 ;\
  1102. \
  1103. \f2\b \cf8 @property
  1104. \f0\b0 \cf4 (
  1105. \f2\b \cf8 nonatomic
  1106. \f0\b0 \cf4 ,
  1107. \f2\b \cf8 strong
  1108. \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 tempArrMM\cf4 ;\
  1109. \cf12 /**
  1110. \f1 \cf2 \'c3\'bb\'d3\'d0\'b2\'ca\'c7\'f2\'b5\'c4\'cc\'d8\'b1\'f0\'b9\'d8\'d0\'c4
  1111. \f3 */
  1112. \f0 \cf4 \
  1113. \f2\b \cf8 @property
  1114. \f0\b0 \cf4 (
  1115. \f2\b \cf8 nonatomic
  1116. \f0\b0 \cf4 ,
  1117. \f2\b \cf8 strong
  1118. \f0\b0 \cf4 ) \cf10 UIScrollView\cf4 *\cf11 noticeViewScrollView\cf4 ;\
  1119. \f2\b \cf8 @property
  1120. \f0\b0 \cf4 (
  1121. \f2\b \cf8 nonatomic
  1122. \f0\b0 \cf4 ,
  1123. \f2\b \cf8 strong
  1124. \f0\b0 \cf4 ) \cf10 UIButton\cf4 *\cf11 attioPersonBtn\cf4 ;\
  1125. \f2\b \cf8 @property
  1126. \f0\b0 \cf4 (
  1127. \f2\b \cf8 nonatomic
  1128. \f0\b0 \cf4 ,
  1129. \f2\b \cf8 weak
  1130. \f0\b0 \cf4 ) \cf9 DYAdAlertView\cf4 *\cf11 showLongViewc\cf4 ;\
  1131. \
  1132. \f2\b \cf8 @property
  1133. \f0\b0 \cf4 (
  1134. \f2\b \cf8 nonatomic
  1135. \f0\b0 \cf4 ,
  1136. \f2\b \cf8 copy
  1137. \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 strURLGoback\cf4 ;\
  1138. \f2\b \cf8 @end
  1139. \f0\b0 \cf4 \
  1140. \
  1141. \f2\b \cf8 @implementation
  1142. \f0\b0 \cf4 \cf13 JXChatViewC\cf4 \
  1143. \f2\b \cf8 @synthesize
  1144. \f0\b0 \cf4 \cf11 chatPerson\cf4 ,\cf11 roomId\cf4 ,\cf11 chatRoom\cf4 ;\
  1145. \
  1146. - (
  1147. \f2\b \cf8 id
  1148. \f0\b0 \cf4 )\cf11 init\cf4 \
  1149. \{\
  1150. \f2\b \cf8 self
  1151. \f0\b0 \cf4 = [
  1152. \f2\b \cf8 super
  1153. \f0\b0 \cf4 \cf14 init\cf4 ];\
  1154. \f2\b \cf8 if
  1155. \f0\b0 \cf4 (
  1156. \f2\b \cf8 self
  1157. \f0\b0 \cf4 ) \{\
  1158. \f2\b \cf8 if
  1159. \f0\b0 \cf4 (!\cf15 _room\cf4 ) \{\
  1160. \cf15 _room\cf4 = [[\cf9 roomData\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
  1161. \}\
  1162. \cf15 _dataArrGetGroundPersonArr\cf4 =[\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
  1163. \cf15 _userNickName\cf4 = \cf5 g_myself\cf4 .\cf15 userNickname\cf4 ;\
  1164. \
  1165. \cf15 _strURLGoback\cf4 =\cf6 @"1000"\cf4 ;\
  1166. \cf15 _tempArrMM\cf4 =[\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
  1167. \
  1168. \f2\b \cf8 self
  1169. \f0\b0 \cf4 .\cf15 heightHeader\cf4 = \cf5 JX_SCREEN_TOP\cf4 ;\
  1170. \f2\b \cf8 self
  1171. \f0\b0 \cf4 .\cf15 heightFooter\cf4 = \cf7 48\cf4 ;\
  1172. \f2\b \cf8 if
  1173. \f0\b0 \cf4 (
  1174. \f2\b \cf8 self
  1175. \f0\b0 \cf4 .\cf15 courseId\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  1176. \f2\b \cf8 self
  1177. \f0\b0 \cf4 .\cf15 heightFooter\cf4 = \cf5 THE_DEVICE_HAVE_HEAD\cf4 ? \cf5 JX_SCREEN_BOTTOM\cf4 : \cf7 56\cf4 ;\
  1178. \}\
  1179. \f2\b \cf8 if
  1180. \f0\b0 \cf4 (
  1181. \f2\b \cf8 self
  1182. \f0\b0 \cf4 .\cf15 isHiddenFooter\cf4 ) \{\
  1183. \f2\b \cf8 self
  1184. \f0\b0 \cf4 .\cf15 heightFooter\cf4 = \cf7 0\cf4 ;\
  1185. \}\
  1186. \f2\b \cf8 self
  1187. \f0\b0 \cf4 .\cf15 isGotoBack\cf4 =
  1188. \f2\b \cf8 YES
  1189. \f0\b0 \cf4 ;\
  1190. \f2\b \cf8 self
  1191. \f0\b0 \cf4 .\cf15 isGotoLast\cf4 =
  1192. \f2\b \cf8 YES
  1193. \f0\b0 \cf4 ;\
  1194. \cf15 _orderRedPacketArray\cf4 = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
  1195. \cf15 _atMemberArray\cf4 = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
  1196. \cf15 _selectMoreArr\cf4 = [\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
  1197. \f2\b \cf8 if
  1198. \f0\b0 \cf4 (
  1199. \f2\b \cf8 self
  1200. \f0\b0 \cf4 .\cf15 roomJid\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  1201. \cf15 _taskList\cf4 = [\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
  1202. \cf10 NSMutableArray\cf4 *list = [[\cf9 JXSynTask\cf4 \cf15 sharedInstance\cf4 ] \cf15 getTaskWithUserId\cf4 :
  1203. \f2\b \cf8 self
  1204. \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\
  1205. \f2\b \cf8 for
  1206. \f0\b0 \cf4 (\cf10 NSInteger\cf4 i = \cf7 0\cf4 ; i < list.\cf14 count\cf4 ; i ++) \{\
  1207. \cf9 JXSynTask\cf4 *task = list[i];\
  1208. \f2\b \cf8 if
  1209. \f0\b0 \cf4 (task.\cf15 endTime\cf4 ) \{\
  1210. [\cf15 _taskList\cf4 \cf14 addObject\cf4 :task];\
  1211. \}
  1212. \f2\b \cf8 else
  1213. \f0\b0 \cf4 \{\
  1214. [task
  1215. \f2\b \cf8 delete
  1216. \f0\b0 \cf4 ];\
  1217. \}\
  1218. \}\
  1219. \
  1220. \}\
  1221. \f2\b \cf8 if
  1222. \f0\b0 \cf4 (
  1223. \f2\b \cf8 self
  1224. \f0\b0 \cf4 .\cf15 newMsgCount\cf4 > \cf7 100\cf4 ) \{\
  1225. \f2\b \cf8 self
  1226. \f0\b0 \cf4 .\cf15 newMsgCount\cf4 = \cf7 100\cf4 ;\
  1227. \}\
  1228. \cf2 //self.view.frame = CGRectMake(0, 0, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT);\cf4 \
  1229. \f2\b \cf8 self
  1230. \f0\b0 \cf4 .\cf15 groupMessagesIndex\cf4 = \cf7 0\cf4 ;\
  1231. \cf15 _disableSay\cf4 = \cf7 0\cf4 ;\
  1232. \cf15 _serverMsgPage\cf4 = \cf7 0\cf4 ;\
  1233. \cf15 _isRecording\cf4 =
  1234. \f2\b \cf8 NO
  1235. \f0\b0 \cf4 ;\
  1236. \cf15 _recordStarNum\cf4 = \cf7 0\cf4 ;\
  1237. \
  1238. \cf15 _pool\cf4 = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
  1239. \cf15 _array\cf4 = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
  1240. \
  1241. \cf15 _isReadDelete\cf4 = [
  1242. \f2\b \cf8 self
  1243. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 isOpenReadDel\cf4 \cf14 boolValue\cf4 ];\
  1244. \
  1245. \cf15 _recordArray\cf4 = [\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
  1246. \cf15 _chatWait\cf4 = [[\cf9 ATMHud\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
  1247. \
  1248. \f2\b \cf8 if
  1249. \f0\b0 \cf4 (\cf15 current_chat_userId\cf4 )\
  1250. [\cf5 g_xmpp\cf4 .\cf15 chatingUserIds\cf4 \cf14 addObject\cf4 :\cf15 current_chat_userId\cf4 ];\
  1251. \
  1252. \}\
  1253. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1254. \f2\b \cf8 self
  1255. \f0\b0 \cf4 \cf14 selector\cf4 :
  1256. \f2\b \cf8 @selector
  1257. \f0\b0 \cf4 (roomGroupActivityRefresh:) \cf14 name\cf4 :\cf5 kRoomGroupActivityRefresh\cf4 \cf14 object\cf4 :
  1258. \f2\b \cf8 nil
  1259. \f0\b0 \cf4 ]; \cf2 //
  1260. \f1 \'b7\'c0\'b3\'b7\'bb\'d8\'d0\'de\'b8\'c4
  1261. \f0 \cf4 \
  1262. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1263. \f2\b \cf8 self
  1264. \f0\b0 \cf4 \cf14 selector\cf4 :
  1265. \f2\b \cf8 @selector
  1266. \f0\b0 \cf4 (roomIsisAttritionRecall:) \cf14 name\cf4 :\cf5 kroomIsAttritionRecallRefresh\cf4 \cf14 object\cf4 :
  1267. \f2\b \cf8 nil
  1268. \f0\b0 \cf4 ]; \cf2 //
  1269. \f1 \'b7\'c0\'b3\'b7\'bb\'d8\'d0\'de\'b8\'c4
  1270. \f0 \cf4 \
  1271. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1272. \f2\b \cf8 self
  1273. \f0\b0 \cf4 \cf14 selector\cf4 :
  1274. \f2\b \cf8 @selector
  1275. \f0\b0 \cf4 (groupLevelNameRefresh:) \cf14 name\cf4 :\cf5 kgroupLevelNameRefresh\cf4 \cf14 object\cf4 :
  1276. \f2\b \cf8 nil
  1277. \f0\b0 \cf4 ]; \cf2 //
  1278. \f1 \'c8\'ba\'cd\'b7\'cf\'ce\'d0\'de\'b8\'c4
  1279. \f0 \cf4 \
  1280. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1281. \f2\b \cf8 self
  1282. \f0\b0 \cf4 \cf14 selector\cf4 :
  1283. \f2\b \cf8 @selector
  1284. \f0\b0 \cf4 (roomIsOpenIntegral:) \cf14 name\cf4 :\cf5 kisOpenIntegralRefresh\cf4 \cf14 object\cf4 :
  1285. \f2\b \cf8 nil
  1286. \f0\b0 \cf4 ]; \cf2 //
  1287. \f1 \'c8\'ba\'cd\'b7\'cf\'ce\'bf\'aa\'b9\'d8\'d0\'de\'b8\'c4
  1288. \f0 \cf4 \
  1289. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1290. \f2\b \cf8 self
  1291. \f0\b0 \cf4 \cf14 selector\cf4 :
  1292. \f2\b \cf8 @selector
  1293. \f0\b0 \cf4 (audioPlayEnd:) \cf14 name\cf4 :\cf5 kCellVoiceStartNotifaction\cf4 \cf14 object\cf4 :
  1294. \f2\b \cf8 nil
  1295. \f0\b0 \cf4 ];\cf2 //
  1296. \f1 \'bf\'aa\'ca\'bc\'c2\'bc\'d2\'f4
  1297. \f0 \cf4 \
  1298. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1299. \f2\b \cf8 self
  1300. \f0\b0 \cf4 \cf14 selector\cf4 :
  1301. \f2\b \cf8 @selector
  1302. \f0\b0 \cf4 (cardCellClick:) \cf14 name\cf4 :\cf5 kCellShowCardNotifaction\cf4 \cf14 object\cf4 :
  1303. \f2\b \cf8 nil
  1304. \f0\b0 \cf4 ];\
  1305. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1306. \f2\b \cf8 self
  1307. \f0\b0 \cf4 \cf14 selector\cf4 :
  1308. \f2\b \cf8 @selector
  1309. \f0\b0 \cf4 (locationCellClick:) \cf14 name\cf4 :\cf5 kCellLocationNotifaction\cf4 \cf14 object\cf4 :
  1310. \f2\b \cf8 nil
  1311. \f0\b0 \cf4 ];\
  1312. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1313. \f2\b \cf8 self
  1314. \f0\b0 \cf4 \cf14 selector\cf4 :
  1315. \f2\b \cf8 @selector
  1316. \f0\b0 \cf4 (onDidImage:) \cf14 name\cf4 :\cf5 kCellImageNotifaction\cf4 \cf14 object\cf4 :
  1317. \f2\b \cf8 nil
  1318. \f0\b0 \cf4 ];\cf2 //
  1319. \f1 \'d5\'d5\'c6\'ac
  1320. \f0 \cf4 \
  1321. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1322. \f2\b \cf8 self
  1323. \f0\b0 \cf4 \cf14 selector\cf4 :
  1324. \f2\b \cf8 @selector
  1325. \f0\b0 \cf4 (onDidRedPacket:) \cf14 name\cf4 :\cf5 kcellRedPacketDidTouchNotifaction\cf4 \cf14 object\cf4 :
  1326. \f2\b \cf8 nil
  1327. \f0\b0 \cf4 ];\cf2 //
  1328. \f1 \'c6\'d5\'cd\'a8\'ba\'ec\'b0\'fc\'b5\'e3\'bb\'f7
  1329. \f0 \cf4 \
  1330. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1331. \f2\b \cf8 self
  1332. \f0\b0 \cf4 \cf14 selector\cf4 :
  1333. \f2\b \cf8 @selector
  1334. \f0\b0 \cf4 (onDidTransfer:) \cf14 name\cf4 :\cf5 kcellTransferDidTouchNotifaction\cf4 \cf14 object\cf4 :
  1335. \f2\b \cf8 nil
  1336. \f0\b0 \cf4 ];\cf2 //
  1337. \f1 \'d7\'aa\'d5\'cb\'b5\'e3\'bb\'f7
  1338. \f0 \cf4 \
  1339. \cf2 // [g_notify addObserver:self selector:@selector(onDidHeadImage:) name:kCellHeadImageNotification object:nil];\cf4 \
  1340. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1341. \f2\b \cf8 self
  1342. \f0\b0 \cf4 \cf14 selector\cf4 :
  1343. \f2\b \cf8 @selector
  1344. \f0\b0 \cf4 (longGesHeadImageNotification:) \cf14 name\cf4 :\cf5 kCellLongGesHeadImageNotification\cf4 \cf14 object\cf4 :
  1345. \f2\b \cf8 nil
  1346. \f0\b0 \cf4 ];\
  1347. \
  1348. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1349. \f2\b \cf8 self
  1350. \f0\b0 \cf4 \cf14 selector\cf4 :
  1351. \f2\b \cf8 @selector
  1352. \f0\b0 \cf4 (resendMsgNotif:) \cf14 name\cf4 :\cf5 kCellResendMsgNotifaction\cf4 \cf14 object\cf4 :
  1353. \f2\b \cf8 nil
  1354. \f0\b0 \cf4 ];\cf2 //
  1355. \f1 \'d6\'d8\'b7\'a2\'cf\'fb\'cf\'a2
  1356. \f0 \cf4 \
  1357. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1358. \f2\b \cf8 self
  1359. \f0\b0 \cf4 \cf14 selector\cf4 :
  1360. \f2\b \cf8 @selector
  1361. \f0\b0 \cf4 (deleteMsgNotif:) \cf14 name\cf4 :\cf5 kCellDeleteMsgNotifaction\cf4 \cf14 object\cf4 :
  1362. \f2\b \cf8 nil
  1363. \f0\b0 \cf4 ];\cf2 //
  1364. \f1 \'c9\'be\'b3\'fd\'cf\'fb\'cf\'a2
  1365. \f0 \cf4 \
  1366. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1367. \f2\b \cf8 self
  1368. \f0\b0 \cf4 \cf14 selector\cf4 :
  1369. \f2\b \cf8 @selector
  1370. \f0\b0 \cf4 (showReadPersons:) \cf14 name\cf4 :\cf5 kCellShowReadPersonsNotifaction\cf4 \cf14 object\cf4 :
  1371. \f2\b \cf8 nil
  1372. \f0\b0 \cf4 ]; \cf2 //
  1373. \f1 \'b2\'e9\'bf\'b4\'d2\'d1\'b6\'c1\'c1\'d0\'b1\'ed
  1374. \f0 \cf4 \
  1375. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1376. \f2\b \cf8 self
  1377. \f0\b0 \cf4 \cf14 selector\cf4 :
  1378. \f2\b \cf8 @selector
  1379. \f0\b0 \cf4 (hideKeyboard:) \cf14 name\cf4 :\cf5 kHiddenKeyboardNotification\cf4 \cf14 object\cf4 :
  1380. \f2\b \cf8 nil
  1381. \f0\b0 \cf4 ];\
  1382. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1383. \f2\b \cf8 self
  1384. \f0\b0 \cf4 \cf14 selector\cf4 :
  1385. \f2\b \cf8 @selector
  1386. \f0\b0 \cf4 (onDidSystemImage1:) \cf14 name\cf4 :\cf5 kCellSystemImage1DidTouchNotifaction\cf4 \cf14 object\cf4 :
  1387. \f2\b \cf8 nil
  1388. \f0\b0 \cf4 ]; \cf2 //
  1389. \f1 \'b5\'a5\'cc\'f5\'cd\'bc\'ce\'c4\'cf\'fb\'cf\'a2\'b5\'e3\'bb\'f7
  1390. \f0 \cf4 \
  1391. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1392. \f2\b \cf8 self
  1393. \f0\b0 \cf4 \cf14 selector\cf4 :
  1394. \f2\b \cf8 @selector
  1395. \f0\b0 \cf4 (onDidSystemImage2:) \cf14 name\cf4 :\cf5 kCellSystemImage2DidTouchNotifaction\cf4 \cf14 object\cf4 :
  1396. \f2\b \cf8 nil
  1397. \f0\b0 \cf4 ]; \cf2 //
  1398. \f1 \'b6\'e0\'cc\'f5\'cd\'bc\'ce\'c4\'cf\'fb\'cf\'a2\'b5\'e3\'bb\'f7
  1399. \f0 \cf4 \
  1400. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1401. \f2\b \cf8 self
  1402. \f0\b0 \cf4 \cf14 selector\cf4 :
  1403. \f2\b \cf8 @selector
  1404. \f0\b0 \cf4 (onDidAVCall:) \cf14 name\cf4 :\cf5 kCellSystemAVCallNotifaction\cf4 \cf14 object\cf4 :
  1405. \f2\b \cf8 nil
  1406. \f0\b0 \cf4 ]; \cf2 //
  1407. \f1 \'d2\'f4\'ca\'d3\'c6\'b5\'cd\'a8\'bb\'b0
  1408. \f0 \cf4 \
  1409. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1410. \f2\b \cf8 self
  1411. \f0\b0 \cf4 \cf14 selector\cf4 :
  1412. \f2\b \cf8 @selector
  1413. \f0\b0 \cf4 (onDidFile:) \cf14 name\cf4 :\cf5 kCellSystemFileNotifaction\cf4 \cf14 object\cf4 :
  1414. \f2\b \cf8 nil
  1415. \f0\b0 \cf4 ]; \cf2 //
  1416. \f1 \'ce\'c4\'bc\'fe\'b5\'e3\'bb\'f7
  1417. \f0 \cf4 \
  1418. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1419. \f2\b \cf8 self
  1420. \f0\b0 \cf4 \cf14 selector\cf4 :
  1421. \f2\b \cf8 @selector
  1422. \f0\b0 \cf4 (onDidLink:) \cf14 name\cf4 :\cf5 kCellSystemLinkNotifaction\cf4 \cf14 object\cf4 :
  1423. \f2\b \cf8 nil
  1424. \f0\b0 \cf4 ]; \cf2 //
  1425. \f1 \'c1\'b4\'bd\'d3\'b5\'e3\'bb\'f7
  1426. \f0 \cf4 \
  1427. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1428. \f2\b \cf8 self
  1429. \f0\b0 \cf4 \cf14 selector\cf4 :
  1430. \f2\b \cf8 @selector
  1431. \f0\b0 \cf4 (onDidShake:) \cf14 name\cf4 :\cf5 kCellSystemShakeNotifaction\cf4 \cf14 object\cf4 :
  1432. \f2\b \cf8 nil
  1433. \f0\b0 \cf4 ]; \cf2 //
  1434. \f1 \'b4\'c1\'d2\'bb\'b4\'c1\'b5\'e3\'bb\'f7
  1435. \f0 \cf4 \
  1436. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1437. \f2\b \cf8 self
  1438. \f0\b0 \cf4 \cf14 selector\cf4 :
  1439. \f2\b \cf8 @selector
  1440. \f0\b0 \cf4 (onDidMergeRelay:) \cf14 name\cf4 :\cf5 kCellSystemMergeRelayNotifaction\cf4 \cf14 object\cf4 :
  1441. \f2\b \cf8 nil
  1442. \f0\b0 \cf4 ]; \cf2 //
  1443. \f1 \'ba\'cf\'b2\'a2\'d7\'aa\'b7\'a2\'b5\'e3\'bb\'f7
  1444. \f0 \cf4 \
  1445. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1446. \f2\b \cf8 self
  1447. \f0\b0 \cf4 \cf14 selector\cf4 :
  1448. \f2\b \cf8 @selector
  1449. \f0\b0 \cf4 (onDidShare:) \cf14 name\cf4 :\cf5 kCellShareNotification\cf4 \cf14 object\cf4 :
  1450. \f2\b \cf8 nil
  1451. \f0\b0 \cf4 ]; \cf2 //
  1452. \f1 \'b7\'d6\'cf\'ed
  1453. \f0 cell
  1454. \f1 \'b5\'e3\'bb\'f7
  1455. \f0 \cf4 \
  1456. \
  1457. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1458. \f2\b \cf8 self
  1459. \f0\b0 \cf4 \cf14 selector\cf4 :
  1460. \f2\b \cf8 @selector
  1461. \f0\b0 \cf4 (onDidRemind:) \cf14 name\cf4 :\cf5 kCellRemindNotifaction\cf4 \cf14 object\cf4 :
  1462. \f2\b \cf8 nil
  1463. \f0\b0 \cf4 ]; \cf2 //
  1464. \f1 \'bf\'d8\'d6\'c6\'cf\'fb\'cf\'a2\'b5\'e3\'bb\'f7
  1465. \f0 \cf4 \
  1466. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1467. \f2\b \cf8 self
  1468. \f0\b0 \cf4 \cf14 selector\cf4 :
  1469. \f2\b \cf8 @selector
  1470. \f0\b0 \cf4 (onDidReply:) \cf14 name\cf4 :\cf5 kCellReplyNotifaction\cf4 \cf14 object\cf4 :
  1471. \f2\b \cf8 nil
  1472. \f0\b0 \cf4 ]; \cf2 //
  1473. \f1 \'bb\'d8\'b8\'b4\'cf\'fb\'cf\'a2\'b5\'e3\'bb\'f7
  1474. \f0 \cf4 \
  1475. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1476. \f2\b \cf8 self
  1477. \f0\b0 \cf4 \cf14 selector\cf4 :
  1478. \f2\b \cf8 @selector
  1479. \f0\b0 \cf4 (onDidMessageReadDel:) \cf14 name\cf4 :\cf5 kCellMessageReadDelNotifaction\cf4 \cf14 object\cf4 :
  1480. \f2\b \cf8 nil
  1481. \f0\b0 \cf4 ]; \cf2 //
  1482. \f1 \'ce\'c4\'b1\'be\'cf\'fb\'cf\'a2\'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9\'b5\'e3\'bb\'f7
  1483. \f0 \cf4 \
  1484. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1485. \f2\b \cf8 self
  1486. \f0\b0 \cf4 \cf14 selector\cf4 :
  1487. \f2\b \cf8 @selector
  1488. \f0\b0 \cf4 (openReadDelNotif:) \cf14 name\cf4 :\cf5 kOpenReadDelNotif\cf4 \cf14 object\cf4 :
  1489. \f2\b \cf8 nil
  1490. \f0\b0 \cf4 ]; \cf2 //
  1491. \f1 \'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9\'bf\'aa\'b9\'d8
  1492. \f0 \cf4 \
  1493. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1494. \f2\b \cf8 self
  1495. \f0\b0 \cf4 \cf14 selector\cf4 :
  1496. \f2\b \cf8 @selector
  1497. \f0\b0 \cf4 (refreshChatLogNotif:) \cf14 name\cf4 :\cf5 kRefreshChatLogNotif\cf4 \cf14 object\cf4 :
  1498. \f2\b \cf8 nil
  1499. \f0\b0 \cf4 ];\
  1500. \
  1501. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1502. \f2\b \cf8 self
  1503. \f0\b0 \cf4 \cf14 selector\cf4 :
  1504. \f2\b \cf8 @selector
  1505. \f0\b0 \cf4 (reloadNotif:) \cf14 name\cf4 :\cf5 kChatVCReloadNotif\cf4 \cf14 object\cf4 :
  1506. \f2\b \cf8 nil
  1507. \f0\b0 \cf4 ];\
  1508. \
  1509. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1510. \f2\b \cf8 self
  1511. \f0\b0 \cf4 \cf14 selector\cf4 :
  1512. \f2\b \cf8 @selector
  1513. \f0\b0 \cf4 (onLoginChanged:) \cf14 name\cf4 :\cf5 kXmppLoginNotifaction\cf4 \cf14 object\cf4 :
  1514. \f2\b \cf8 nil
  1515. \f0\b0 \cf4 ];\
  1516. \cf2 //
  1517. \f1 \'bc\'e0\'cc\'fd\'cf\'b5\'cd\'b3\'bd\'d8\'c6\'c1
  1518. \f0 \cf4 \
  1519. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1520. \f2\b \cf8 self
  1521. \f0\b0 \cf4 \cf14 selector\cf4 :
  1522. \f2\b \cf8 @selector
  1523. \f0\b0 \cf4 (userDidTakeScreenshot:) \cf14 name\cf4 :\cf14 UIApplicationUserDidTakeScreenshotNotification\cf4 \cf14 object\cf4 :
  1524. \f2\b \cf8 nil
  1525. \f0\b0 \cf4 ];\
  1526. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1527. \f2\b \cf8 self
  1528. \f0\b0 \cf4 \cf14 selector\cf4 :
  1529. \f2\b \cf8 @selector
  1530. \f0\b0 \cf4 (onGroupHelper) \cf14 name\cf4 :\cf5 kUpdateChatVCGroupHelperData\cf4 \cf14 object\cf4 :
  1531. \f2\b \cf8 nil
  1532. \f0\b0 \cf4 ];\cf2 //
  1533. \f1 \'b8\'fc\'d0\'c2\'c8\'ba\'d6\'fa\'ca\'d6
  1534. \f0 \cf4 \
  1535. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1536. \f2\b \cf8 self
  1537. \f0\b0 \cf4 \cf14 selector\cf4 :
  1538. \f2\b \cf8 @selector
  1539. \f0\b0 \cf4 (updateMsgSynTaskNotif:) \cf14 name\cf4 :\cf5 kUpdateMsgSynTask\cf4 \cf14 object\cf4 :
  1540. \f2\b \cf8 nil
  1541. \f0\b0 \cf4 ];\
  1542. \
  1543. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1544. \f2\b \cf8 self
  1545. \f0\b0 \cf4 \cf14 selector\cf4 :
  1546. \f2\b \cf8 @selector
  1547. \f0\b0 \cf4 (chatVCMessageSync:) \cf14 name\cf4 :\cf5 kChatVCMessageSync\cf4 \cf14 object\cf4 :
  1548. \f2\b \cf8 nil
  1549. \f0\b0 \cf4 ];\
  1550. \cf14 NSLog\cf4 (\cf6 @"timetime6 -- %f"\cf4 , [[\cf10 NSDate\cf4 \cf14 date\cf4 ] \cf14 timeIntervalSince1970\cf4 ]);\
  1551. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1552. \f2\b \cf8 self
  1553. \f0\b0 \cf4 \cf14 selector\cf4 :
  1554. \f2\b \cf8 @selector
  1555. \f0\b0 \cf4 (updateTransferMsgFileSize:) \cf14 name\cf4 :\cf5 kUpdateTransferMsgFileSize\cf4 \cf14 object\cf4 :
  1556. \f2\b \cf8 nil
  1557. \f0\b0 \cf4 ];\
  1558. \
  1559. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1560. \f2\b \cf8 self
  1561. \f0\b0 \cf4 \cf14 selector\cf4 :
  1562. \f2\b \cf8 @selector
  1563. \f0\b0 \cf4 (keepOnGroupSend:) \cf14 name\cf4 :\cf5 kKeepOnSendGroupSendMessage\cf4 \cf14 object\cf4 :
  1564. \f2\b \cf8 nil
  1565. \f0\b0 \cf4 ];\
  1566. \
  1567. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  1568. \f2\b \cf8 self
  1569. \f0\b0 \cf4 \cf14 selector\cf4 :
  1570. \f2\b \cf8 @selector
  1571. \f0\b0 \cf4 (applicationWillEnterForeground) \cf14 name\cf4 :\cf5 kApplicationWillEnterForeground\cf4 \cf14 object\cf4 :
  1572. \f2\b \cf8 nil
  1573. \f0\b0 \cf4 ];\
  1574. \
  1575. \f2\b \cf8 return
  1576. \f0\b0 \cf4
  1577. \f2\b \cf8 self
  1578. \f0\b0 \cf4 ;\
  1579. \}\
  1580. \
  1581. - (
  1582. \f2\b \cf8 void
  1583. \f0\b0 \cf4 )\cf11 applicationWillEnterForeground\cf4 \{\
  1584. \cf2 //
  1585. \f1 \'bb\'f1\'c8\'a1\'b7\'fe\'ce\'f1\'c6\'f7\'ca\'b1\'bc\'e4
  1586. \f0 \cf4 \
  1587. \cf2 // [g_server getCurrentTimeToView:self];\cf4 \
  1588. \cf2 // [g_server tigaseMucMsgsWithRoomId:<#(NSString *)#> StartTime:<#(long)#> EndTime:<#(long)#> PageIndex:<#(int)#> PageSize:<#(int)#> toView:<#(id)#>];\cf4 \
  1589. \cf2 // [self messageSync];\cf4 \
  1590. \}\
  1591. \
  1592. \
  1593. \cf2 //
  1594. \f1 \'c9\'e8\'d6\'c3\'b5\'a5\'c1\'c4
  1595. \f0 title\cf4 \
  1596. - (
  1597. \f2\b \cf8 void
  1598. \f0\b0 \cf4 )\cf11 setChatTitle\cf4 :(\cf10 NSString\cf4 *)userName \{\
  1599. \
  1600. \cf10 NSString\cf4 *str =
  1601. \f2\b \cf8 self
  1602. \f0\b0 \cf4 .\cf15 onlinestate\cf4 ? \cf5 Localized\cf4 (\cf6 @"JX_OnLine"\cf4 ) : \cf5 Localized\cf4 (\cf6 @"JX_OffLine"\cf4 );\
  1603. \
  1604. \f2\b \cf8 if
  1605. \f0\b0 \cf4 ([\cf5 g_config\cf4 .\cf15 isOpenOnlineStatus\cf4 \cf14 boolValue\cf4 ]) \{\
  1606. \f2\b \cf8 if
  1607. \f0\b0 \cf4 (\cf15 _useInfoTempChat\cf4 ==\cf7 11\cf4 ) \{\
  1608. \
  1609. \f2\b \cf8 self
  1610. \f0\b0 \cf4 .\cf14 title\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@
  1611. \f1 \'c1\'d9\'ca\'b1\'bb\'e1\'bb\'b0
  1612. \f0 (%@) "\cf4 ,userName, str];\
  1613. \}
  1614. \f2\b \cf8 else
  1615. \f0\b0 \cf4 \{\
  1616. \
  1617. \}\
  1618. \}
  1619. \f2\b \cf8 else
  1620. \f0\b0 \cf4 \{\
  1621. \f2\b \cf8 if
  1622. \f0\b0 \cf4 (\cf15 _useInfoTempChat\cf4 ==\cf7 11\cf4 ) \{\
  1623. \
  1624. \f2\b \cf8 self
  1625. \f0\b0 \cf4 .\cf14 title\cf4 =[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@(%@)"\cf4 ,userName, \cf6 @"
  1626. \f1 \'c1\'d9\'ca\'b1\'bb\'e1\'bb\'b0
  1627. \f0 "\cf4 ] ;\
  1628. \
  1629. \}
  1630. \f2\b \cf8 else
  1631. \f0\b0 \cf4 \{\
  1632. \
  1633. \f2\b \cf8 self
  1634. \f0\b0 \cf4 .\cf14 title\cf4 = userName;\
  1635. \}\
  1636. \}\
  1637. \
  1638. \f2\b \cf8 if
  1639. \f0\b0 \cf4 (\cf15 _customerPush\cf4 .\cf14 length\cf4 >\cf7 0\cf4 ) \{\
  1640. \
  1641. \f2\b \cf8 self
  1642. \f0\b0 \cf4 .\cf14 title\cf4 =[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@"\cf4 ,\cf15 _customerPush\cf4 ] ;\
  1643. \
  1644. \}\
  1645. \
  1646. [
  1647. \f2\b \cf8 self
  1648. \f0\b0 \cf4 \cf15 setAudioIconFrame\cf4 ];\
  1649. \}\
  1650. \
  1651. \cf2 //
  1652. \f1 \'b8\'fc\'d0\'c2\'c0\'eb\'cf\'df\'cf\'fb\'cf\'a2\'c8\'ce\'ce\'f1
  1653. \f0 \cf4 \
  1654. - (
  1655. \f2\b \cf8 void
  1656. \f0\b0 \cf4 )\cf11 updateMsgSynTaskNotif\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
  1657. \
  1658. \cf10 NSString\cf4 *userId = notif.\cf14 object\cf4 ;\
  1659. \f2\b \cf8 if
  1660. \f0\b0 \cf4 ([userId \cf14 isEqualToString\cf4 :
  1661. \f2\b \cf8 self
  1662. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 userId\cf4 ]) \{\
  1663. \
  1664. \f2\b \cf8 if
  1665. \f0\b0 \cf4 (
  1666. \f2\b \cf8 self
  1667. \f0\b0 \cf4 .\cf15 roomJid\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  1668. \cf15 _taskList\cf4 = [[\cf9 JXSynTask\cf4 \cf15 sharedInstance\cf4 ] \cf15 getTaskWithUserId\cf4 :
  1669. \f2\b \cf8 self
  1670. \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\
  1671. \}\
  1672. \}\
  1673. \}\
  1674. \
  1675. \cf5 #pragma mark
  1676. \f2\b \cf16 -
  1677. \f4 \'d3\'c3\'bb\'a7\'bd\'d8\'c6\'c1\'cd\'a8\'d6\'aa\'ca\'c2\'bc\'fe
  1678. \f0\b0 \cf4 \
  1679. - (
  1680. \f2\b \cf8 void
  1681. \f0\b0 \cf4 )\cf11 userDidTakeScreenshot\cf4 :(\cf10 NSNotification\cf4 *)notification \{\
  1682. \cf2 //
  1683. \f1 \'c8\'e7\'b9\'fb\'b5\'b1\'c7\'b0\'bd\'e7\'c3\'e6\'b4\'e6\'d4\'da\'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9\'cf\'fb\'cf\'a2\'a3\'ac\'bd\'f8\'d0\'d0\'bd\'d8\'c6\'c1\'b2\'d9\'d7\'f7\'a3\'ac\'b1\'e3\'bb\'e1\'cd\'a8\'d6\'aa\'b6\'d4\'b7\'bd
  1684. \f0 \cf4 \
  1685. \cf10 NSArray\cf4 *allDelMsg = [[\cf9 JXMessageObject\cf4 \cf15 sharedInstance\cf4 ] \cf15 fetchDelMessageWithUserId\cf4 :
  1686. \f2\b \cf8 self
  1687. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 userId\cf4 ];\
  1688. \f2\b \cf8 if
  1689. \f0\b0 \cf4 (allDelMsg.\cf14 count\cf4 > \cf7 0\cf4 ) \{\
  1690. \cf9 JXMessageObject\cf4 *msg = [[\cf9 JXMessageObject\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
  1691. msg.\cf15 type\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf15 kWCMessageTypeDelMsgScreenshots\cf4 ];\
  1692. msg.\cf15 timeSend\cf4 = [\cf10 NSDate\cf4 \cf14 date\cf4 ];\
  1693. msg.\cf15 toUserId\cf4 =
  1694. \f2\b \cf8 self
  1695. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 userId\cf4 ;\
  1696. msg.\cf15 fromUserId\cf4 = \cf5 MY_USER_ID\cf4 ;\
  1697. msg.\cf15 content\cf4 = \cf5 Localized\cf4 (\cf6 @"JX_TheOtherTookAScreenshotOfTheConversation"\cf4 );\
  1698. [msg \cf15 insert\cf4 :
  1699. \f2\b \cf8 nil
  1700. \f0\b0 \cf4 ];\
  1701. [\cf5 g_xmpp\cf4 \cf15 sendMessage\cf4 :msg \cf15 roomName\cf4 :
  1702. \f2\b \cf8 nil
  1703. \f0\b0 \cf4 ];\
  1704. \}\
  1705. \}\
  1706. \
  1707. -(
  1708. \f2\b \cf8 void
  1709. \f0\b0 \cf4 )\cf11 onLoginChanged\cf4 :(\cf10 NSNotification\cf4 *)notifacation\{\
  1710. \
  1711. \f2\b \cf8 switch
  1712. \f0\b0 \cf4 ([\cf9 JXXMPP\cf4 \cf15 sharedInstance\cf4 ].\cf15 isLogined\cf4 )\{\
  1713. \f2\b \cf8 case
  1714. \f0\b0 \cf4 \cf5 login_status_ing\cf4 :\{\
  1715. \}\
  1716. \f2\b \cf8 break
  1717. \f0\b0 \cf4 ;\
  1718. \f2\b \cf8 case
  1719. \f0\b0 \cf4 \cf5 login_status_no\cf4 :\{\
  1720. \}\
  1721. \f2\b \cf8 break
  1722. \f0\b0 \cf4 ;\
  1723. \f2\b \cf8 case
  1724. \f0\b0 \cf4 \cf5 login_status_yes\cf4 :\{\
  1725. \f2\b \cf8 if
  1726. \f0\b0 \cf4 (
  1727. \f2\b \cf8 self
  1728. \f0\b0 \cf4 .\cf15 roomJid\cf4 .\cf14 length\cf4 > \cf7 0\cf4 && [
  1729. \f2\b \cf8 self
  1730. \f0\b0 \cf4 .\cf15 groupStatus\cf4 \cf14 integerValue\cf4 ] == \cf7 0\cf4 ) \{\
  1731. [\cf5 g_xmpp\cf4 .\cf15 roomPool\cf4 .\cf15 pool\cf4 \cf14 removeObjectForKey\cf4 :\cf15 chatPerson\cf4 .\cf15 userId\cf4 ];\
  1732. [\cf5 g_xmpp\cf4 .\cf15 roomPool\cf4 \cf15 joinRoom\cf4 :\cf15 chatPerson\cf4 .\cf15 userId\cf4 \cf15 title\cf4 :\cf15 chatPerson\cf4 .\cf15 userNickname\cf4 \cf15 lastDate\cf4 :
  1733. \f2\b \cf8 nil
  1734. \f0\b0 \cf4 \cf15 isNew\cf4 :
  1735. \f2\b \cf8 NO
  1736. \f0\b0 \cf4 ];\
  1737. \cf15 chatRoom\cf4 = [[\cf9 JXXMPP\cf4 \cf15 sharedInstance\cf4 ].\cf15 roomPool\cf4 \cf15 joinRoom\cf4 :\cf15 chatPerson\cf4 .\cf15 userId\cf4 \cf15 title\cf4 :\cf15 chatPerson\cf4 .\cf15 userNickname\cf4 \cf15 lastDate\cf4 :
  1738. \f2\b \cf8 nil
  1739. \f0\b0 \cf4 \cf15 isNew\cf4 :
  1740. \f2\b \cf8 NO
  1741. \f0\b0 \cf4 ];\
  1742. \}\
  1743. \}\
  1744. \
  1745. \f2\b \cf8 break
  1746. \f0\b0 \cf4 ;\
  1747. \}\
  1748. \}\
  1749. \
  1750. - (
  1751. \f2\b \cf8 void
  1752. \f0\b0 \cf4 )\cf11 actionTitle\cf4 :(\cf9 JXLabel\cf4 *)sender \{\
  1753. \f2\b \cf8 if
  1754. \f0\b0 \cf4 (
  1755. \f2\b \cf8 self
  1756. \f0\b0 \cf4 .\cf15 isRecording\cf4 ) \{\
  1757. [
  1758. \f2\b \cf8 self
  1759. \f0\b0 \cf4 \cf15 chatCell\cf4 :
  1760. \f2\b \cf8 nil
  1761. \f0\b0 \cf4 \cf15 stopRecordIndexNum\cf4 :(
  1762. \f2\b \cf8 int
  1763. \f0\b0 \cf4 )\cf15 _array\cf4 .\cf14 count\cf4 - \cf7 1\cf4 ];\
  1764. \}\
  1765. \}\
  1766. \
  1767. \cf2 //
  1768. \f1 \'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9\'cd\'a8\'d6\'aa
  1769. \f0 \cf4 \
  1770. - (
  1771. \f2\b \cf8 void
  1772. \f0\b0 \cf4 )\cf11 openReadDelNotif\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
  1773. \
  1774. \f2\b \cf8 BOOL
  1775. \f0\b0 \cf4 isOpen = [notif.\cf14 object\cf4 \cf14 boolValue\cf4 ];\
  1776. \cf15 _isReadDelete\cf4 = isOpen;\
  1777. \}\
  1778. \
  1779. \cf5 #pragma mark
  1780. \f2\b \cf16 ----
  1781. \f4 \'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9\'bf\'aa\'b9\'d8
  1782. \f0\b0 \cf4 \
  1783. - (
  1784. \f2\b \cf8 void
  1785. \f0\b0 \cf4 )\cf11 switchValueChange\cf4 :(\cf10 UIButton\cf4 *)but\{\
  1786. \
  1787. \f2\b \cf8 if
  1788. \f0\b0 \cf4 (but.\cf14 tag\cf4 == \cf7 2000\cf4 ) \{\
  1789. but.\cf14 tag\cf4 = \cf7 1000\cf4 ;\
  1790. but.\cf14 selected\cf4 = !but.\cf14 selected\cf4 ;\
  1791. \cf15 _isReadDelete\cf4 = !\cf15 _isReadDelete\cf4 ;\
  1792. \f2\b \cf8 if
  1793. \f0\b0 \cf4 (\cf15 _isReadDelete\cf4 ) \{\
  1794. but.\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 lightGrayColor\cf4 ];\
  1795. [\cf5 g_App\cf4 \cf15 showAlert\cf4 :\cf5 Localized\cf4 (\cf6 @"JX_ReadDeleteTip"\cf4 )];\
  1796. \}
  1797. \f2\b \cf8 else
  1798. \f0\b0 \cf4 \{\
  1799. but.\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 clearColor\cf4 ];\
  1800. \}\
  1801. \cf14 dispatch_after\cf4 (\cf14 dispatch_time\cf4 (\cf5 DISPATCH_TIME_NOW\cf4 , (\cf10 int64_t\cf4 )(\cf7 1\cf4 * \cf5 NSEC_PER_SEC\cf4 )), \cf14 dispatch_get_main_queue\cf4 (), ^\{\
  1802. but.\cf14 tag\cf4 = \cf7 2000\cf4 ;\
  1803. \});\
  1804. \}\
  1805. \}\
  1806. \
  1807. \cf2 //
  1808. \f1 \'d6\'d8\'d0\'c2\'bc\'d3\'d4\'d8
  1809. \f0 \cf4 \
  1810. - (
  1811. \f2\b \cf8 void
  1812. \f0\b0 \cf4 )\cf11 refreshChatLogNotif\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
  1813. \f2\b \cf8 self
  1814. \f0\b0 \cf4 .\cf15 isGetServerMsg\cf4 =
  1815. \f2\b \cf8 NO
  1816. \f0\b0 \cf4 ;\
  1817. [\cf15 _array\cf4 \cf14 removeAllObjects\cf4 ];\
  1818. [
  1819. \f2\b \cf8 self
  1820. \f0\b0 \cf4 \cf15 refresh\cf4 :
  1821. \f2\b \cf8 nil
  1822. \f0\b0 \cf4 ];\
  1823. [
  1824. \f2\b \cf8 self
  1825. \f0\b0 \cf4 .\cf15 tableView\cf4 \cf14 reloadData\cf4 ];\
  1826. \}\
  1827. \
  1828. - (
  1829. \f2\b \cf8 void
  1830. \f0\b0 \cf4 )\cf11 reloadNotif\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
  1831. \f2\b \cf8 self
  1832. \f0\b0 \cf4 .\cf15 isGetServerMsg\cf4 =
  1833. \f2\b \cf8 NO
  1834. \f0\b0 \cf4 ;\
  1835. [\cf15 _array\cf4 \cf14 removeAllObjects\cf4 ];\
  1836. [
  1837. \f2\b \cf8 self
  1838. \f0\b0 \cf4 .\cf15 tableView\cf4 \cf14 reloadData\cf4 ];\
  1839. \}\
  1840. \
  1841. -(
  1842. \f2\b \cf8 void
  1843. \f0\b0 \cf4 )\cf11 cardCellClick\cf4 :(\cf10 NSNotification\cf4 *) notification\{\
  1844. \f2\b \cf8 if
  1845. \f0\b0 \cf4 (\cf15 recording\cf4 ) \{\
  1846. \f2\b \cf8 return
  1847. \f0\b0 \cf4 ;\
  1848. \}\
  1849. \cf9 JXMessageObject\cf4 *msg = notification.\cf14 object\cf4 ;\
  1850. \cf10 NSString\cf4 * objectId = msg.\cf15 objectId\cf4 ;\
  1851. \f2\b \cf8 self
  1852. \f0\b0 \cf4 .\cf15 firstGetUser\cf4 =
  1853. \f2\b \cf8 YES
  1854. \f0\b0 \cf4 ;\
  1855. \cf2 // [g_server getUser:objectId toView:self];\cf4 \
  1856. \cf9 JXUserInfoVC\cf4 * vc = [\cf9 JXUserInfoVC\cf4 \cf14 alloc\cf4 ];\
  1857. vc.\cf15 userId\cf4 = objectId;\
  1858. vc.\cf15 isJustShow\cf4 =
  1859. \f2\b \cf8 self
  1860. \f0\b0 \cf4 .\cf15 courseId\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ;\
  1861. vc.\cf15 fromAddType\cf4 = \cf7 2\cf4 ;\
  1862. vc = [vc \cf14 init\cf4 ];\
  1863. [\cf5 g_navigation\cf4 \cf15 pushViewController\cf4 :vc \cf15 animated\cf4 :
  1864. \f2\b \cf8 YES
  1865. \f0\b0 \cf4 ];\
  1866. \}\
  1867. \
  1868. -(
  1869. \f2\b \cf8 void
  1870. \f0\b0 \cf4 )\cf11 locationCellClick\cf4 :(\cf10 NSNotification\cf4 *)notification\{\
  1871. \f2\b \cf8 if
  1872. \f0\b0 \cf4 (\cf15 recording\cf4 ) \{\
  1873. \f2\b \cf8 return
  1874. \f0\b0 \cf4 ;\
  1875. \}\
  1876. \cf9 JXMessageObject\cf4 *msg = notification.\cf14 object\cf4 ;\
  1877. \f2\b \cf8 double
  1878. \f0\b0 \cf4 location_x = [msg.\cf15 location_x\cf4 \cf14 doubleValue\cf4 ];\
  1879. \f2\b \cf8 double
  1880. \f0\b0 \cf4 location_y = [msg.\cf15 location_y\cf4 \cf14 doubleValue\cf4 ];\
  1881. \
  1882. \cf9 JXMapData\cf4 * mapData = [[\cf9 JXMapData\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
  1883. mapData.\cf15 latitude\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%f"\cf4 ,location_x];\
  1884. mapData.\cf15 longitude\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%f"\cf4 ,location_y];\
  1885. \cf10 NSArray\cf4 * locations = \cf7 @[\cf4 mapData\cf7 ]\cf4 ;\
  1886. mapData.\cf15 title\cf4 = msg.\cf15 objectId\cf4 ;\
  1887. \f2\b \cf8 if
  1888. \f0\b0 \cf4 (\cf5 g_config\cf4 .\cf15 isChina\cf4 ) \{\
  1889. \cf9 JXLocationVC\cf4 * vc = [\cf9 JXLocationVC\cf4 \cf14 alloc\cf4 ];\
  1890. vc.\cf15 placeNames\cf4 = msg.\cf15 objectId\cf4 ;\
  1891. vc.\cf15 locations\cf4 = [\cf10 NSMutableArray\cf4 \cf14 arrayWithArray\cf4 :locations];\
  1892. vc.\cf15 locationType\cf4 = \cf15 JXLocationTypeShowStaticLocation\cf4 ;\
  1893. vc = [vc \cf14 init\cf4 ];\
  1894. [\cf5 g_navigation\cf4 \cf15 pushViewController\cf4 :vc \cf15 animated\cf4 :
  1895. \f2\b \cf8 YES
  1896. \f0\b0 \cf4 ];\
  1897. \}
  1898. \f2\b \cf8 else
  1899. \f0\b0 \cf4 \{\
  1900. \cf15 _gooMap\cf4 = [\cf9 JXGoogleMapVC\cf4 \cf14 alloc\cf4 ] ;\
  1901. \cf15 _gooMap\cf4 .\cf15 locations\cf4 = [\cf10 NSMutableArray\cf4 \cf14 arrayWithArray\cf4 :locations];\
  1902. \cf15 _gooMap\cf4 .\cf15 locationType\cf4 = \cf15 JXGooLocationTypeShowStaticLocation\cf4 ;\
  1903. \cf15 _gooMap\cf4 .\cf15 placeNames\cf4 = msg.\cf15 objectId\cf4 ;\
  1904. \cf15 _gooMap\cf4 = [\cf15 _gooMap\cf4 \cf14 init\cf4 ];\
  1905. [\cf5 g_navigation\cf4 \cf15 pushViewController\cf4 :\cf15 _gooMap\cf4 \cf15 animated\cf4 :
  1906. \f2\b \cf8 YES
  1907. \f0\b0 \cf4 ];\
  1908. \}\
  1909. \
  1910. \}\
  1911. \
  1912. -(
  1913. \f2\b \cf8 void
  1914. \f0\b0 \cf4 )\cf11 viewDidAppear\cf4 :(
  1915. \f2\b \cf8 BOOL
  1916. \f0\b0 \cf4 )animated\{\
  1917. [
  1918. \f2\b \cf8 super
  1919. \f0\b0 \cf4 \cf14 viewDidAppear\cf4 :animated];\
  1920. \f2\b \cf8 for
  1921. \f0\b0 \cf4 (\cf10 UIGestureRecognizer\cf4 *gesture
  1922. \f2\b \cf8 in
  1923. \f0\b0 \cf4
  1924. \f2\b \cf8 self
  1925. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 window\cf4 .\cf14 gestureRecognizers\cf4 ) \{\
  1926. \cf14 NSLog\cf4 (\cf6 @"gesture = %@"\cf4 ,gesture);\
  1927. gesture.\cf14 delaysTouchesBegan\cf4 =
  1928. \f2\b \cf8 NO
  1929. \f0\b0 \cf4 ;\
  1930. \cf14 NSLog\cf4 (\cf6 @"delaysTouchesBegan = %@"\cf4 ,gesture.\cf14 delaysTouchesBegan\cf4 ?\cf6 @"YES"\cf4 :\cf6 @"NO"\cf4 );\
  1931. \cf14 NSLog\cf4 (\cf6 @"delaysTouchesEnded = %@"\cf4 ,gesture.\cf14 delaysTouchesEnded\cf4 ?\cf6 @"YES"\cf4 :\cf6 @"NO"\cf4 );\
  1932. \}\
  1933. [\cf15 _wait\cf4 \cf15 stop\cf4 ];\
  1934. \
  1935. \
  1936. \
  1937. \f2\b \cf8 if
  1938. \f0\b0 \cf4 (\cf15 _yunGoldtigerPush\cf4 ==\cf7 10\cf4 ||\cf15 _yunGoldtigerPush\cf4 ==\cf7 20\cf4 ||\cf15 _yunGoldtigerPush\cf4 ==\cf7 30\cf4 ||\cf15 _yunGoldtigerPush\cf4 ==\cf7 40\cf4 ) \{\
  1939. \
  1940. \cf14 dispatch_after\cf4 (\cf14 dispatch_time\cf4 (\cf5 DISPATCH_TIME_NOW\cf4 , (\cf10 int64_t\cf4 )(\cf7 1\cf4 * \cf5 NSEC_PER_SEC\cf4 )), \cf14 dispatch_get_main_queue\cf4 (), ^\{\
  1941. [\cf5 g_notify\cf4 \cf14 postNotificationName\cf4 :\cf6 @"tongyong"\cf4 \cf14 object\cf4 :
  1942. \f2\b \cf8 nil
  1943. \f0\b0 \cf4 ];\
  1944. [\cf5 g_navigation\cf4 \cf15 dismissViewController\cf4 :
  1945. \f2\b \cf8 self
  1946. \f0\b0 \cf4 \cf15 animated\cf4 :
  1947. \f2\b \cf8 NO
  1948. \f0\b0 \cf4 ];\
  1949. \
  1950. \
  1951. \}); \
  1952. \}\
  1953. \}\
  1954. \
  1955. - (
  1956. \f2\b \cf8 void
  1957. \f0\b0 \cf4 )\cf11 getEmojsData\cf4 \{\
  1958. \cf2 // [g_server faceClollectListType:@"0" View:self];\cf4 \
  1959. \cf2 // [g_server getFaceList:@"0" View:self];\cf4 \
  1960. [\cf5 g_server\cf4 \cf15 getFaceListByGradeToView\cf4 :
  1961. \f2\b \cf8 self
  1962. \f0\b0 \cf4 ];\
  1963. \cf2 // JXUserObject *user = [[JXUserObject sharedInstance] getUserById:];\cf4 \
  1964. [\cf5 g_server\cf4 \cf15 roomMemberGetMemberListByPageWithRoomId\cf4 :
  1965. \f2\b \cf8 self
  1966. \f0\b0 \cf4 .\cf15 roomId\cf4 \cf15 joinTime\cf4 :\cf7 1555649346\cf4 \cf15 toView\cf4 :
  1967. \f2\b \cf8 self
  1968. \f0\b0 \cf4 ];\
  1969. [\cf5 g_server\cf4 \cf15 getbubbleFontByUserId\cf4 :
  1970. \f2\b \cf8 nil
  1971. \f0\b0 \cf4 \cf15 ToView\cf4 :
  1972. \f2\b \cf8 self
  1973. \f0\b0 \cf4 ];\
  1974. \}\
  1975. \
  1976. - (
  1977. \f2\b \cf8 void
  1978. \f0\b0 \cf4 )\cf11 activityView\cf4 \{\
  1979. \cf2 // [self.view addSubview:self.showBtn];\cf4 \
  1980. \cf15 _imgArr\cf4 = [
  1981. \f2\b \cf8 self
  1982. \f0\b0 \cf4 \cf15 setImgArr\cf4 ];\
  1983. \}\
  1984. -(\cf10 NSMutableArray\cf4 *)\cf11 setImgArr\cf4 \{\
  1985. \cf10 NSMutableArray\cf4 *arr = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ]\cf14 initWithCapacity\cf4 :\cf7 0\cf4 ];\
  1986. \cf2 // for (int i = 1; i<=5; i++) \{\cf4 \
  1987. \cf9 DYAdModel\cf4 *adModel = [[\cf9 DYAdModel\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
  1988. adModel.\cf15 imgStr\cf4 = \cf6 @"
  1989. \f1 \'c0\'f1\'ce\'ef
  1990. \f0 "\cf4 ;\
  1991. adModel.\cf15 linkUrl\cf4 = \cf6 @"http://www.baidu.com"\cf4 ;\
  1992. [arr \cf14 addObject\cf4 :adModel];\
  1993. \cf2 // \}\cf4 \
  1994. \f2\b \cf8 return
  1995. \f0\b0 \cf4 arr;\
  1996. \}\
  1997. \
  1998. -(\cf10 UIButton\cf4 *)\cf11 showBtn\cf4 \{\
  1999. \f2\b \cf8 if
  2000. \f0\b0 \cf4 (!\cf15 _showBtn\cf4 ) \{\
  2001. \cf15 _showBtn\cf4 = [\cf10 UIButton\cf4 \cf14 buttonWithType\cf4 :\cf14 UIButtonTypeCustom\cf4 ];\
  2002. \cf15 _showBtn\cf4 .\cf14 center\cf4 =
  2003. \f2\b \cf8 self
  2004. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 center\cf4 ;\
  2005. \cf15 _showBtn\cf4 .\cf14 bounds\cf4 = \cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 0\cf4 , \cf7 100\cf4 , \cf7 60\cf4 );\
  2006. [\cf15 _showBtn\cf4 \cf14 setTitle\cf4 :\cf6 @"
  2007. \f1 \'b5\'af\'a1\'a2\'b5\'af\'a1\'a2\'b5\'af
  2008. \f0 "\cf4 forState:\cf14 UIControlStateNormal\cf4 ];\
  2009. [\cf15 _showBtn\cf4 \cf14 setTitleColor\cf4 :[\cf10 UIColor\cf4 \cf14 orangeColor\cf4 ] \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  2010. [\cf15 _showBtn\cf4 \cf14 addTarget\cf4 :
  2011. \f2\b \cf8 self
  2012. \f0\b0 \cf4 \cf14 action\cf4 :
  2013. \f2\b \cf8 @selector
  2014. \f0\b0 \cf4 (showAdAlertView) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  2015. \}\
  2016. \f2\b \cf8 return
  2017. \f0\b0 \cf4 \cf15 _showBtn\cf4 ;\
  2018. \}\
  2019. \
  2020. -(
  2021. \f2\b \cf8 void
  2022. \f0\b0 \cf4 )\cf11 showAdAlertView\cf4 \{\
  2023. [\cf9 DYAdAlertView\cf4 \cf15 showInView\cf4 :
  2024. \f2\b \cf8 self
  2025. \f0\b0 \cf4 .\cf14 view\cf4 \cf15 theDelegate\cf4 :
  2026. \f2\b \cf8 self
  2027. \f0\b0 \cf4 \cf15 theADInfo\cf4 :\cf15 _imgArr\cf4 \cf15 placeHolderImage\cf4 :\cf6 @"1"\cf4 ];\
  2028. \}\
  2029. -(
  2030. \f2\b \cf8 void
  2031. \f0\b0 \cf4 )\cf11 showAdAlertViewImageString\cf4 :(\cf10 NSString\cf4 *)image \cf11 linkUrl\cf4 :(\cf10 NSString\cf4 *)linkUrl \cf11 audio\cf4 :(\cf10 NSString\cf4 *)audio \cf11 duration\cf4 :(\cf10 NSTimeInterval\cf4 )duration \cf11 content\cf4 :(\cf10 NSString\cf4 *)content \cf11 showCancelButton\cf4 :(
  2032. \f2\b \cf8 BOOL
  2033. \f0\b0 \cf4 )showCancelButton \cf11 type\cf4 :(\cf9 DYAdModelType\cf4 )type \cf11 success\cf4 :(
  2034. \f2\b \cf8 BOOL
  2035. \f0\b0 \cf4 )success\{\
  2036. \cf10 NSMutableArray\cf4 *arr = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ]\cf14 initWithCapacity\cf4 :\cf7 0\cf4 ];\
  2037. \cf9 DYAdModel\cf4 *adModel = [[\cf9 DYAdModel\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
  2038. adModel.\cf15 imgStr\cf4 = image;\
  2039. adModel.\cf15 linkUrl\cf4 = linkUrl;\
  2040. adModel.\cf15 audio\cf4 = audio;\
  2041. adModel.\cf15 duration\cf4 = duration;\
  2042. adModel.\cf15 content\cf4 = content;\
  2043. adModel.\cf15 showCancelButton\cf4 = showCancelButton;\
  2044. adModel.\cf15 type\cf4 = type;\
  2045. adModel.\cf15 success\cf4 = success;\
  2046. [arr \cf14 addObject\cf4 :adModel];\
  2047. \cf15 _imgArr\cf4 = arr;\
  2048. \
  2049. \
  2050. [\cf15 _showLongViewc\cf4 \cf14 removeFromSuperview\cf4 ];\
  2051. \cf9 DYAdAlertView\cf4 *showLongView= [\cf9 DYAdAlertView\cf4 \cf15 showInView\cf4 :
  2052. \f2\b \cf8 self
  2053. \f0\b0 \cf4 .\cf14 view\cf4 \cf15 theDelegate\cf4 :
  2054. \f2\b \cf8 self
  2055. \f0\b0 \cf4 \cf15 theADInfo\cf4 :arr \cf15 placeHolderImage\cf4 :\cf6 @"1"\cf4 ];\
  2056. \
  2057. \
  2058. showLongView.\cf14 userInteractionEnabled\cf4 =
  2059. \f2\b \cf8 YES
  2060. \f0\b0 \cf4 ;\
  2061. \f2\b \cf8 if
  2062. \f0\b0 \cf4 (\cf15 _lastMsg\cf4 .\cf15 fromUserId\cf4 .\cf14 length\cf4 >\cf7 0\cf4 ) \{\
  2063. [[[\cf10 UIApplication\cf4 \cf14 sharedApplication\cf4 ].\cf14 windows\cf4 \cf14 objectAtIndex\cf4 :\cf7 0\cf4 ] \cf14 addSubview\cf4 :showLongView];\
  2064. \}
  2065. \f2\b \cf8 else
  2066. \f0\b0 \cf4 \{\
  2067. \
  2068. [
  2069. \f2\b \cf8 self
  2070. \f0\b0 \cf4 .\cf14 view\cf4 \cf14 addSubview\cf4 :showLongView];\
  2071. \}\
  2072. \f2\b \cf8 self
  2073. \f0\b0 \cf4 .\cf15 showLongViewc\cf4 =showLongView;\
  2074. \
  2075. \cf2 // [showLongView.titleLong addTarget:self action:@selector(gotoGouCaiBtb) forControlEvents:UIControlStateNormal];\cf4 \
  2076. \
  2077. \cf2 // [DYAdAlertView showInView:self.view theDelegate:self theADInfo:arr placeHolderImage:@"1"];\cf4 \
  2078. \}\
  2079. \
  2080. \cf2 //
  2081. \f1 \'d7\'ee\'d0\'c2\'c8\'ba\'b9\'ab\'b8\'e6
  2082. \f0 \cf4 \
  2083. - (
  2084. \f2\b \cf8 void
  2085. \f0\b0 \cf4 )\cf11 showLatestBroadcastTitle\cf4 :(\cf10 NSString\cf4 *)title \cf11 message\cf4 :(\cf10 NSString\cf4 *)message \{\
  2086. \cf10 NSArray\cf4 *buttons = \cf7 @[\cf6 @"
  2087. \f1 \'d6\'aa\'b5\'c0\'c1\'cb
  2088. \f0 "\cf7 ]\cf4 ;\
  2089. \cf10 NSData\cf4 * data = [\cf10 NSData\cf4 \cf14 dataWithContentsOfURL\cf4 :[\cf10 NSURL\cf4 \cf14 URLWithString\cf4 :\cf6 @""\cf4 ]];\
  2090. \cf10 UIImage\cf4 *image = [\cf10 UIImage\cf4 \cf14 imageWithData\cf4 :data];\
  2091. [\cf15 _alert\cf4 \cf15 hide\cf4 :
  2092. \f2\b \cf8 NO
  2093. \f0\b0 \cf4 ];\
  2094. \cf9 STAlertView\cf4 *alert = [[\cf9 STAlertView\cf4 \cf14 alloc\cf4 ] \cf15 initWithTitle\cf4 :title\
  2095. \cf15 image\cf4 :image\
  2096. \cf15 message\cf4 :message\
  2097. \cf15 buttonTitles\cf4 :buttons];\
  2098. \cf15 _alert\cf4 = alert;\
  2099. alert.\cf15 hideWhenTapOutside\cf4 =
  2100. \f2\b \cf8 NO
  2101. \f0\b0 \cf4 ;\
  2102. [alert \cf15 setDidShowHandler\cf4 :^\{\
  2103. \cf14 NSLog\cf4 (\cf6 @"
  2104. \f1 \'cf\'d4\'ca\'be\'c1\'cb
  2105. \f0 "\cf4 );\
  2106. \}];\
  2107. [alert \cf15 setDidHideHandler\cf4 :^\{\
  2108. \cf14 NSLog\cf4 (\cf6 @"
  2109. \f1 \'cf\'fb\'ca\'a7\'c1\'cb
  2110. \f0 "\cf4 );\
  2111. \}];\
  2112. [alert \cf15 setActionHandler\cf4 :^(\cf10 NSInteger\cf4 index) \{\
  2113. \f2\b \cf8 switch
  2114. \f0\b0 \cf4 (index) \{\
  2115. \f2\b \cf8 case
  2116. \f0\b0 \cf4 \cf7 0\cf4 :\
  2117. \{\
  2118. \f2\b \cf8 break
  2119. \f0\b0 \cf4 ;\
  2120. \}\
  2121. \f2\b \cf8 default
  2122. \f0\b0 \cf4 :\
  2123. \f2\b \cf8 break
  2124. \f0\b0 \cf4 ;\
  2125. \}\
  2126. \}];\
  2127. [alert \cf15 show\cf4 :
  2128. \f2\b \cf8 YES
  2129. \f0\b0 \cf4 ];\
  2130. \}\
  2131. \
  2132. \cf2 //
  2133. \f1 \'b5\'e3\'bb\'f7\'ba\'f3\'cc\'f8\'cd\'f8\'d2\'b3
  2134. \f0 \cf4 \
  2135. -(
  2136. \f2\b \cf8 void
  2137. \f0\b0 \cf4 )\cf11 clickAlertViewAtIndex\cf4 :(\cf10 NSInteger\cf4 )index\{\
  2138. \cf9 DYAdModel\cf4 *adModel = [\cf15 _imgArr\cf4 \cf14 objectAtIndex\cf4 :index];\
  2139. \f2\b \cf8 switch
  2140. \f0\b0 \cf4 (adModel.\cf15 type\cf4 ) \{\
  2141. \f2\b \cf8 case
  2142. \f0\b0 \cf4 \cf15 DYAdModelTypeLongAnimation\cf4 :\
  2143. \{\
  2144. \cf2 // webpageVC *webVC = [webpageVC alloc];\cf4 \
  2145. \cf2 // webVC.isGotoBack= YES;\cf4 \
  2146. \cf2 // webVC.isSend = NO;\cf4 \
  2147. \cf2 // webVC.url = adModel.linkUrl;\cf4 \
  2148. \cf2 // webVC = [webVC init];\cf4 \
  2149. \cf2 // [g_navigation.navigationView addSubview:webVC.view];\cf4 \
  2150. [\cf5 g_App\cf4 .\cf15 navigation\cf4 \cf15 popToRootViewController\cf4 ];\
  2151. \
  2152. \}\
  2153. \f2\b \cf8 break
  2154. \f0\b0 \cf4 ;\
  2155. \f2\b \cf8 case
  2156. \f0\b0 \cf4 \cf15 DYAdModelTypeGiftOpen\cf4 :\
  2157. \{\
  2158. \cf2 //
  2159. \f1 \'b7\'a2\'cd\'f8\'c2\'e7\'c7\'eb\'c7\'f3
  2160. \f0 \cf4 \
  2161. [\cf5 g_server\cf4 \cf15 getRroomActivity\cf4 :\cf15 _activityModel\cf4 .
  2162. \f2\b \cf8 id
  2163. \f0\b0 \cf4 \cf15 ToView\cf4 :
  2164. \f2\b \cf8 self
  2165. \f0\b0 \cf4 ];\
  2166. \
  2167. \}\
  2168. \f2\b \cf8 break
  2169. \f0\b0 \cf4 ;\
  2170. \f2\b \cf8 case
  2171. \f0\b0 \cf4 \cf15 DYAdModelTypeGifttOpenAnimation\cf4 :\
  2172. \{\
  2173. [
  2174. \f2\b \cf8 self
  2175. \f0\b0 \cf4 \cf15 showAdAlertViewImageString\cf4 :\cf6 @"
  2176. \f1 \'bb\'f1\'b5\'c3\'bd\'b1\'c0\'f8\'bd\'e7\'c3\'e6
  2177. \f0 .png"\cf4 linkUrl:\cf15 _activityModel\cf4 .imageUrl \cf15 audio\cf4 :
  2178. \f2\b \cf8 nil
  2179. \f0\b0 \cf4 \cf15 duration\cf4 :\cf7 0\cf4 \cf15 content\cf4 :\cf15 _activityModel\cf4 .success?\cf15 _activityModel\cf4 .giftName:\cf6 @"
  2180. \f1 \'c0\'f1\'ce\'ef\'d2\'d1\'c7\'c0\'cd\'ea
  2181. \f0 !"\cf4 showCancelButton:
  2182. \f2\b \cf8 NO
  2183. \f0\b0 \cf4 \cf15 type\cf4 :(\cf15 DYAdModelTypeGiftAfterOpen\cf4 ) success:_activityModel.success];\
  2184. \}\
  2185. \f2\b \cf8 break
  2186. \f0\b0 \cf4 ;\
  2187. \f2\b \cf8 case
  2188. \f0\b0 \cf4 \cf15 DYAdModelTypeGiftAfterOpen\cf4 :\
  2189. \{\
  2190. \cf2 //
  2191. \f1 \'c7\'eb\'c7\'f3\'b7\'fe\'ce\'f1\'c6\'f7
  2192. \f0 \cf4 \
  2193. [\cf5 g_server\cf4 \cf15 getRoomActivityRecordToView\cf4 :
  2194. \f2\b \cf8 self
  2195. \f0\b0 \cf4 ];\
  2196. \}\
  2197. \f2\b \cf8 break
  2198. \f0\b0 \cf4 ;\
  2199. \
  2200. \f2\b \cf8 default
  2201. \f0\b0 \cf4 :\
  2202. \f2\b \cf8 break
  2203. \f0\b0 \cf4 ;\
  2204. \}\
  2205. \}\
  2206. \
  2207. - (
  2208. \f2\b \cf8 void
  2209. \f0\b0 \cf4 )\cf11 setupFloating\cf4 \{\
  2210. \cf15 _floating\cf4 = [[\cf9 MISFloatingBall\cf4 \cf14 alloc\cf4 ] \cf15 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf5 JX_SCREEN_WIDTH\cf4 -\cf7 60\cf4 , \cf5 JX_SCREEN_HEIGHT\cf4 /\cf7 3\cf4 , \cf7 60\cf4 , \cf7 60\cf4 ) \cf15 inSpecifiedView\cf4 :
  2211. \f2\b \cf8 self
  2212. \f0\b0 \cf4 .\cf14 view\cf4 \cf15 effectiveEdgeInsets\cf4 :(\cf14 UIEdgeInsetsZero\cf4 )];\
  2213. \cf2 //
  2214. \f1 \'d7\'d4\'b6\'af\'bf\'bf\'b1\'df
  2215. \f0 \cf4 \
  2216. \cf15 _floating\cf4 .\cf15 autoCloseEdge\cf4 =
  2217. \f2\b \cf8 YES
  2218. \f0\b0 \cf4 ;\
  2219. [\cf15 _floating\cf4 \cf15 setContent\cf4 :[\cf10 UIImage\cf4 \cf14 imageNamed\cf4 :\cf6 @"sidaiDD"\cf4 ] \cf15 contentType\cf4 :\cf15 MISFloatingBallContentTypeImage\cf4 ];\
  2220. \cf15 _floating\cf4 .\cf15 edgePolicy\cf4 = \cf15 MISFloatingBallEdgePolicyLeftRight\cf4 ;\
  2221. [\cf15 _floating\cf4 \cf15 show\cf4 ];\
  2222. \f2\b \cf8 __weak
  2223. \f0\b0 \cf4
  2224. \f2\b \cf8 __typeof
  2225. \f0\b0 \cf4 (
  2226. \f2\b \cf8 self
  2227. \f0\b0 \cf4 )weakSelf =
  2228. \f2\b \cf8 self
  2229. \f0\b0 \cf4 ;\
  2230. \cf15 _floating\cf4 .\cf15 clickHandler\cf4 = ^(\cf9 MISFloatingBall\cf4 *
  2231. \f2\b \cf8 _Nonnull
  2232. \f0\b0 \cf4 floatingBall) \{\
  2233. \cf2 //[g_server getAppResource:@"5" ToView:weakSelf];\cf4 \
  2234. \
  2235. \f2\b \cf8 long
  2236. \f0\b0 \cf4 time = (
  2237. \f2\b \cf8 long
  2238. \f0\b0 \cf4 )[[\cf10 NSDate\cf4 \cf14 date\cf4 ] \cf14 timeIntervalSince1970\cf4 ];\
  2239. time = (time *\cf7 1000\cf4 + \cf5 g_server\cf4 .\cf15 timeDifference\cf4 );\
  2240. \cf10 NSString\cf4 *salt = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%ld"\cf4 , time];\
  2241. \cf10 NSString\cf4 *jid_room=[[\cf10 NSUserDefaults\cf4 \cf14 standardUserDefaults\cf4 ] \cf14 objectForKey\cf4 :\cf6 @"jid_roomJid"\cf4 ];\
  2242. [\cf5 g_server\cf4 \cf15 getact_act_act_SilkPlanallByJidlist\cf4 :salt \cf15 jid\cf4 :jid_room \cf15 andToView\cf4 :weakSelf];\
  2243. \};\
  2244. \}\
  2245. \
  2246. \
  2247. - (
  2248. \f2\b \cf8 void
  2249. \f0\b0 \cf4 )\cf11 viewDidLoad\cf4 \
  2250. \{\
  2251. [
  2252. \f2\b \cf8 super
  2253. \f0\b0 \cf4 \cf14 viewDidLoad\cf4 ];\
  2254. [
  2255. \f2\b \cf8 self
  2256. \f0\b0 \cf4 \cf15 getEmojsData\cf4 ];\
  2257. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  2258. \f2\b \cf8 self
  2259. \f0\b0 \cf4 \cf14 selector\cf4 :
  2260. \f2\b \cf8 @selector
  2261. \f0\b0 \cf4 (getEmojsData) \cf14 name\cf4 :\cf5 kEmojiRefresh\cf4 \cf14 object\cf4 :
  2262. \f2\b \cf8 nil
  2263. \f0\b0 \cf4 ];\
  2264. \
  2265. \f2\b \cf8 self
  2266. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 backgroundColor\cf4 = \cf5 HEXCOLOR\cf4 (\cf7 0xF9F9F9\cf4 );\
  2267. \f2\b \cf8 self
  2268. \f0\b0 \cf4 .\cf15 friendStatus\cf4 = [
  2269. \f2\b \cf8 self
  2270. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 status\cf4 \cf14 intValue\cf4 ];\
  2271. [
  2272. \f2\b \cf8 self
  2273. \f0\b0 \cf4 \cf15 customView\cf4 ];\
  2274. \f2\b \cf8 if
  2275. \f0\b0 \cf4 (
  2276. \f2\b \cf8 self
  2277. \f0\b0 \cf4 .\cf15 chatRoom\cf4 .\cf15 roomJid\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  2278. [
  2279. \f2\b \cf8 self
  2280. \f0\b0 \cf4 \cf15 setupFloating\cf4 ];\
  2281. [
  2282. \f2\b \cf8 self
  2283. \f0\b0 \cf4 \cf15 setupNotice\cf4 ];\
  2284. [
  2285. \f2\b \cf8 self
  2286. \f0\b0 \cf4 \cf15 setupNotice2nd\cf4 ];\
  2287. \cf5 #ifdef DEBUG\cf4 \
  2288. \
  2289. \cf10 UILabel\cf4 *lable = [[\cf10 UILabel\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 100\cf4 , \cf5 JX_SCREEN_HEIGHT\cf4 -\cf7 200\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf7 50\cf4 )];\
  2290. lable.\cf14 text\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"roomId = %@"\cf4 ,
  2291. \f2\b \cf8 self
  2292. \f0\b0 \cf4 .\cf15 roomId\cf4 ];\
  2293. lable.\cf14 font\cf4 = [\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 10\cf4 ];\
  2294. [
  2295. \f2\b \cf8 self
  2296. \f0\b0 \cf4 .\cf14 view\cf4 \cf14 addSubview\cf4 :lable];\
  2297. [lable \cf14 sizeToFit\cf4 ];\
  2298. \
  2299. \cf10 UILabel\cf4 *lable1 = [[\cf10 UILabel\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 100\cf4 , \cf5 JX_SCREEN_HEIGHT\cf4 -\cf7 150\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf7 50\cf4 )];\
  2300. lable1.\cf14 text\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"roomJid = %@"\cf4 ,
  2301. \f2\b \cf8 self
  2302. \f0\b0 \cf4 .\cf15 chatRoom\cf4 .\cf15 roomJid\cf4 ];\
  2303. lable1.\cf14 font\cf4 = [\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 10\cf4 ];\
  2304. [
  2305. \f2\b \cf8 self
  2306. \f0\b0 \cf4 .\cf14 view\cf4 \cf14 addSubview\cf4 :lable1];\
  2307. [lable1 \cf14 sizeToFit\cf4 ];\
  2308. \cf5 #else\cf4 \
  2309. \
  2310. \cf2 // Release
  2311. \f1 \'c4\'a3\'ca\'bd\'b5\'c4\'b4\'fa\'c2\'eb
  2312. \f0 ...\cf4 \
  2313. \
  2314. \cf5 #endif\cf4 \
  2315. \}\
  2316. \f2\b \cf8 if
  2317. \f0\b0 \cf4 (
  2318. \f2\b \cf8 self
  2319. \f0\b0 \cf4 .\cf15 courseId\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  2320. \cf10 UIButton\cf4 *btn = [[\cf10 UIButton\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 71\cf4 , \cf5 THE_DEVICE_HAVE_HEAD\cf4 ? \cf7 13\cf4 : \cf7 10\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 -\cf7 71\cf4 *\cf7 2\cf4 , \cf7 36\cf4 )];\
  2321. btn.\cf14 backgroundColor\cf4 = \cf5 THEMECOLOR\cf4 ;\
  2322. [btn \cf14 setTitle\cf4 :\cf5 Localized\cf4 (\cf6 @"JXUserInfoVC_SendMseeage"\cf4 ) \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  2323. [btn \cf14 setTitleColor\cf4 :[\cf10 UIColor\cf4 \cf14 whiteColor\cf4 ] \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  2324. btn.\cf14 titleLabel\cf4 .\cf14 font\cf4 = \cf5 g_factory\cf4 .\cf15 font16\cf4 ;\
  2325. btn.\cf14 layer\cf4 .\cf14 masksToBounds\cf4 =
  2326. \f2\b \cf8 YES
  2327. \f0\b0 \cf4 ;\
  2328. btn.\cf14 layer\cf4 .\cf14 cornerRadius\cf4 = btn.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 /\cf7 2\cf4 ;\
  2329. [btn \cf14 addTarget\cf4 :
  2330. \f2\b \cf8 self
  2331. \f0\b0 \cf4 \cf14 action\cf4 :
  2332. \f2\b \cf8 @selector
  2333. \f0\b0 \cf4 (sendCourseAction) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  2334. [
  2335. \f2\b \cf8 self
  2336. \f0\b0 \cf4 .\cf15 tableFooter\cf4 \cf14 addSubview\cf4 :btn];\
  2337. \
  2338. \}
  2339. \f2\b \cf8 else
  2340. \f0\b0 \cf4 \{\
  2341. \
  2342. [
  2343. \f2\b \cf8 self
  2344. \f0\b0 \cf4 \cf15 createFooterSubViews\cf4 ];\
  2345. \}\
  2346. \
  2347. \f2\b \cf8 self
  2348. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (
  2349. \f2\b \cf8 self
  2350. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 x\cf4 ,
  2351. \f2\b \cf8 self
  2352. \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 y\cf4 -
  2353. \f2\b \cf8 self
  2354. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 - \cf7 10\cf4 ,
  2355. \f2\b \cf8 self
  2356. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 ,
  2357. \f2\b \cf8 self
  2358. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 );\
  2359. \
  2360. \
  2361. \f2\b \cf8 if
  2362. \f0\b0 \cf4 (!
  2363. \f2\b \cf8 self
  2364. \f0\b0 \cf4 .\cf15 roomJid\cf4 ) \{\
  2365. \cf2 //
  2366. \f1 \'c8\'e7\'b9\'fb\'ca\'c7\'d7\'d4\'bc\'ba\'b5\'c4\'c6\'e4\'cb\'fb\'b6\'cb\'a3\'ac\'b2\'bb\'b5\'f7\'d3\'c3\'bd\'d3\'bf\'da
  2367. \f0 \cf4 \
  2368. \f2\b \cf8 if
  2369. \f0\b0 \cf4 (\cf15 chatPerson\cf4 && [\cf15 chatPerson\cf4 .\cf15 userId\cf4 \cf14 rangeOfString\cf4 :\cf5 MY_USER_ID\cf4 ].\cf14 location\cf4 != \cf14 NSNotFound\cf4 ) \{\
  2370. \f2\b \cf8 self
  2371. \f0\b0 \cf4 .\cf15 friendStatus\cf4 = \cf7 10\cf4 ;\
  2372. \f2\b \cf8 for
  2373. \f0\b0 \cf4 (\cf9 JXDevice\cf4 *device
  2374. \f2\b \cf8 in
  2375. \f0\b0 \cf4 \cf5 g_multipleLogin\cf4 .\cf15 deviceArr\cf4 ) \{\
  2376. \f2\b \cf8 if
  2377. \f0\b0 \cf4 ([device.\cf15 userId\cf4 \cf14 isEqualToString\cf4 :\cf15 chatPerson\cf4 .\cf15 userId\cf4 ]) \{\
  2378. \cf2 // NSString *str = [device.isOnLine intValue] == 1 ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
  2379. \f2\b \cf8 self
  2380. \f0\b0 \cf4 .\cf15 onlinestate\cf4 = [device.\cf15 isOnLine\cf4 \cf14 boolValue\cf4 ];\
  2381. \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.remarkName.length > 0 ? chatPerson.remarkName : chatPerson.userNickname,str];\cf4 \
  2382. [
  2383. \f2\b \cf8 self
  2384. \f0\b0 \cf4 \cf15 setChatTitle\cf4 :\cf15 chatPerson\cf4 .\cf15 remarkName\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ? \cf15 chatPerson\cf4 .\cf15 remarkName\cf4 : \cf15 chatPerson\cf4 .\cf15 userNickname\cf4 ];\
  2385. \f2\b \cf8 break
  2386. \f0\b0 \cf4 ;\
  2387. \}\
  2388. \}\
  2389. \
  2390. \cf2 // if ([chatPerson.userId rangeOfString:@"android"].location != NSNotFound) \{\cf4 \
  2391. \cf2 //\cf4 \
  2392. \cf2 // NSString *str = [g_multipleLogin.androidUser.isOnLine intValue] == 1 ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
  2393. \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.userNickname,str];\cf4 \
  2394. \cf2 // \}\cf4 \
  2395. \cf2 // if ([chatPerson.userId rangeOfString:@"pc"].location != NSNotFound) \{\cf4 \
  2396. \cf2 // NSString *str = [g_multipleLogin.pcUser.isOnLine intValue] == 1 ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
  2397. \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.userNickname,str];\cf4 \
  2398. \cf2 // \}\cf4 \
  2399. \cf2 // if ([chatPerson.userId rangeOfString:@"mac"].location != NSNotFound) \{\cf4 \
  2400. \cf2 // NSString *str = [g_multipleLogin.macUser.isOnLine intValue] == 1 ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
  2401. \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.userNickname,str];\cf4 \
  2402. \cf2 // \}\cf4 \
  2403. \
  2404. \}
  2405. \f2\b \cf8 else
  2406. \f0\b0 \cf4 \{\
  2407. \f2\b \cf8 if
  2408. \f0\b0 \cf4 (
  2409. \f2\b \cf8 self
  2410. \f0\b0 \cf4 .\cf15 isGroupMessages\cf4 ) \{\
  2411. \f2\b \cf8 self
  2412. \f0\b0 \cf4 .\cf14 title\cf4 = \cf5 Localized\cf4 (\cf6 @"JX_GroupHair"\cf4 );\
  2413. [
  2414. \f2\b \cf8 self
  2415. \f0\b0 \cf4 \cf15 setAudioIconFrame\cf4 ];\
  2416. \}
  2417. \f2\b \cf8 else
  2418. \f0\b0 \cf4 \{\
  2419. [\cf5 g_server\cf4 \cf15 getUser\cf4 :\cf15 chatPerson\cf4 .\cf15 userId\cf4 \cf15 toView\cf4 :
  2420. \f2\b \cf8 self
  2421. \f0\b0 \cf4 ];\
  2422. [\cf5 g_server\cf4 \cf15 getUser\cf4 :\cf5 MY_USER_ID\cf4 \cf15 toView\cf4 :
  2423. \f2\b \cf8 self
  2424. \f0\b0 \cf4 ];\
  2425. \}\
  2426. \}\
  2427. \}
  2428. \f2\b \cf8 else
  2429. \f0\b0 \cf4 \{\
  2430. [\cf5 g_server\cf4 \cf15 roomGetRoom\cf4 :
  2431. \f2\b \cf8 self
  2432. \f0\b0 \cf4 .\cf15 roomId\cf4 \cf15 toView\cf4 :
  2433. \f2\b \cf8 self
  2434. \f0\b0 \cf4 ];\
  2435. \
  2436. \cf5 #if IS_AUTO_JOIN_ROOM\cf4 \
  2437. \cf2 //
  2438. \f1 \'bd\'f8\'c8\'ba\'d7\'e9
  2439. \f0
  2440. \f1 \'c8\'e7\'b9\'fb\'c3\'bb\'d3\'d0\'c1\'ac\'bd\'d3\'a3\'ac\'cf\'c8\'c1\'ac\'bd\'d3\'d2\'bb\'b4\'ce
  2441. \f0 \cf4 \
  2442. \f2\b \cf8 if
  2443. \f0\b0 \cf4 (![g_xmpp.roomPool getRoom:
  2444. \f2\b \cf8 self
  2445. \f0\b0 \cf4 .chatPerson.userId] && [
  2446. \f2\b \cf8 self
  2447. \f0\b0 \cf4 .chatPerson.groupStatus intValue] == \cf7 0\cf4 ) \{\
  2448. [g_xmpp.roomPool joinRoom:chatPerson.userId title:chatPerson.userNickname lastDate:
  2449. \f2\b \cf8 nil
  2450. \f0\b0 \cf4 isNew:
  2451. \f2\b \cf8 NO
  2452. \f0\b0 \cf4 ];\
  2453. chatRoom = [[JXXMPP sharedInstance].roomPool joinRoom:chatPerson.userId title:chatPerson.userNickname lastDate:
  2454. \f2\b \cf8 nil
  2455. \f0\b0 \cf4 isNew:
  2456. \f2\b \cf8 NO
  2457. \f0\b0 \cf4 ];\
  2458. \}\
  2459. \cf5 #endif\cf4 \
  2460. \}\
  2461. \
  2462. [
  2463. \f2\b \cf8 self
  2464. \f0\b0 \cf4 \cf15 refresh\cf4 :
  2465. \f2\b \cf8 nil
  2466. \f0\b0 \cf4 ];\
  2467. \
  2468. \f2\b \cf8 if
  2469. \f0\b0 \cf4 (!
  2470. \f2\b \cf8 self
  2471. \f0\b0 \cf4 .\cf15 roomJid\cf4 ||
  2472. \f2\b \cf8 self
  2473. \f0\b0 \cf4 .\cf15 roomJid\cf4 .\cf14 length\cf4 <= \cf7 0\cf4 ) \{\
  2474. \cf2 //
  2475. \f1 \'cd\'ac\'b2\'bd\'cf\'fb\'cf\'a2
  2476. \f0 \cf4 \
  2477. [
  2478. \f2\b \cf8 self
  2479. \f0\b0 \cf4 \cf15 messageSync\cf4 ];\
  2480. \}\
  2481. \
  2482. \f2\b \cf8 if
  2483. \f0\b0 \cf4 (\cf15 chatPerson\cf4 .\cf15 lastInput\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  2484. \
  2485. \cf14 dispatch_after\cf4 (\cf14 dispatch_time\cf4 (\cf5 DISPATCH_TIME_NOW\cf4 , (\cf10 int64_t\cf4 )(\cf7 0.5\cf4 * \cf5 NSEC_PER_SEC\cf4 )), \cf14 dispatch_get_main_queue\cf4 (), ^\{\
  2486. \
  2487. \cf15 _messageText\cf4 .\cf14 inputView\cf4 =
  2488. \f2\b \cf8 nil
  2489. \f0\b0 \cf4 ;\
  2490. [\cf15 _messageText\cf4 \cf14 reloadInputViews\cf4 ];\
  2491. [
  2492. \f2\b \cf8 self
  2493. \f0\b0 \cf4 \cf15 doBeginEdit\cf4 ];\
  2494. [\cf15 _messageText\cf4 \cf14 becomeFirstResponder\cf4 ];\
  2495. [\cf15 _faceView\cf4 \cf14 removeFromSuperview\cf4 ];\
  2496. \});\
  2497. \}\
  2498. \
  2499. \f2\b \cf8 long
  2500. \f0\b0 \cf4 time = (
  2501. \f2\b \cf8 long
  2502. \f0\b0 \cf4 )[[\cf10 NSDate\cf4 \cf14 date\cf4 ] \cf14 timeIntervalSince1970\cf4 ];\
  2503. time = (time *\cf7 1000\cf4 + \cf5 g_server\cf4 .\cf15 timeDifference\cf4 );\
  2504. \cf10 NSString\cf4 *salt = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%ld"\cf4 , time];\
  2505. [\cf5 g_server\cf4 \cf15 UserRoomAttentionattentionLastInfo\cf4 :salt \cf15 userId\cf4 :\cf5 g_server\cf4 .\cf15 myself\cf4 .\cf15 userId\cf4 \cf15 jid\cf4 :\cf15 _roomJid\cf4 \cf15 andToView\cf4 :
  2506. \f2\b \cf8 self
  2507. \f0\b0 \cf4 ];\
  2508. \
  2509. \}\
  2510. \
  2511. - (
  2512. \f2\b \cf8 void
  2513. \f0\b0 \cf4 )\cf11 chatVCMessageSync\cf4 :(\cf10 NSNotification\cf4 *)noti \{\
  2514. \f2\b \cf8 long
  2515. \f0\b0 \cf4
  2516. \f2\b \cf8 long
  2517. \f0\b0 \cf4 timeSend = [noti.\cf14 object\cf4 \cf14 longLongValue\cf4 ];\
  2518. \f2\b \cf8 self
  2519. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 timeSend\cf4 = [\cf10 NSDate\cf4 \cf14 dateWithTimeIntervalSince1970\cf4 :timeSend];\
  2520. [
  2521. \f2\b \cf8 self
  2522. \f0\b0 \cf4 \cf15 messageSync\cf4 ];\
  2523. \}\
  2524. \
  2525. - (
  2526. \f2\b \cf8 void
  2527. \f0\b0 \cf4 )\cf11 messageSync\cf4 \{\
  2528. \
  2529. \f2\b \cf8 double
  2530. \f0\b0 \cf4 syncTimeLen = \cf7 0\cf4 ;\
  2531. \cf10 NSString\cf4 * s;\
  2532. \f2\b \cf8 if
  2533. \f0\b0 \cf4 ([
  2534. \f2\b \cf8 self
  2535. \f0\b0 \cf4 .\cf15 roomJid\cf4 \cf14 length\cf4 ]>\cf7 0\cf4 )\{\
  2536. s =
  2537. \f2\b \cf8 self
  2538. \f0\b0 \cf4 .\cf15 roomJid\cf4 ;\
  2539. \cf2 // syncTimeLen = [g_myself.groupChatSyncTimeLen doubleValue];\cf4 \
  2540. \cf2 // syncTimeLen = 0;\cf4 \
  2541. syncTimeLen = [\cf5 g_myself\cf4 .\cf15 chatSyncTimeLen\cf4 \cf14 doubleValue\cf4 ];\
  2542. \}\
  2543. \f2\b \cf8 else
  2544. \f0\b0 \cf4 \{\
  2545. s = \cf15 chatPerson\cf4 .\cf15 userId\cf4 ;\
  2546. syncTimeLen = [\cf5 g_myself\cf4 .\cf15 chatSyncTimeLen\cf4 \cf14 doubleValue\cf4 ];\
  2547. \}\
  2548. \
  2549. \cf2 //
  2550. \f1 \'cd\'ac\'b2\'bd\'cf\'fb\'cf\'a2
  2551. \f0 \cf4 \
  2552. \f2\b \cf8 if
  2553. \f0\b0 \cf4 ([
  2554. \f2\b \cf8 self
  2555. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 downloadTime\cf4 \cf14 timeIntervalSince1970\cf4 ] < [
  2556. \f2\b \cf8 self
  2557. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 timeSend\cf4 \cf14 timeIntervalSince1970\cf4 ] && \cf15 _taskList\cf4 .\cf14 count\cf4 <=\cf7 0\cf4 && syncTimeLen != -\cf7 2\cf4 ) \{\
  2558. \f2\b \cf8 long
  2559. \f0\b0 \cf4
  2560. \f2\b \cf8 long
  2561. \f0\b0 \cf4 chatSyncTimeLen = \cf7 0\cf4 ;\
  2562. \f2\b \cf8 switch
  2563. \f0\b0 \cf4 ([\cf5 g_myself\cf4 .\cf15 chatSyncTimeLen\cf4 \cf14 integerValue\cf4 ]) \{\
  2564. \f2\b \cf8 case
  2565. \f0\b0 \cf4 \cf7 0\cf4 : \cf2 // 0.04 1
  2566. \f1 \'d0\'a1\'ca\'b1
  2567. \f0 \cf4 \
  2568. chatSyncTimeLen = \cf7 3600000\cf4 ;\
  2569. \f2\b \cf8 break
  2570. \f0\b0 \cf4 ;\
  2571. \f2\b \cf8 case
  2572. \f0\b0 \cf4 \cf7 1\cf4 : \cf2 // 1
  2573. \f1 \'cc\'ec
  2574. \f0 \cf4 \
  2575. chatSyncTimeLen = \cf7 86400000\cf4 ;\
  2576. \f2\b \cf8 break
  2577. \f0\b0 \cf4 ;\
  2578. \f2\b \cf8 case
  2579. \f0\b0 \cf4 \cf7 7\cf4 : \cf2 // 7
  2580. \f1 \'cc\'ec
  2581. \f0 \cf4 \
  2582. chatSyncTimeLen = \cf7 604800017\cf4 ;\
  2583. \f2\b \cf8 break
  2584. \f0\b0 \cf4 ;\
  2585. \f2\b \cf8 case
  2586. \f0\b0 \cf4 \cf7 30\cf4 : \cf2 // 30
  2587. \f1 \'cc\'ec
  2588. \f0 \cf4 \
  2589. chatSyncTimeLen = \cf7 2629800000\cf4 ;\
  2590. \f2\b \cf8 break
  2591. \f0\b0 \cf4 ;\
  2592. \f2\b \cf8 case
  2593. \f0\b0 \cf4 \cf7 90\cf4 : \cf2 // 90
  2594. \f1 \'cc\'ec
  2595. \f0 \cf4 \
  2596. chatSyncTimeLen = \cf7 7889400000\cf4 ;\
  2597. \f2\b \cf8 break
  2598. \f0\b0 \cf4 ;\
  2599. \f2\b \cf8 case
  2600. \f0\b0 \cf4 \cf7 365\cf4 : \cf2 //365
  2601. \f1 \'cc\'ec
  2602. \f0 \cf4 \
  2603. chatSyncTimeLen = \cf7 31557600000\cf4 ;\
  2604. \f2\b \cf8 break
  2605. \f0\b0 \cf4 ;\
  2606. \f2\b \cf8 case
  2607. \f0\b0 \cf4 -\cf7 1\cf4 : \cf2 //
  2608. \f1 \'d3\'c0\'be\'c3
  2609. \f0 (20
  2610. \f1 \'c4\'ea
  2611. \f0 )\cf4 \
  2612. chatSyncTimeLen = \cf7 631152000000\cf4 ;\
  2613. \f2\b \cf8 break
  2614. \f0\b0 \cf4 ;\
  2615. \f2\b \cf8 default
  2616. \f0\b0 \cf4 :\
  2617. \f2\b \cf8 break
  2618. \f0\b0 \cf4 ;\
  2619. \}\
  2620. \f2\b \cf8 long
  2621. \f0\b0 \cf4 endTime = [[\cf10 NSDate\cf4 \cf14 date\cf4 ] \cf14 timeIntervalSince1970\cf4 ] * \cf7 1000\cf4 ;\
  2622. \f2\b \cf8 long
  2623. \f0\b0 \cf4 starTime = endTime - chatSyncTimeLen;\
  2624. \
  2625. \f2\b \cf8 self
  2626. \f0\b0 \cf4 .\cf15 isSyncMsg\cf4 =
  2627. \f2\b \cf8 YES
  2628. \f0\b0 \cf4 ;\
  2629. \
  2630. \f2\b \cf8 if
  2631. \f0\b0 \cf4 ([
  2632. \f2\b \cf8 self
  2633. \f0\b0 \cf4 .\cf15 roomJid\cf4 \cf14 length\cf4 ]>\cf7 0\cf4 )\{\
  2634. \cf2 //
  2635. \f1 \'bb\'f1\'c8\'a1\'bd\'f8\'c8\'ba\'ca\'b1\'bc\'e4
  2636. \f0 \cf4 \
  2637. \cf10 NSString\cf4 * myUserId = \cf5 MY_USER_ID\cf4 ;\
  2638. \f2\b \cf8 double
  2639. \f0\b0 \cf4 createTime = \cf7 0\cf4 ;\
  2640. \cf10 NSArray\cf4 *array = [\cf9 memberData\cf4 \cf15 getSelfMember\cf4 :
  2641. \f2\b \cf8 self
  2642. \f0\b0 \cf4 .\cf15 roomId\cf4 ];\
  2643. \f2\b \cf8 for
  2644. \f0\b0 \cf4 (\cf9 memberData\cf4 *mdata
  2645. \f2\b \cf8 in
  2646. \f0\b0 \cf4 array) \{\
  2647. \cf10 NSString\cf4 *userId = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%ld"\cf4 , mdata.\cf15 userId\cf4 ];\
  2648. \f2\b \cf8 if
  2649. \f0\b0 \cf4 ([userId \cf14 isEqualToString\cf4 :myUserId])\{\
  2650. createTime = mdata.\cf15 createTime\cf4 * \cf7 1000\cf4 ;\
  2651. \}\
  2652. \}\
  2653. \cf2 //
  2654. \f1 \'c8\'ba\'d7\'e9\'c9\'be\'b3\'fd\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc\'ca\'b1\'bc\'e4
  2655. \f0 \cf4 \
  2656. \cf10 NSInteger\cf4 time1 = \cf7 0\cf4 ;\
  2657. \f2\b \cf8 if
  2658. \f0\b0 \cf4 ([\cf5 g_default\cf4 \cf14 valueForKey\cf4 :s] && ([
  2659. \f2\b \cf8 self
  2660. \f0\b0 \cf4 .\cf15 roomJid\cf4 \cf14 length\cf4 ]>\cf7 0\cf4 )) \{\
  2661. time1 = [[\cf5 g_default\cf4 \cf14 valueForKey\cf4 :s] \cf14 integerValue\cf4 ];\
  2662. \}\
  2663. \cf10 NSNumber\cf4 *lastClearRecordTime = [\cf10 NSNumber\cf4 \cf14 numberWithInteger\cf4 :time1];\
  2664. \cf2 //
  2665. \f1 \'c9\'e8\'d6\'c3\'c9\'be\'b3\'fd\'cb\'f9\'d3\'d0\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc\'ca\'b1\'bc\'e4
  2666. \f0 \cf4 \
  2667. \cf10 NSInteger\cf4 time2 = \cf7 0\cf4 ;\
  2668. \f2\b \cf8 if
  2669. \f0\b0 \cf4 ([\cf5 g_default\cf4 \cf14 valueForKey\cf4 :\cf6 @"CLEARALLMSGRECORDTIME"\cf4 ] && ([
  2670. \f2\b \cf8 self
  2671. \f0\b0 \cf4 .\cf15 roomJid\cf4 \cf14 length\cf4 ]>\cf7 0\cf4 )) \{\
  2672. time2 = [[\cf5 g_default\cf4 \cf14 valueForKey\cf4 :\cf6 @"CLEARALLMSGRECORDTIME"\cf4 ] \cf14 integerValue\cf4 ];\
  2673. \}\
  2674. \cf10 NSNumber\cf4 *CLEARALLMSGRECORDTIME = [\cf10 NSNumber\cf4 \cf14 numberWithInteger\cf4 :time2];\
  2675. \cf2 //
  2676. \f1 \'c9\'e8\'d6\'c3\'c2\'fe\'d3\'ce\'b5\'c4\'ca\'b1\'bc\'e4
  2677. \f0 \cf4 \
  2678. \cf10 NSNumber\cf4 *synTime = [\cf10 NSNumber\cf4 \cf14 numberWithLong\cf4 :starTime];\
  2679. \
  2680. \
  2681. \cf2 //
  2682. \f1 \'c8\'eb\'c8\'ba\'ca\'b1\'bc\'e4
  2683. \f0 \cf4 \
  2684. \cf10 NSInteger\cf4 time3 = \cf7 0\cf4 ;\
  2685. \f2\b \cf8 if
  2686. \f0\b0 \cf4 (createTime > \cf7 0\cf4 )\{\
  2687. time3 = [[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%f"\cf4 , createTime] \cf14 integerValue\cf4 ];\
  2688. \}\
  2689. \cf10 NSNumber\cf4 *joinTime = [\cf10 NSNumber\cf4 \cf14 numberWithInteger\cf4 :time3];\
  2690. \cf2 //
  2691. \f1 \'c5\'c5\'d0\'f2\'cb\'c4\'b8\'f6\'ca\'b1\'bc\'e4
  2692. \f0
  2693. \f1 \'c8\'eb\'c8\'ba\'ca\'b1\'bc\'e4
  2694. \f0 ,
  2695. \f1 \'c8\'ba\'d7\'e9\'c9\'be\'b3\'fd\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc\'ca\'b1\'bc\'e4
  2696. \f0 ,
  2697. \f1 \'c9\'e8\'d6\'c3\'c9\'be\'b3\'fd\'cb\'f9\'d3\'d0\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc\'ca\'b1\'bc\'e4
  2698. \f0 ,
  2699. \f1 \'c9\'e8\'d6\'c3\'c2\'fe\'d3\'ce\'b5\'c4\'ca\'b1\'bc\'e4
  2700. \f0 \cf4 \
  2701. \cf10 NSArray\cf4 *sortedArray = [\cf7 @[\cf4 joinTime,lastClearRecordTime,synTime,CLEARALLMSGRECORDTIME\cf7 ]\cf4 \cf14 sortedArrayUsingComparator\cf4 :^\cf10 NSComparisonResult\cf4 (
  2702. \f2\b \cf8 id
  2703. \f0\b0 \cf4
  2704. \f2\b \cf8 _Nonnull
  2705. \f0\b0 \cf4 obj1,
  2706. \f2\b \cf8 id
  2707. \f0\b0 \cf4
  2708. \f2\b \cf8 _Nonnull
  2709. \f0\b0 \cf4 obj2) \{\
  2710. \cf10 NSComparisonResult\cf4 result = [obj1 \cf14 compare\cf4 : obj2];\
  2711. \f2\b \cf8 return
  2712. \f0\b0 \cf4 result;\
  2713. \}];\
  2714. \cf10 NSNumber\cf4 *time = [sortedArray \cf14 lastObject\cf4 ];\
  2715. starTime = [time \cf14 longValue\cf4 ];\
  2716. \cf2 // p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:[NSDate dateWithTimeIntervalSince1970:createTime]];\cf4 \
  2717. [\cf5 g_server\cf4 \cf15 tigaseMucMsgsWithRoomId\cf4 :s \cf15 StartTime\cf4 :starTime \cf15 EndTime\cf4 :endTime \cf15 PageIndex\cf4 :\cf7 0\cf4 \cf15 PageSize\cf4 :\cf5 PAGECOUNT\cf4 \cf15 toView\cf4 :
  2718. \f2\b \cf8 self
  2719. \f0\b0 \cf4 ];\
  2720. \}
  2721. \f2\b \cf8 else
  2722. \f0\b0 \cf4 \
  2723. [\cf5 g_server\cf4 \cf15 tigaseMsgsWithReceiver\cf4 :s \cf15 StartTime\cf4 :starTime \cf15 EndTime\cf4 :endTime \cf15 PageIndex\cf4 :\cf7 0\cf4 \cf15 toView\cf4 :
  2724. \f2\b \cf8 self
  2725. \f0\b0 \cf4 ];\
  2726. \
  2727. \f2\b \cf8 self
  2728. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 downloadTime\cf4 =
  2729. \f2\b \cf8 self
  2730. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 timeSend\cf4 ;\
  2731. [
  2732. \f2\b \cf8 self
  2733. \f0\b0 \cf4 .\cf15 chatPerson\cf4 \cf15 update\cf4 ];\
  2734. \}\
  2735. \
  2736. \f2\b \cf8 else
  2737. \f0\b0 \cf4 \{\
  2738. \
  2739. [
  2740. \f2\b \cf8 self
  2741. \f0\b0 \cf4 \cf15 refresh\cf4 :
  2742. \f2\b \cf8 nil
  2743. \f0\b0 \cf4 ];\
  2744. \}\
  2745. \}\
  2746. \
  2747. - (
  2748. \f2\b \cf8 void
  2749. \f0\b0 \cf4 ) \cf11 customView\cf4 \{\
  2750. [
  2751. \f2\b \cf8 self
  2752. \f0\b0 \cf4 \cf15 createHeadAndFoot\cf4 ];\
  2753. \f2\b \cf8 self
  2754. \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 clipsToBounds\cf4 =
  2755. \f2\b \cf8 YES
  2756. \f0\b0 \cf4 ;\
  2757. \cf2 //
  2758. \f1 \'c9\'e8\'d6\'c3\'c1\'c4\'cc\'ec\'b1\'b3\'be\'b0\'cd\'bc\'c6\'ac
  2759. \f0 \cf4 \
  2760. \f2\b \cf8 self
  2761. \f0\b0 \cf4 .\cf15 backGroundImageView\cf4 = [[\cf10 UIImageView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 0\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf5 JX_SCREEN_HEIGHT\cf4 - \cf5 JX_SCREEN_BOTTOM\cf4 )];\
  2762. \f2\b \cf8 self
  2763. \f0\b0 \cf4 .\cf15 backGroundImageView\cf4 .\cf14 contentMode\cf4 = \cf14 UIViewContentModeScaleAspectFill\cf4 ;\
  2764. [
  2765. \f2\b \cf8 self
  2766. \f0\b0 \cf4 .\cf14 view\cf4 \cf14 insertSubview\cf4 :
  2767. \f2\b \cf8 self
  2768. \f0\b0 \cf4 .\cf15 backGroundImageView\cf4 \cf14 belowSubview\cf4 :\cf15 _table\cf4 ];\
  2769. \
  2770. \cf10 NSData\cf4 *imageData = [\cf5 g_constant\cf4 .\cf15 userBackGroundImage\cf4 \cf14 objectForKey\cf4 :
  2771. \f2\b \cf8 self
  2772. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 userId\cf4 ];\
  2773. \cf10 UIImage\cf4 *backGroundImage = [\cf10 UIImage\cf4 \cf14 imageWithContentsOfFile\cf4 :\cf5 kChatBackgroundImagePath\cf4 ];\
  2774. \f2\b \cf8 if
  2775. \f0\b0 \cf4 (imageData) \{\
  2776. \cf15 _table\cf4 .\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 clearColor\cf4 ];\
  2777. \f2\b \cf8 self
  2778. \f0\b0 \cf4 .\cf15 backGroundImageView\cf4 .\cf14 image\cf4 = [\cf10 UIImage\cf4 \cf14 imageWithData\cf4 :imageData];\
  2779. \}
  2780. \f2\b \cf8 else
  2781. \f0\b0 \cf4
  2782. \f2\b \cf8 if
  2783. \f0\b0 \cf4 (backGroundImage) \{\
  2784. \cf15 _table\cf4 .\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 clearColor\cf4 ];\
  2785. \f2\b \cf8 self
  2786. \f0\b0 \cf4 .\cf15 backGroundImageView\cf4 .\cf14 image\cf4 = backGroundImage;\
  2787. \
  2788. \}
  2789. \f2\b \cf8 else
  2790. \f0\b0 \cf4 \{\
  2791. \cf15 _table\cf4 .\cf14 backgroundColor\cf4 = \cf5 HEXCOLOR\cf4 (\cf7 0xF2F2F2\cf4 );\
  2792. \}\
  2793. \cf2 // _table.allowsSelection = NO;\cf4 \
  2794. \f2\b \cf8 self
  2795. \f0\b0 \cf4 .\cf15 isShowFooterPull\cf4 =
  2796. \f2\b \cf8 NO
  2797. \f0\b0 \cf4 ;\
  2798. \f2\b \cf8 self
  2799. \f0\b0 \cf4 .\cf15 isShowHeaderPull\cf4 =
  2800. \f2\b \cf8 YES
  2801. \f0\b0 \cf4 ;\
  2802. \cf2 // self.tableFooter.backgroundColor = HEXCOLOR(0xD0D0D0);\cf4 \
  2803. \
  2804. \cf10 CGFloat\cf4 width = \cf7 120\cf4 ;\
  2805. \f2\b \cf8 if
  2806. \f0\b0 \cf4 ([\cf5 g_constant\cf4 .\cf15 sysLanguage\cf4 \cf14 isEqualToString\cf4 :\cf6 @"zh"\cf4 ]) \{\
  2807. width = \cf7 80\cf4 ;\
  2808. \}\
  2809. \cf2 // if (!self.ished) \{\cf4 \
  2810. \
  2811. \cf2 // NSString *str = [NSString stringWithFormat:@"%@(%@)",chatPerson.userNickname,Localized(@"JX_OffLine")];\cf4 \
  2812. \cf2 // CGSize size = [str boundingRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@\{NSFontAttributeName:self.headerTitle.font\} context:nil].size;\cf4 \
  2813. \cf2 // CGFloat n = JX_SCREEN_WIDTH / 2 + size.width / 2;\cf4 \
  2814. \cf2 // CGFloat x = ((JX_SCREEN_WIDTH - n - (JX_SCREEN_WIDTH - btn.frame.origin.x)) / 2) - (width / 2) + n;\cf4 \
  2815. \
  2816. \cf2 // UIButton *readDelBut = [UIFactory createButtonWithImage:@"im_destroy"\cf4 \
  2817. \cf2 // highlight:nil\cf4 \
  2818. \cf2 // target:self\cf4 \
  2819. \cf2 // selector:@selector(switchValueChange:)];\cf4 \
  2820. \cf2 // readDelBut.custom_acceptEventInterval = .25f;\cf4 \
  2821. \cf2 // readDelBut.tag = 2000;\cf4 \
  2822. \cf2 // readDelBut.frame = CGRectMake(JX_SCREEN_WIDTH - 42 - 32, JX_SCREEN_TOP - 33, 22, 22);\cf4 \
  2823. \cf2 // readDelBut.layer.cornerRadius = readDelBut.frame.size.width / 2;\cf4 \
  2824. \cf2 // readDelBut.layer.masksToBounds = YES;\cf4 \
  2825. \cf2 // readDelBut.layer.borderWidth = 1;\cf4 \
  2826. \cf2 // readDelBut.layer.borderColor = [UIColor whiteColor].CGColor;\cf4 \
  2827. \cf2 // [self.tableHeader addSubview:readDelBut];\cf4 \
  2828. \
  2829. \cf14 NSLog\cf4 (\cf6 @"timetime203 -- %f"\cf4 , [[\cf10 NSDate\cf4 \cf14 date\cf4 ] \cf14 timeIntervalSince1970\cf4 ]);\
  2830. \cf14 dispatch_after\cf4 (\cf14 dispatch_time\cf4 (\cf5 DISPATCH_TIME_NOW\cf4 , (\cf10 int64_t\cf4 )(\cf7 0.3\cf4 * \cf5 NSEC_PER_SEC\cf4 )), \cf14 dispatch_get_main_queue\cf4 (), ^\{\
  2831. \cf9 memberData\cf4 *data = [
  2832. \f2\b \cf8 self
  2833. \f0\b0 \cf4 .\cf15 room\cf4 \cf15 getMember\cf4 :\cf5 g_myself\cf4 .\cf15 userId\cf4 ];\
  2834. \
  2835. \cf15 _moreView\cf4 =[\cf9 JXSelectImageView\cf4 \cf14 alloc\cf4 ];\
  2836. \cf15 _moreView\cf4 .\cf15 isDevice\cf4 = [
  2837. \f2\b \cf8 self
  2838. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 userId\cf4 \cf14 rangeOfString\cf4 :\cf5 MY_USER_ID\cf4 ].\cf14 location\cf4 != \cf14 NSNotFound\cf4 ;\
  2839. \cf15 _moreView\cf4 .\cf15 delegate\cf4 =
  2840. \f2\b \cf8 self
  2841. \f0\b0 \cf4 ;\
  2842. \cf15 _moreView\cf4 .\cf15 isGroupMessages\cf4 =
  2843. \f2\b \cf8 self
  2844. \f0\b0 \cf4 .\cf15 isGroupMessages\cf4 ;\
  2845. \cf15 _moreView\cf4 .\cf15 isGroup\cf4 = \cf15 _roomJid\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ;\
  2846. \cf15 _moreView\cf4 .\cf15 isWin\cf4 = [data.\cf15 role\cf4 \cf14 intValue\cf4 ] == \cf7 1\cf4 ;\
  2847. \cf15 _moreView\cf4 .\cf15 onImage\cf4 =
  2848. \f2\b \cf8 @selector
  2849. \f0\b0 \cf4 (pickPhoto);\
  2850. \
  2851. \f2\b \cf8 if
  2852. \f0\b0 \cf4 (
  2853. \f2\b \cf8 self
  2854. \f0\b0 \cf4 .\cf15 roomJid\cf4 ) \{\cf2 //
  2855. \f1 \'c8\'e7\'b9\'fb\'ca\'c7\'c8\'ba\'c1\'c4
  2856. \f0 \cf4 \
  2857. \cf15 _moreView\cf4 .\cf15 onGift\cf4 =
  2858. \f2\b \cf8 @selector
  2859. \f0\b0 \cf4 (sendGiftToRoom);\
  2860. \}
  2861. \f2\b \cf8 else
  2862. \f0\b0 \cf4 \{\
  2863. \cf15 _moreView\cf4 .\cf15 onGift\cf4 =
  2864. \f2\b \cf8 @selector
  2865. \f0\b0 \cf4 (sendGift);\
  2866. \cf15 _moreView\cf4 .\cf15 onTransfer\cf4 =
  2867. \f2\b \cf8 @selector
  2868. \f0\b0 \cf4 (onTransfer);\
  2869. \}\
  2870. \
  2871. \cf15 _moreView\cf4 .\cf15 onAudioChat\cf4 =
  2872. \f2\b \cf8 @selector
  2873. \f0\b0 \cf4 (onChatSip);\
  2874. \cf15 _moreView\cf4 .\cf15 onVideo\cf4 =
  2875. \f2\b \cf8 @selector
  2876. \f0\b0 \cf4 (pickVideo);\
  2877. \cf15 _moreView\cf4 .\cf15 onCard\cf4 =
  2878. \f2\b \cf8 @selector
  2879. \f0\b0 \cf4 (onCard);\
  2880. \cf15 _moreView\cf4 .\cf15 onFile\cf4 =
  2881. \f2\b \cf8 @selector
  2882. \f0\b0 \cf4 (onFile);\
  2883. \cf15 _moreView\cf4 .\cf15 onLocation\cf4 =
  2884. \f2\b \cf8 @selector
  2885. \f0\b0 \cf4 (onLocation);\
  2886. \cf15 _moreView\cf4 .\cf15 onCamera\cf4 =
  2887. \f2\b \cf8 @selector
  2888. \f0\b0 \cf4 (onCamera);\
  2889. \cf15 _moreView\cf4 .\cf15 onShake\cf4 =
  2890. \f2\b \cf8 @selector
  2891. \f0\b0 \cf4 (onShake);\
  2892. \cf15 _moreView\cf4 .\cf15 onCollection\cf4 =
  2893. \f2\b \cf8 @selector
  2894. \f0\b0 \cf4 (onCollection);\
  2895. \cf15 _moreView\cf4 .\cf15 onAddressBook\cf4 =
  2896. \f2\b \cf8 @selector
  2897. \f0\b0 \cf4 (onAddressBook);\
  2898. \cf15 _moreView\cf4 .\cf15 onGroupHelper\cf4 =
  2899. \f2\b \cf8 @selector
  2900. \f0\b0 \cf4 (onGroupHelper);\
  2901. \
  2902. \cf15 _moreView\cf4 = [\cf15 _moreView\cf4 \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 0\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf5 faceHeight\cf4 )];\
  2903. \
  2904. \cf15 _voice\cf4 = [[\cf9 JXVolumeView\cf4 \cf14 alloc\cf4 ]\cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 0\cf4 , \cf7 160\cf4 , \cf7 150\cf4 )];\
  2905. \cf15 _voice\cf4 .\cf14 center\cf4 =
  2906. \f2\b \cf8 self
  2907. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 center\cf4 ;\
  2908. \});\
  2909. [
  2910. \f2\b \cf8 self
  2911. \f0\b0 \cf4 \cf15 initAudio\cf4 ];\
  2912. \
  2913. \cf10 UIButton\cf4 * btn;\
  2914. \cf10 UIButton\cf4 *btn1;\
  2915. \f2\b \cf8 if
  2916. \f0\b0 \cf4 (
  2917. \f2\b \cf8 self
  2918. \f0\b0 \cf4 .\cf15 roomJid\cf4 )\{\
  2919. btn1 = [[\cf10 UIButton\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf5 JX_SCREEN_WIDTH\cf4 -\cf7 18\cf4 -\cf5 BTN_RANG_UP\cf4 *\cf7 2\cf4 , \cf5 JX_SCREEN_TOP\cf4 -\cf7 18\cf4 -\cf5 BTN_RANG_UP\cf4 *\cf7 2\cf4 , \cf7 18\cf4 +\cf5 BTN_RANG_UP\cf4 *\cf7 2\cf4 , \cf7 18\cf4 +\cf5 BTN_RANG_UP\cf4 *\cf7 2\cf4 )];\
  2920. [btn1 \cf14 addTarget\cf4 :
  2921. \f2\b \cf8 self
  2922. \f0\b0 \cf4 \cf14 action\cf4 :
  2923. \f2\b \cf8 @selector
  2924. \f0\b0 \cf4 (onMember) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  2925. [
  2926. \f2\b \cf8 self
  2927. \f0\b0 \cf4 .\cf15 tableHeader\cf4 \cf14 addSubview\cf4 :btn1];\
  2928. \
  2929. \
  2930. btn = [\cf9 UIFactory\cf4 \cf15 createButtonWithImage\cf4 :\cf6 @"chat_more_black"\cf4 \cf15 highlight\cf4 :
  2931. \f2\b \cf8 nil
  2932. \f0\b0 \cf4 \cf15 target\cf4 :
  2933. \f2\b \cf8 self
  2934. \f0\b0 \cf4 \cf15 selector\cf4 :
  2935. \f2\b \cf8 @selector
  2936. \f0\b0 \cf4 (onMember)];\
  2937. btn.\cf15 custom_acceptEventInterval\cf4 = \cf7 1.0f\cf4 ;\
  2938. btn.\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf5 BTN_RANG_UP\cf4 , \cf5 BTN_RANG_UP\cf4 , \cf7 18\cf4 , \cf7 18\cf4 );\
  2939. [btn1 \cf14 addSubview\cf4 :btn];\
  2940. \
  2941. [\cf5 g_server\cf4 \cf15 getRoomMember\cf4 :\cf15 roomId\cf4 \cf15 userId\cf4 :[\cf5 g_myself\cf4 .\cf15 userId\cf4 \cf14 intValue\cf4 ] \cf15 toView\cf4 :
  2942. \f2\b \cf8 self
  2943. \f0\b0 \cf4 ];\
  2944. \cf2 //
  2945. \f1 \'bb\'f1\'c8\'a1\'c8\'ba\'b3\'c9\'d4\'b1\'a3\'ba
  2946. \f0 \cf4 \
  2947. \cf10 NSArray\cf4 * memberArray = [\cf9 memberData\cf4 \cf15 fetchAllMembers\cf4 :\cf15 _room\cf4 .\cf15 roomId\cf4 ];\
  2948. \f2\b \cf8 self
  2949. \f0\b0 \cf4 .\cf14 title\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@(%ld)"\cf4 ,
  2950. \f2\b \cf8 self
  2951. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 userNickname\cf4 , memberArray.\cf14 count\cf4 ];\
  2952. \
  2953. \cf15 _dataArrGetGroundPersonArr\cf4 =[memberArray \cf14 mutableCopy\cf4 ];\
  2954. \
  2955. \
  2956. [
  2957. \f2\b \cf8 self
  2958. \f0\b0 \cf4 \cf15 setAudioIconFrame\cf4 ];\
  2959. \f2\b \cf8 if
  2960. \f0\b0 \cf4 (memberArray.\cf14 count\cf4 > \cf7 0\cf4 ) \{\cf2 //
  2961. \f1 \'b1\'be\'b5\'d8\'d3\'d0
  2962. \f0 \cf4 \
  2963. \cf15 _room\cf4 .\cf15 roomId\cf4 = \cf15 roomId\cf4 ;\
  2964. \cf15 _room\cf4 .\cf15 members\cf4 = [memberArray \cf14 mutableCopy\cf4 ];\
  2965. \
  2966. \cf9 memberData\cf4 *data = [
  2967. \f2\b \cf8 self
  2968. \f0\b0 \cf4 .\cf15 room\cf4 \cf15 getMember\cf4 :\cf5 g_myself\cf4 .\cf15 userId\cf4 ];\
  2969. \f2\b \cf8 if
  2970. \f0\b0 \cf4 ([data.\cf15 role\cf4 \cf14 intValue\cf4 ] == \cf7 1\cf4 || [data.\cf15 role\cf4 \cf14 intValue\cf4 ] == \cf7 2\cf4 ) \{\
  2971. \cf15 _isAdmin\cf4 =
  2972. \f2\b \cf8 YES
  2973. \f0\b0 \cf4 ;\
  2974. \}
  2975. \f2\b \cf8 else
  2976. \f0\b0 \cf4 \{\
  2977. \cf15 _isAdmin\cf4 =
  2978. \f2\b \cf8 NO
  2979. \f0\b0 \cf4 ;\
  2980. \}\
  2981. \}
  2982. \f2\b \cf8 else
  2983. \f0\b0 \cf4 \{\
  2984. \
  2985. \f2\b \cf8 self
  2986. \f0\b0 \cf4 .\cf15 isFirst\cf4 =
  2987. \f2\b \cf8 YES
  2988. \f0\b0 \cf4 ;\
  2989. [\cf5 g_server\cf4 \cf15 getRoom\cf4 :
  2990. \f2\b \cf8 self
  2991. \f0\b0 \cf4 .\cf15 room\cf4 .\cf15 roomId\cf4 \cf15 toView\cf4 :
  2992. \f2\b \cf8 self
  2993. \f0\b0 \cf4 ];\
  2994. \cf2 // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\cf4 \
  2995. [\cf5 g_server\cf4 \cf15 listRoomMember\cf4 :\cf15 roomId\cf4 \cf15 page\cf4 :\cf7 0\cf4 \cf15 toView\cf4 :
  2996. \f2\b \cf8 self
  2997. \f0\b0 \cf4 ];\
  2998. \cf2 // \});\cf4 \
  2999. \}\
  3000. \}
  3001. \f2\b \cf8 else
  3002. \f0\b0 \cf4 \{\
  3003. btn1 = [[\cf10 UIButton\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf5 JX_SCREEN_WIDTH\cf4 -\cf7 18\cf4 -\cf5 BTN_RANG_UP\cf4 *\cf7 2\cf4 , \cf5 JX_SCREEN_TOP\cf4 -\cf7 18\cf4 -\cf5 BTN_RANG_UP\cf4 *\cf7 2\cf4 , \cf7 18\cf4 +\cf5 BTN_RANG_UP\cf4 *\cf7 2\cf4 , \cf7 18\cf4 +\cf5 BTN_RANG_UP\cf4 *\cf7 2\cf4 )];\
  3004. [btn1 \cf14 addTarget\cf4 :
  3005. \f2\b \cf8 self
  3006. \f0\b0 \cf4 \cf14 action\cf4 :
  3007. \f2\b \cf8 @selector
  3008. \f0\b0 \cf4 (createRoom) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  3009. [
  3010. \f2\b \cf8 self
  3011. \f0\b0 \cf4 .\cf15 tableHeader\cf4 \cf14 addSubview\cf4 :btn1];\
  3012. \
  3013. btn = [\cf9 UIFactory\cf4 \cf15 createButtonWithImage\cf4 :\cf6 @"chat_more_black"\cf4 \
  3014. \cf15 highlight\cf4 :
  3015. \f2\b \cf8 nil
  3016. \f0\b0 \cf4 \
  3017. \cf15 target\cf4 :
  3018. \f2\b \cf8 self
  3019. \f0\b0 \cf4 \
  3020. \cf15 selector\cf4 :
  3021. \f2\b \cf8 @selector
  3022. \f0\b0 \cf4 (createRoom)];\
  3023. btn.\cf15 custom_acceptEventInterval\cf4 = \cf7 1.0f\cf4 ;\
  3024. btn.\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf5 BTN_RANG_UP\cf4 , \cf5 BTN_RANG_UP\cf4 , \cf7 18\cf4 , \cf7 18\cf4 );\
  3025. [btn1 \cf14 addSubview\cf4 :btn];\
  3026. \
  3027. \}\
  3028. \
  3029. \cf15 _audioIcon\cf4 = [[\cf10 UIImageView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf5 JX_SCREEN_TOP\cf4 - \cf7 30\cf4 , \cf7 16\cf4 , \cf7 16\cf4 )];\
  3030. \cf15 _audioIcon\cf4 .\cf14 image\cf4 = [\cf10 UIImage\cf4 \cf14 imageNamed\cf4 :\cf6 @"audioIcon"\cf4 ];\
  3031. [
  3032. \f2\b \cf8 self
  3033. \f0\b0 \cf4 .\cf15 tableHeader\cf4 \cf14 addSubview\cf4 :\cf15 _audioIcon\cf4 ];\
  3034. [
  3035. \f2\b \cf8 self
  3036. \f0\b0 \cf4 \cf15 setAudioIconFrame\cf4 ];\
  3037. \
  3038. \f2\b \cf8 if
  3039. \f0\b0 \cf4 (
  3040. \f2\b \cf8 self
  3041. \f0\b0 \cf4 .\cf15 courseId\cf4 .\cf14 length\cf4 > \cf7 0\cf4 || [\cf15 chatPerson\cf4 .\cf15 userId\cf4 \cf14 rangeOfString\cf4 :\cf5 MY_USER_ID\cf4 ].\cf14 location\cf4 != \cf14 NSNotFound\cf4 ||
  3042. \f2\b \cf8 self
  3043. \f0\b0 \cf4 .\cf15 isGroupMessages\cf4 ||
  3044. \f2\b \cf8 self
  3045. \f0\b0 \cf4 .\cf15 isHiddenFooter\cf4 ) \{\
  3046. \cf2 // readDelBut.hidden = YES;\cf4 \
  3047. btn.\cf14 hidden\cf4 =
  3048. \f2\b \cf8 YES
  3049. \f0\b0 \cf4 ;\
  3050. btn1.\cf14 hidden\cf4 =
  3051. \f2\b \cf8 YES
  3052. \f0\b0 \cf4 ;\
  3053. \}\
  3054. \
  3055. \cf2 /*\cf4 \
  3056. \cf2 if (self.isGroupMessages) \{\cf4 \
  3057. \cf2 self.isShowHeaderPull = NO;\cf4 \
  3058. \cf2 UIView *friendNamesView = [[UIView alloc] initWithFrame:CGRectMake(0, self.tableView.frame.origin.y, JX_SCREEN_WIDTH, 0)];\cf4 \
  3059. \cf2 friendNamesView.backgroundColor = [UIColor whiteColor];\cf4 \
  3060. \cf2 [self.view addSubview:friendNamesView];\cf4 \
  3061. \cf2 \cf4 \
  3062. \cf2 UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(15, 15, 300, 20)];\cf4 \
  3063. \cf2 label.font = [UIFont systemFontOfSize:15.0];\cf4 \
  3064. \cf2 label.textColor = [UIColor lightGrayColor];\cf4 \
  3065. \cf2 label.text = [NSString stringWithFormat:Localized(@"JX_YouWillSendMessagesToFriends"),_userIds.count];\cf4 \
  3066. \cf2 [friendNamesView addSubview:label];\cf4 \
  3067. \cf2 \cf4 \
  3068. \cf2 NSMutableString *names = [NSMutableString string];\cf4 \
  3069. \cf2 for (NSInteger i = 0; i < _userNames.count; i ++) \{\cf4 \
  3070. \cf2 NSString *str = _userNames[i];\cf4 \
  3071. \cf2 if (i == 0) \{\cf4 \
  3072. \cf2 [names appendString:[NSString stringWithFormat:@"[\\"%@",str]];\cf4 \
  3073. \cf2 \}\cf4 \
  3074. \cf2 else if (i == _userNames.count - 1) \{\cf4 \
  3075. \cf2 [names appendString:[NSString stringWithFormat:@",%@\\"]", str]];\cf4 \
  3076. \cf2 \}\cf4 \
  3077. \cf2 else \{\cf4 \
  3078. \cf2 [names appendString:[NSString stringWithFormat:@",%@", str]];\cf4 \
  3079. \cf2 \}\cf4 \
  3080. \cf2 if (_userNames.count == 1) \{\cf4 \
  3081. \cf2 [names appendString:@"\\"]"];\cf4 \
  3082. \cf2 \}\cf4 \
  3083. \cf2 \}\cf4 \
  3084. \cf2 \cf4 \
  3085. \cf2 CGSize size = [names boundingRectWithSize:CGSizeMake(friendNamesView.frame.size.width - 30, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@\{NSFontAttributeName : [UIFont systemFontOfSize:17.0]\} context:nil].size;\cf4 \
  3086. \cf2 \cf4 \
  3087. \cf2 CGFloat height = 0;\cf4 \
  3088. \cf2 if (size.height > 200) \{\cf4 \
  3089. \cf2 height = 200;\cf4 \
  3090. \cf2 \}else \{\cf4 \
  3091. \cf2 height = size.height;\cf4 \
  3092. \cf2 \}\cf4 \
  3093. \cf2 UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame: CGRectMake(15, CGRectGetMaxY(label.frame) + 10, friendNamesView.frame.size.width - 30, height)];\cf4 \
  3094. \cf2 [friendNamesView addSubview:scrollView];\cf4 \
  3095. \cf2 \cf4 \
  3096. \cf2 UILabel *namesLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, friendNamesView.frame.size.width - 30, size.height)];\cf4 \
  3097. \cf2 namesLabel.font = [UIFont systemFontOfSize:17.0];\cf4 \
  3098. \cf2 namesLabel.textColor = [UIColor blackColor];\cf4 \
  3099. \cf2 namesLabel.numberOfLines = 0;\cf4 \
  3100. \cf2 namesLabel.text = names;\cf4 \
  3101. \cf2 [scrollView addSubview:namesLabel];\cf4 \
  3102. \cf2 scrollView.contentSize = CGSizeMake(namesLabel.frame.size.width, size.height);\cf4 \
  3103. \cf2 \cf4 \
  3104. \cf2 friendNamesView.frame = CGRectMake(friendNamesView.frame.origin.x, friendNamesView.frame.origin.y, friendNamesView.frame.size.width, scrollView.frame.origin.y + scrollView.frame.size.height + 15);\cf4 \
  3105. \cf2 NSLog(@"%@", friendNamesView);\cf4 \
  3106. \cf2 \}\cf4 \
  3107. \cf2 */\cf4 \
  3108. \
  3109. \f2\b \cf8 if
  3110. \f0\b0 \cf4 (
  3111. \f2\b \cf8 self
  3112. \f0\b0 \cf4 .\cf15 isGroupMessages\cf4 ) \{\
  3113. \f2\b \cf8 self
  3114. \f0\b0 \cf4 .\cf15 isShowHeaderPull\cf4 =
  3115. \f2\b \cf8 NO
  3116. \f0\b0 \cf4 ;\
  3117. \cf10 UIView\cf4 *friendNamesView = [[\cf10 UIView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 0\cf4 ,
  3118. \f2\b \cf8 self
  3119. \f0\b0 \cf4 .\cf15 tableView\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 y\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf7 0\cf4 )];\
  3120. friendNamesView.\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 whiteColor\cf4 ];\
  3121. [
  3122. \f2\b \cf8 self
  3123. \f0\b0 \cf4 .\cf14 view\cf4 \cf14 addSubview\cf4 :friendNamesView];\
  3124. \
  3125. \cf10 UILabel\cf4 *label = [[\cf10 UILabel\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 15\cf4 , \cf7 15\cf4 , \cf7 300\cf4 , \cf7 20\cf4 )];\
  3126. label.\cf14 font\cf4 = [\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 15.0\cf4 ];\
  3127. label.\cf14 textColor\cf4 = [\cf10 UIColor\cf4 \cf14 lightGrayColor\cf4 ];\
  3128. label.\cf14 text\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf5 Localized\cf4 (\cf6 @"JX_YouWillSendMessagesToFriends"\cf4 ),\cf15 _userIds\cf4 .\cf14 count\cf4 ];\
  3129. [friendNamesView \cf14 addSubview\cf4 :label];\
  3130. \
  3131. \cf15 _names\cf4 = [\cf10 NSMutableString\cf4 \cf14 string\cf4 ];\
  3132. \f2\b \cf8 for
  3133. \f0\b0 \cf4 (\cf10 NSInteger\cf4 i = \cf7 0\cf4 ; i < \cf15 _userNames\cf4 .\cf14 count\cf4 ; i ++) \{\
  3134. \cf10 NSString\cf4 *str = \cf15 _userNames\cf4 [i];\
  3135. \f2\b \cf8 if
  3136. \f0\b0 \cf4 (i == \cf7 0\cf4 ) \{\
  3137. \f2\b \cf8 if
  3138. \f0\b0 \cf4 (
  3139. \f2\b \cf8 self
  3140. \f0\b0 \cf4 .\cf15 isCYMSGgroupANDFriendy\cf4 ) \{\
  3141. [\cf15 _names\cf4 \cf14 appendString\cf4 :\cf6 @"
  3142. \f1 \'ba\'c3\'d3\'d1
  3143. \f0 : "\cf4 ];\
  3144. \}\
  3145. [\cf15 _names\cf4 \cf14 appendString\cf4 :[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"[\\"%@"\cf4 ,str]];\
  3146. \}\
  3147. \f2\b \cf8 else
  3148. \f0\b0 \cf4
  3149. \f2\b \cf8 if
  3150. \f0\b0 \cf4 (i == \cf15 _userNames\cf4 .\cf14 count\cf4 - \cf7 1\cf4 ) \{\
  3151. [\cf15 _names\cf4 \cf14 appendString\cf4 :[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @",%@\\"]"\cf4 , str]];\
  3152. \}\
  3153. \f2\b \cf8 else
  3154. \f0\b0 \cf4 \{\
  3155. [\cf15 _names\cf4 \cf14 appendString\cf4 :[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @",%@"\cf4 , str]];\
  3156. \}\
  3157. \f2\b \cf8 if
  3158. \f0\b0 \cf4 (\cf15 _userNames\cf4 .\cf14 count\cf4 == \cf7 1\cf4 ) \{\
  3159. [\cf15 _names\cf4 \cf14 appendString\cf4 :\cf6 @"\\"]"\cf4 ];\
  3160. \}\
  3161. \}\
  3162. \
  3163. \f2\b \cf8 if
  3164. \f0\b0 \cf4 (
  3165. \f2\b \cf8 self
  3166. \f0\b0 \cf4 .\cf15 isCYMSGgroupANDFriendy\cf4 ) \{\
  3167. label.\cf14 text\cf4 = \cf6 @"
  3168. \f1 \'c4\'e3\'bd\'ab\'b7\'a2\'cf\'fb\'cf\'a2\'b8\'f8\'a3\'ba
  3169. \f0 "\cf4 ;\
  3170. \cf10 NSMutableString\cf4 *nameStr = [\cf10 NSMutableString\cf4 \cf14 string\cf4 ];\
  3171. \f2\b \cf8 for
  3172. \f0\b0 \cf4 (\cf10 NSInteger\cf4 i = \cf7 0\cf4 ; i < \cf15 _userNmaesWithFriend\cf4 .\cf14 count\cf4 ; i ++) \{\
  3173. \cf10 NSString\cf4 *str = \cf15 _userNmaesWithFriend\cf4 [i];\
  3174. \f2\b \cf8 if
  3175. \f0\b0 \cf4 (i == \cf7 0\cf4 ) \{\
  3176. \f2\b \cf8 if
  3177. \f0\b0 \cf4 (
  3178. \f2\b \cf8 self
  3179. \f0\b0 \cf4 .\cf15 isCYMSGgroupANDFriendy\cf4 ) \{\
  3180. [nameStr \cf14 appendString\cf4 :\cf6 @"
  3181. \f1 \'b1\'ea\'c7\'a9
  3182. \f0 : "\cf4 ];\
  3183. \}\
  3184. [nameStr \cf14 appendString\cf4 :[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"[\\"%@"\cf4 ,str]];\
  3185. \}\
  3186. \f2\b \cf8 else
  3187. \f0\b0 \cf4
  3188. \f2\b \cf8 if
  3189. \f0\b0 \cf4 (i == \cf15 _userNmaesWithFriend\cf4 .\cf14 count\cf4 - \cf7 1\cf4 ) \{\
  3190. [nameStr \cf14 appendString\cf4 :[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @",%@\\"]"\cf4 , str]];\
  3191. \}\
  3192. \f2\b \cf8 else
  3193. \f0\b0 \cf4 \{\
  3194. [nameStr \cf14 appendString\cf4 :[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @",%@"\cf4 , str]];\
  3195. \}\
  3196. \f2\b \cf8 if
  3197. \f0\b0 \cf4 (\cf15 _userNmaesWithFriend\cf4 .\cf14 count\cf4 == \cf7 1\cf4 ) \{\
  3198. [nameStr \cf14 appendString\cf4 :\cf6 @"\\"]"\cf4 ];\
  3199. \}\
  3200. \}\
  3201. \cf15 _names\cf4 = nameStr;\
  3202. \}\
  3203. \
  3204. \cf10 CGSize\cf4 size = [\cf15 _names\cf4 \cf14 boundingRectWithSize\cf4 :\cf14 CGSizeMake\cf4 (friendNamesView.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 - \cf7 30\cf4 , \cf5 MAXFLOAT\cf4 ) \cf14 options\cf4 :\cf14 NSStringDrawingUsesLineFragmentOrigin\cf4 \cf14 attributes\cf4 :\cf7 @\{\cf14 NSFontAttributeName\cf4 : [\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 17.0\cf4 ]\cf7 \}\cf4 \cf14 context\cf4 :
  3205. \f2\b \cf8 nil
  3206. \f0\b0 \cf4 ].\cf14 size\cf4 ;\
  3207. \
  3208. \cf10 CGFloat\cf4 height = \cf7 0\cf4 ;\
  3209. \f2\b \cf8 if
  3210. \f0\b0 \cf4 (size.\cf14 height\cf4 > \cf7 200\cf4 ) \{\
  3211. height = \cf7 200\cf4 ;\
  3212. \}
  3213. \f2\b \cf8 else
  3214. \f0\b0 \cf4 \{\
  3215. height = size.\cf14 height\cf4 ;\
  3216. \}\
  3217. \
  3218. \f2\b \cf8 if
  3219. \f0\b0 \cf4 (
  3220. \f2\b \cf8 self
  3221. \f0\b0 \cf4 .\cf15 isCYMSGgroupANDFriendy\cf4 ) \{\
  3222. height += \cf7 40\cf4 ;\
  3223. \}\
  3224. \
  3225. \cf10 UIScrollView\cf4 *scrollView;\
  3226. \f2\b \cf8 if
  3227. \f0\b0 \cf4 (
  3228. \f2\b \cf8 self
  3229. \f0\b0 \cf4 .\cf15 isCYMSGgroupANDFriendy\cf4 ) \{\
  3230. scrollView = [[\cf10 UIScrollView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 : \cf14 CGRectMake\cf4 (\cf7 15\cf4 , \cf14 CGRectGetMaxY\cf4 (label.\cf14 frame\cf4 ) + \cf7 10\cf4 , friendNamesView.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 - \cf7 30\cf4 , \cf7 70\cf4 )];\
  3231. \}
  3232. \f2\b \cf8 else
  3233. \f0\b0 \cf4 \{\
  3234. scrollView = [[\cf10 UIScrollView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 : \cf14 CGRectMake\cf4 (\cf7 15\cf4 , \cf14 CGRectGetMaxY\cf4 (label.\cf14 frame\cf4 ) + \cf7 10\cf4 , friendNamesView.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 - \cf7 30\cf4 , height)];\
  3235. \}\
  3236. \
  3237. \cf2 // UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame: CGRectMake(15, CGRectGetMaxY(label.frame) + 10, friendNamesView.frame.size.width - 30, height)];\cf4 \
  3238. [friendNamesView \cf14 addSubview\cf4 :scrollView];\
  3239. \
  3240. \
  3241. \f2\b \cf8 if
  3242. \f0\b0 \cf4 (
  3243. \f2\b \cf8 self
  3244. \f0\b0 \cf4 .\cf15 isCYMSGgroupANDFriendy\cf4 ) \{\
  3245. size.\cf14 height\cf4 = \cf7 30\cf4 ;\
  3246. \}\
  3247. \cf10 UILabel\cf4 *namesLabel = [[\cf10 UILabel\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 15\cf4 , \cf7 0\cf4 , friendNamesView.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 - \cf7 30\cf4 , size.\cf14 height\cf4 )];\
  3248. \
  3249. namesLabel.\cf14 font\cf4 = [\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 17.0\cf4 ];\
  3250. namesLabel.\cf14 textColor\cf4 = [\cf10 UIColor\cf4 \cf14 blackColor\cf4 ];\
  3251. namesLabel.\cf14 numberOfLines\cf4 = \cf7 0\cf4 ;\
  3252. namesLabel.\cf14 text\cf4 = \cf15 _names\cf4 ;\
  3253. [scrollView \cf14 addSubview\cf4 :namesLabel];\
  3254. \
  3255. \f2\b \cf8 if
  3256. \f0\b0 \cf4 (
  3257. \f2\b \cf8 self
  3258. \f0\b0 \cf4 .\cf15 isCYMSGgroupANDFriendy\cf4 ) \{\
  3259. \cf15 _names2\cf4 = [\cf10 NSMutableString\cf4 \cf14 string\cf4 ];\
  3260. \f2\b \cf8 for
  3261. \f0\b0 \cf4 (\cf10 NSInteger\cf4 i = \cf7 0\cf4 ; i < \cf15 _userNamesWithGroup\cf4 .\cf14 count\cf4 ; i ++) \{\
  3262. \cf10 NSString\cf4 *str = \cf15 _userNamesWithGroup\cf4 [i];\
  3263. \f2\b \cf8 if
  3264. \f0\b0 \cf4 (i == \cf7 0\cf4 ) \{\
  3265. \f2\b \cf8 if
  3266. \f0\b0 \cf4 (
  3267. \f2\b \cf8 self
  3268. \f0\b0 \cf4 .\cf15 isCYMSGgroupANDFriendy\cf4 ) \{\
  3269. [\cf15 _names2\cf4 \cf14 appendString\cf4 :\cf6 @"
  3270. \f1 \'c8\'ba\'d7\'e9
  3271. \f0 : "\cf4 ];\
  3272. \}\
  3273. [\cf15 _names2\cf4 \cf14 appendString\cf4 :[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"[\\"%@"\cf4 ,str]];\
  3274. \}\
  3275. \f2\b \cf8 else
  3276. \f0\b0 \cf4
  3277. \f2\b \cf8 if
  3278. \f0\b0 \cf4 (i == \cf15 _userNamesWithGroup\cf4 .\cf14 count\cf4 - \cf7 1\cf4 ) \{\
  3279. [\cf15 _names2\cf4 \cf14 appendString\cf4 :[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @",%@\\"]"\cf4 , str]];\
  3280. \}\
  3281. \f2\b \cf8 else
  3282. \f0\b0 \cf4 \{\
  3283. [\cf15 _names2\cf4 \cf14 appendString\cf4 :[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @",%@"\cf4 , str]];\
  3284. \}\
  3285. \f2\b \cf8 if
  3286. \f0\b0 \cf4 (\cf15 _userNamesWithGroup\cf4 .\cf14 count\cf4 == \cf7 1\cf4 ) \{\
  3287. [\cf15 _names2\cf4 \cf14 appendString\cf4 :\cf6 @"\\"]"\cf4 ];\
  3288. \}\
  3289. \}\
  3290. \
  3291. \
  3292. \
  3293. \cf10 UILabel\cf4 *namesLabel2 = [[\cf10 UILabel\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 15\cf4 , namesLabel.\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 y\cf4 + size.\cf14 height\cf4 , friendNamesView.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 - \cf7 30\cf4 , \cf7 30\cf4 )];\
  3294. namesLabel2.\cf14 font\cf4 = [\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 17.0\cf4 ];\
  3295. namesLabel2.\cf14 textColor\cf4 = [\cf10 UIColor\cf4 \cf14 blackColor\cf4 ];\
  3296. namesLabel2.\cf14 numberOfLines\cf4 = \cf7 0\cf4 ;\
  3297. namesLabel2.\cf14 text\cf4 = \cf15 _names2\cf4 ;\
  3298. [scrollView \cf14 addSubview\cf4 :namesLabel2];\
  3299. \
  3300. size.\cf14 height\cf4 = \cf7 400\cf4 ;\
  3301. \}\
  3302. \
  3303. scrollView.\cf14 contentSize\cf4 = \cf14 CGSizeMake\cf4 (namesLabel.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 , size.\cf14 height\cf4 );\
  3304. \
  3305. friendNamesView.\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (friendNamesView.\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 x\cf4 , friendNamesView.\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 y\cf4 , friendNamesView.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 , scrollView.\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 y\cf4 + scrollView.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 + \cf7 15\cf4 );\
  3306. \cf14 NSLog\cf4 (\cf6 @"%@"\cf4 , friendNamesView);\
  3307. \}\
  3308. \
  3309. \cf2 //
  3310. \f1 \'bd\'d8\'c6\'c1
  3311. \f0 \cf4 \
  3312. \f2\b \cf8 self
  3313. \f0\b0 \cf4 .\cf15 screenShotView\cf4 = [[\cf10 UIView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf5 JX_SCREEN_WIDTH\cf4 - \cf7 80\cf4 - \cf7 10\cf4 , \cf7 100\cf4 , \cf7 80\cf4 , \cf7 130\cf4 )];\
  3314. \f2\b \cf8 self
  3315. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 whiteColor\cf4 ];\
  3316. \f2\b \cf8 self
  3317. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 layer\cf4 .\cf14 cornerRadius\cf4 = \cf7 5.0\cf4 ;\
  3318. \f2\b \cf8 self
  3319. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 layer\cf4 .\cf14 masksToBounds\cf4 =
  3320. \f2\b \cf8 YES
  3321. \f0\b0 \cf4 ;\
  3322. \f2\b \cf8 self
  3323. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 hidden\cf4 =
  3324. \f2\b \cf8 YES
  3325. \f0\b0 \cf4 ;\
  3326. [
  3327. \f2\b \cf8 self
  3328. \f0\b0 \cf4 .\cf14 view\cf4 \cf14 addSubview\cf4 :
  3329. \f2\b \cf8 self
  3330. \f0\b0 \cf4 .\cf15 screenShotView\cf4 ];\
  3331. \
  3332. \cf10 UITapGestureRecognizer\cf4 *tap = [[\cf10 UITapGestureRecognizer\cf4 \cf14 alloc\cf4 ] \cf14 initWithTarget\cf4 :
  3333. \f2\b \cf8 self
  3334. \f0\b0 \cf4 \cf14 action\cf4 :
  3335. \f2\b \cf8 @selector
  3336. \f0\b0 \cf4 (screenShotViewAction:)];\
  3337. [
  3338. \f2\b \cf8 self
  3339. \f0\b0 \cf4 .\cf15 screenShotView\cf4 \cf14 addGestureRecognizer\cf4 :tap];\
  3340. \
  3341. \cf10 UILabel\cf4 *screenShotLabel = [[\cf10 UILabel\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 5\cf4 , \cf7 0\cf4 ,
  3342. \f2\b \cf8 self
  3343. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 - \cf7 10\cf4 , \cf7 40\cf4 )];\
  3344. screenShotLabel.\cf14 font\cf4 = [\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 11.0\cf4 ];\
  3345. screenShotLabel.\cf14 numberOfLines\cf4 = \cf7 0\cf4 ;\
  3346. screenShotLabel.\cf14 text\cf4 = \cf5 Localized\cf4 (\cf6 @"JX_ThePhotosYouMightWantToSend"\cf4 );\
  3347. [
  3348. \f2\b \cf8 self
  3349. \f0\b0 \cf4 .\cf15 screenShotView\cf4 \cf14 addSubview\cf4 :screenShotLabel];\
  3350. \
  3351. \f2\b \cf8 self
  3352. \f0\b0 \cf4 .\cf15 screenShotImageView\cf4 = [[\cf10 UIImageView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 5\cf4 , \cf14 CGRectGetMaxY\cf4 (screenShotLabel.\cf14 frame\cf4 ),
  3353. \f2\b \cf8 self
  3354. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 - \cf7 10\cf4 ,
  3355. \f2\b \cf8 self
  3356. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 - screenShotLabel.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 - \cf7 5\cf4 )];\
  3357. \f2\b \cf8 self
  3358. \f0\b0 \cf4 .\cf15 screenShotImageView\cf4 .\cf14 layer\cf4 .\cf14 cornerRadius\cf4 = \cf7 5.0\cf4 ;\
  3359. \f2\b \cf8 self
  3360. \f0\b0 \cf4 .\cf15 screenShotImageView\cf4 .\cf14 layer\cf4 .\cf14 masksToBounds\cf4 =
  3361. \f2\b \cf8 YES
  3362. \f0\b0 \cf4 ;\
  3363. \cf2 // self.screenShotImageView.image = [UIImage imageWithContentsOfFile:ScreenShotImage];\cf4 \
  3364. [
  3365. \f2\b \cf8 self
  3366. \f0\b0 \cf4 .\cf15 screenShotView\cf4 \cf14 addSubview\cf4 :
  3367. \f2\b \cf8 self
  3368. \f0\b0 \cf4 .\cf15 screenShotImageView\cf4 ];\
  3369. \
  3370. \cf2 //
  3371. \f1 \'d0\'c2\'cf\'fb\'cf\'a2\'cc\'f8\'d7\'aa
  3372. \f0 \cf4 \
  3373. \cf15 _jumpNewMsgBtn\cf4 = [[\cf10 UIButton\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf5 JX_SCREEN_WIDTH\cf4 - \cf7 105\cf4 , \cf5 JX_SCREEN_TOP\cf4 + \cf7 20\cf4 , \cf7 120\cf4 , \cf7 30\cf4 )];\
  3374. \cf15 _jumpNewMsgBtn\cf4 .\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 whiteColor\cf4 ];\
  3375. \cf15 _jumpNewMsgBtn\cf4 .\cf14 layer\cf4 .\cf14 cornerRadius\cf4 = \cf15 _jumpNewMsgBtn\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 / \cf7 2\cf4 ;\
  3376. \cf15 _jumpNewMsgBtn\cf4 .\cf14 layer\cf4 .\cf14 masksToBounds\cf4 =
  3377. \f2\b \cf8 YES
  3378. \f0\b0 \cf4 ;\
  3379. [\cf15 _jumpNewMsgBtn\cf4 \cf14 addTarget\cf4 :
  3380. \f2\b \cf8 self
  3381. \f0\b0 \cf4 \cf14 action\cf4 :
  3382. \f2\b \cf8 @selector
  3383. \f0\b0 \cf4 (jumpNewMsgBtnAction) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  3384. [
  3385. \f2\b \cf8 self
  3386. \f0\b0 \cf4 .\cf14 view\cf4 \cf14 addSubview\cf4 :\cf15 _jumpNewMsgBtn\cf4 ];\
  3387. \
  3388. \cf10 UILabel\cf4 *newMsgLabel = [[\cf10 UILabel\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf15 _jumpNewMsgBtn\cf4 .\cf14 bounds\cf4 ];\
  3389. newMsgLabel.\cf14 text\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%d%@"\cf4 ,
  3390. \f2\b \cf8 self
  3391. \f0\b0 \cf4 .\cf15 newMsgCount\cf4 ,\cf5 Localized\cf4 (\cf6 @"JX_NewMessages"\cf4 )];\
  3392. newMsgLabel.\cf14 font\cf4 = [\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 13.0\cf4 ];\
  3393. newMsgLabel.\cf14 textAlignment\cf4 = \cf14 NSTextAlignmentCenter\cf4 ;\
  3394. newMsgLabel.\cf14 textColor\cf4 = \cf5 HEXCOLOR\cf4 (\cf7 0x4FC557\cf4 );\
  3395. [\cf15 _jumpNewMsgBtn\cf4 \cf14 addSubview\cf4 :newMsgLabel];\
  3396. \
  3397. \cf10 UIImageView\cf4 *imageView = [[\cf10 UIImageView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 10\cf4 , \cf7 10\cf4 , \cf7 10\cf4 , \cf7 10\cf4 )];\
  3398. imageView.\cf14 image\cf4 = [\cf10 UIImage\cf4 \cf14 imageNamed\cf4 :\cf6 @"doubleArrow_up"\cf4 ];\
  3399. [\cf15 _jumpNewMsgBtn\cf4 \cf14 addSubview\cf4 :imageView];\
  3400. \
  3401. \f2\b \cf8 if
  3402. \f0\b0 \cf4 (
  3403. \f2\b \cf8 self
  3404. \f0\b0 \cf4 .\cf15 newMsgCount\cf4 > \cf7 20\cf4 ) \{\
  3405. \cf15 _jumpNewMsgBtn\cf4 .\cf14 hidden\cf4 =
  3406. \f2\b \cf8 NO
  3407. \f0\b0 \cf4 ;\
  3408. \}
  3409. \f2\b \cf8 else
  3410. \f0\b0 \cf4 \{\
  3411. \cf15 _jumpNewMsgBtn\cf4 .\cf14 hidden\cf4 =
  3412. \f2\b \cf8 YES
  3413. \f0\b0 \cf4 ;\
  3414. \}\
  3415. \
  3416. \}\
  3417. \
  3418. - (
  3419. \f2\b \cf8 void
  3420. \f0\b0 \cf4 )\cf11 setAudioIconFrame\cf4 \{\
  3421. \
  3422. \cf10 CGSize\cf4 size = [
  3423. \f2\b \cf8 self
  3424. \f0\b0 \cf4 .\cf14 title\cf4 \cf14 boundingRectWithSize\cf4 :\cf14 CGSizeMake\cf4 (\cf5 MAXFLOAT\cf4 , \cf5 MAXFLOAT\cf4 ) \cf14 options\cf4 :\cf14 NSStringDrawingUsesLineFragmentOrigin\cf4 \cf14 attributes\cf4 :\cf7 @\{\cf14 NSFontAttributeName\cf4 :[\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 18.0\cf4 ]\cf7 \}\cf4 \cf14 context\cf4 :
  3425. \f2\b \cf8 nil
  3426. \f0\b0 \cf4 ].\cf14 size\cf4 ;\
  3427. \cf10 CGFloat\cf4 x = \cf5 JX_SCREEN_WIDTH\cf4 /\cf7 2\cf4 + size.\cf14 width\cf4 /\cf7 2\cf4 + \cf7 2\cf4 ;\
  3428. \cf15 _audioIcon\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (x, \cf15 _audioIcon\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 y\cf4 , \cf15 _audioIcon\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 , \cf15 _audioIcon\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 );\
  3429. \
  3430. \f2\b \cf8 BOOL
  3431. \f0\b0 \cf4 flag = [\cf5 g_default\cf4 \cf14 boolForKey\cf4 :\cf5 kChatVCMessageAudioIsNotPlayback\cf4 ];\
  3432. \cf15 _audioIcon\cf4 .\cf14 hidden\cf4 = !flag;\
  3433. \}\
  3434. \
  3435. - (
  3436. \f2\b \cf8 void
  3437. \f0\b0 \cf4 )\cf11 setupMoreView\cf4 :(\cf10 NSArray\cf4 *)array \{\
  3438. \f2\b \cf8 if
  3439. \f0\b0 \cf4 (array !=
  3440. \f2\b \cf8 nil
  3441. \f0\b0 \cf4 ) \{\
  3442. [\cf15 _recordBtnLeft\cf4 \cf14 setBackgroundImage\cf4 :[\cf10 UIImage\cf4 \cf14 imageNamed\cf4 :\cf6 @"chat_back_reply"\cf4 ] \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  3443. [\cf15 _recordBtnLeft\cf4 \cf14 removeTarget\cf4 :
  3444. \f2\b \cf8 self
  3445. \f0\b0 \cf4 \cf14 action\cf4 :
  3446. \f2\b \cf8 @selector
  3447. \f0\b0 \cf4 (recordSwitch:) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  3448. [\cf15 _recordBtnLeft\cf4 \cf14 addTarget\cf4 :
  3449. \f2\b \cf8 self
  3450. \f0\b0 \cf4 \cf14 action\cf4 :
  3451. \f2\b \cf8 @selector
  3452. \f0\b0 \cf4 (onBackToDefault) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  3453. \
  3454. \cf15 _helperArr\cf4 = array;\
  3455. \cf2 //
  3456. \f1 \'c8\'ba\'d6\'fa\'ca\'d6\'ca\'c2\'bc\'fe
  3457. \f0 \cf4 \
  3458. \cf15 _moreView\cf4 .\cf15 onGroupHelperList\cf4 =
  3459. \f2\b \cf8 @selector
  3460. \f0\b0 \cf4 (onGroupHelperList);\
  3461. \cf15 _moreView\cf4 .\cf15 onDidView\cf4 =
  3462. \f2\b \cf8 @selector
  3463. \f0\b0 \cf4 (onDidView:);\
  3464. \cf15 _moreView\cf4 .\cf15 helpers\cf4 = array;\
  3465. \cf15 _moreView\cf4 .\cf15 scrollView\cf4 .\cf14 hidden\cf4 =
  3466. \f2\b \cf8 YES
  3467. \f0\b0 \cf4 ;\
  3468. \cf15 _moreView\cf4 .\cf15 helperScrollV\cf4 .\cf14 hidden\cf4 =
  3469. \f2\b \cf8 NO
  3470. \f0\b0 \cf4 ;\
  3471. \}
  3472. \f2\b \cf8 else
  3473. \f0\b0 \cf4 \{\
  3474. \
  3475. [\cf15 _recordBtnLeft\cf4 \cf14 setBackgroundImage\cf4 :[\cf10 UIImage\cf4 \cf14 imageNamed\cf4 :\cf6 @"im_input_ptt_normal"\cf4 ] \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  3476. [\cf15 _recordBtnLeft\cf4 \cf14 setBackgroundImage\cf4 :[\cf10 UIImage\cf4 \cf14 imageNamed\cf4 :\cf6 @"im_input_keyboard_normal"\cf4 ] \cf14 forState\cf4 :\cf14 UIControlStateSelected\cf4 ];\
  3477. [\cf15 _recordBtnLeft\cf4 \cf14 removeTarget\cf4 :
  3478. \f2\b \cf8 self
  3479. \f0\b0 \cf4 \cf14 action\cf4 :
  3480. \f2\b \cf8 @selector
  3481. \f0\b0 \cf4 (onBackToDefault) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  3482. [\cf15 _recordBtnLeft\cf4 \cf14 addTarget\cf4 :
  3483. \f2\b \cf8 self
  3484. \f0\b0 \cf4 \cf14 action\cf4 :
  3485. \f2\b \cf8 @selector
  3486. \f0\b0 \cf4 (recordSwitch:) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  3487. \
  3488. \cf15 _moreView\cf4 .\cf15 scrollView\cf4 .\cf14 hidden\cf4 =
  3489. \f2\b \cf8 NO
  3490. \f0\b0 \cf4 ;\
  3491. \cf15 _moreView\cf4 .\cf15 helperScrollV\cf4 .\cf14 hidden\cf4 =
  3492. \f2\b \cf8 YES
  3493. \f0\b0 \cf4 ;\
  3494. [\cf15 _moreView\cf4 \cf15 resetPageControl\cf4 ];\
  3495. \}\
  3496. \}\
  3497. \
  3498. - (
  3499. \f2\b \cf8 void
  3500. \f0\b0 \cf4 )\cf11 onBackToDefault\cf4 \{\
  3501. [
  3502. \f2\b \cf8 self
  3503. \f0\b0 \cf4 \cf15 setupMoreView\cf4 :
  3504. \f2\b \cf8 nil
  3505. \f0\b0 \cf4 ];\
  3506. \}\
  3507. \
  3508. - (
  3509. \f2\b \cf8 void
  3510. \f0\b0 \cf4 )\cf11 onDidView\cf4 :(\cf9 JXSelectImageView\cf4 *)moreView \{\
  3511. \cf9 JXGroupHeplerModel\cf4 *model = \cf15 _helperArr\cf4 [moreView.\cf15 viewIndex\cf4 ];\
  3512. \
  3513. \f2\b \cf8 if
  3514. \f0\b0 \cf4 (moreView.\cf15 isDidSet\cf4 ) \{\
  3515. \cf9 JXAutoReplyAideVC\cf4 *vc = [[\cf9 JXAutoReplyAideVC\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
  3516. vc.\cf15 model\cf4 = model.\cf15 helperModel\cf4 ;\
  3517. vc.\cf15 roomId\cf4 =
  3518. \f2\b \cf8 self
  3519. \f0\b0 \cf4 .\cf15 roomId\cf4 ;\
  3520. vc.\cf15 roomJid\cf4 =
  3521. \f2\b \cf8 self
  3522. \f0\b0 \cf4 .\cf15 roomJid\cf4 ;\
  3523. \
  3524. [\cf5 g_navigation\cf4 \cf15 pushViewController\cf4 :vc \cf15 animated\cf4 :
  3525. \f2\b \cf8 YES
  3526. \f0\b0 \cf4 ];\
  3527. \
  3528. \}
  3529. \f2\b \cf8 else
  3530. \f0\b0 \cf4 \{\
  3531. \
  3532. \f2\b \cf8 if
  3533. \f0\b0 \cf4 (model.\cf15 helperModel\cf4 .\cf15 urlScheme\cf4 && model.\cf15 helperModel\cf4 .\cf15 urlScheme\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  3534. \cf10 NSString\cf4 *url = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@://roomId=%@&userId=%@"\cf4 ,model.\cf15 helperModel\cf4 .\cf15 urlScheme\cf4 ,
  3535. \f2\b \cf8 self
  3536. \f0\b0 \cf4 .\cf15 roomId\cf4 ,\cf5 g_myself\cf4 .\cf15 userId\cf4 ];\
  3537. \
  3538. [[\cf10 UIApplication\cf4 \cf14 sharedApplication\cf4 ] \cf14 openURL\cf4 :[\cf10 NSURL\cf4 \cf14 URLWithString\cf4 :url] \cf14 options\cf4 :
  3539. \f2\b \cf8 nil
  3540. \f0\b0 \cf4 \cf14 completionHandler\cf4 :^(
  3541. \f2\b \cf8 BOOL
  3542. \f0\b0 \cf4 success) \{\
  3543. \
  3544. \f2\b \cf8 if
  3545. \f0\b0 \cf4 (!success) \{\
  3546. [
  3547. \f2\b \cf8 self
  3548. \f0\b0 \cf4 \cf15 didViewActionWithModel\cf4 :model];\
  3549. \}\
  3550. \}];\
  3551. \
  3552. \}
  3553. \f2\b \cf8 else
  3554. \f0\b0 \cf4 \{\
  3555. [
  3556. \f2\b \cf8 self
  3557. \f0\b0 \cf4 \cf15 didViewActionWithModel\cf4 :model];\
  3558. \}\
  3559. \
  3560. \
  3561. \}\
  3562. \
  3563. \}\
  3564. \
  3565. - (
  3566. \f2\b \cf8 void
  3567. \f0\b0 \cf4 )\cf11 didViewActionWithModel\cf4 :(\cf9 JXGroupHeplerModel\cf4 *)model \{\
  3568. \f2\b \cf8 if
  3569. \f0\b0 \cf4 (model.\cf15 helperModel\cf4 .\cf15 type\cf4 == \cf7 1\cf4 ) \{ \cf2 //
  3570. \f1 \'d7\'d4\'b6\'af\'bb\'d8\'b8\'b4
  3571. \f0 \cf4 \
  3572. \}\
  3573. \f2\b \cf8 else
  3574. \f0\b0 \cf4
  3575. \f2\b \cf8 if
  3576. \f0\b0 \cf4 (model.\cf15 helperModel\cf4 .\cf15 type\cf4 == \cf7 2\cf4 ) \{\cf2 //
  3577. \f1 \'cd\'f8\'d2\'b3
  3578. \f0 \cf4 \
  3579. \
  3580. \cf10 NSDictionary\cf4 *dict = \cf7 @\{\cf4 \
  3581. \cf6 @"roomId"\cf4 :
  3582. \f2\b \cf8 self
  3583. \f0\b0 \cf4 .\cf15 roomId\cf4 ,\
  3584. \cf6 @"roomJid"\cf4 :
  3585. \f2\b \cf8 self
  3586. \f0\b0 \cf4 .\cf15 roomJid\cf4 ,\
  3587. \cf6 @"userId"\cf4 : \cf5 g_myself\cf4 .\cf15 userId\cf4 \
  3588. \cf7 \}\cf4 ;\
  3589. \cf10 NSData\cf4 *jsonData = [\cf10 NSJSONSerialization\cf4 \cf14 dataWithJSONObject\cf4 :dict \cf14 options\cf4 :\cf14 NSJSONWritingPrettyPrinted\cf4 \cf14 error\cf4 :
  3590. \f2\b \cf8 nil
  3591. \f0\b0 \cf4 ];\
  3592. \cf10 NSString\cf4 *json = [[\cf10 NSString\cf4 \cf14 alloc\cf4 ]\cf14 initWithData\cf4 :jsonData \cf14 encoding\cf4 :\cf14 NSUTF8StringEncoding\cf4 ];\
  3593. \
  3594. \cf9 webpageVC\cf4 *webVC = [\cf9 webpageVC\cf4 \cf14 alloc\cf4 ];\
  3595. webVC.\cf15 isGotoBack\cf4 =
  3596. \f2\b \cf8 YES
  3597. \f0\b0 \cf4 ;\
  3598. webVC.\cf15 isSend\cf4 =
  3599. \f2\b \cf8 YES
  3600. \f0\b0 \cf4 ;\
  3601. webVC.\cf15 shareParam\cf4 = json;\
  3602. webVC.\cf14 title\cf4 = model.\cf15 helperModel\cf4 .\cf15 name\cf4 ;\
  3603. \cf10 NSString\cf4 * url = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@"\cf4 ,model.\cf15 helperModel\cf4 .\cf15 link\cf4 ];\
  3604. url = [url \cf14 stringByReplacingOccurrencesOfString\cf4 :\cf6 @" "\cf4 \cf14 withString\cf4 :\cf6 @""\cf4 ];\
  3605. url = [url \cf14 stringByReplacingOccurrencesOfString\cf4 :\cf6 @"\\t"\cf4 \cf14 withString\cf4 :\cf6 @""\cf4 ];\
  3606. webVC.\cf15 url\cf4 = url;\
  3607. webVC = [webVC \cf14 init\cf4 ];\
  3608. [\cf5 g_navigation\cf4 .\cf15 navigationView\cf4 \cf14 addSubview\cf4 :webVC.\cf14 view\cf4 ];\
  3609. \
  3610. \}\
  3611. \f2\b \cf8 else
  3612. \f0\b0 \cf4
  3613. \f2\b \cf8 if
  3614. \f0\b0 \cf4 (model.\cf15 helperModel\cf4 .\cf15 type\cf4 == \cf7 3\cf4 ) \{\cf2 //
  3615. \f1 \'b5\'e3\'bb\'f7\'b7\'a2\'cb\'cd
  3616. \f0 \cf4 \
  3617. \cf10 NSMutableDictionary\cf4 *dict = \cf7 @\{\cf6 @"url"\cf4 :model.\cf15 helperModel\cf4 .\cf15 url\cf4 ,\
  3618. \cf6 @"appName"\cf4 :model.\cf15 helperModel\cf4 .\cf15 appName\cf4 ,\
  3619. \cf6 @"subTitle"\cf4 :model.\cf15 helperModel\cf4 .\cf15 subTitle\cf4 ,\
  3620. \cf7 \}\cf4 .\cf14 mutableCopy\cf4 ;\
  3621. \f2\b \cf8 if
  3622. \f0\b0 \cf4 (model.\cf15 helperModel\cf4 .\cf15 imageUrl\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  3623. [dict \cf14 addEntriesFromDictionary\cf4 :\cf7 @\{\cf6 @"imageUrl"\cf4 :model.\cf15 helperModel\cf4 .\cf15 imageUrl\cf7 \}\cf4 ];\
  3624. \}\
  3625. \f2\b \cf8 if
  3626. \f0\b0 \cf4 (model.\cf15 helperModel\cf4 .\cf15 appIcon\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  3627. [dict \cf14 addEntriesFromDictionary\cf4 :\cf7 @\{\cf6 @"appIcon"\cf4 :model.\cf15 helperModel\cf4 .\cf15 appIcon\cf7 \}\cf4 ];\
  3628. \}\
  3629. \f2\b \cf8 if
  3630. \f0\b0 \cf4 (model.\cf15 helperModel\cf4 .\cf15 downloadUrl\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  3631. [dict \cf14 addEntriesFromDictionary\cf4 :\cf7 @\{\cf6 @"downloadUrl"\cf4 :model.\cf15 helperModel\cf4 .\cf15 downloadUrl\cf7 \}\cf4 ];\
  3632. \}\
  3633. \f2\b \cf8 if
  3634. \f0\b0 \cf4 (model.\cf15 helperModel\cf4 .\cf15 title\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  3635. [dict \cf14 addEntriesFromDictionary\cf4 :\cf7 @\{\cf6 @"title"\cf4 :model.\cf15 helperModel\cf4 .\cf15 title\cf7 \}\cf4 ];\
  3636. \}\
  3637. \
  3638. \cf9 SBJsonWriter\cf4 *writer = [[\cf9 SBJsonWriter\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
  3639. \cf10 NSString\cf4 *content = [writer \cf15 stringWithObject\cf4 :dict];\
  3640. \
  3641. \cf2 // JXMessageObject *msg = [[JXMessageObject alloc] init];\cf4 \
  3642. \cf2 // msg.timeSend = [NSDate date];\cf4 \
  3643. \cf2 // msg.fromUserId = g_myself.userId;\cf4 \
  3644. \cf2 // msg.toUserId = model.roomJid;\cf4 \
  3645. \cf2 // msg.objectId = content;\cf4 \
  3646. \cf2 // msg.type = [NSNumber numberWithInt:kWCMessageTypeShare];\cf4 \
  3647. \cf2 // [msg insert:model.roomJid];\cf4 \
  3648. \cf2 // [self showOneMsg:msg];\cf4 \
  3649. \cf2 // [g_xmpp sendMessage:msg roomName:model.roomId];\cf4 \
  3650. \
  3651. \
  3652. \cf9 JXMessageObject\cf4 *msg=[[\cf9 JXMessageObject\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
  3653. msg.\cf15 timeSend\cf4 = [\cf10 NSDate\cf4 \cf14 date\cf4 ];\
  3654. msg.\cf15 fromUserId\cf4 = \cf5 MY_USER_ID\cf4 ;\
  3655. msg.\cf15 toUserId\cf4 =
  3656. \f2\b \cf8 self
  3657. \f0\b0 \cf4 .\cf15 roomJid\cf4 ;\
  3658. msg.\cf15 isGroup\cf4 =
  3659. \f2\b \cf8 YES
  3660. \f0\b0 \cf4 ;\
  3661. msg.\cf15 fromUserName\cf4 = \cf15 _userNickName\cf4 ;\
  3662. \
  3663. msg.\cf15 objectId\cf4 = content;\
  3664. msg.\cf15 type\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf15 kWCMessageTypeShare\cf4 ];\
  3665. msg.\cf15 isSend\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf5 transfer_status_ing\cf4 ];\
  3666. msg.\cf15 isRead\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithBool\cf4 :
  3667. \f2\b \cf8 NO
  3668. \f0\b0 \cf4 ];\
  3669. msg.\cf15 isReadDel\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :
  3670. \f2\b \cf8 NO
  3671. \f0\b0 \cf4 ];\
  3672. \
  3673. \cf2 //
  3674. \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
  3675. \f0 \cf4 \
  3676. [msg \cf15 insert\cf4 :
  3677. \f2\b \cf8 self
  3678. \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\
  3679. [\cf5 g_xmpp\cf4 \cf15 sendMessage\cf4 :msg \cf15 roomName\cf4 :
  3680. \f2\b \cf8 self
  3681. \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\cf2 //
  3682. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  3683. \f0 \cf4 \
  3684. [
  3685. \f2\b \cf8 self
  3686. \f0\b0 \cf4 \cf15 showOneMsg\cf4 :msg];\
  3687. \}\
  3688. \}\
  3689. \
  3690. \
  3691. -(
  3692. \f2\b \cf8 void
  3693. \f0\b0 \cf4 )\cf11 viewWillAppear\cf4 :(
  3694. \f2\b \cf8 BOOL
  3695. \f0\b0 \cf4 )animated\{\
  3696. [
  3697. \f2\b \cf8 super
  3698. \f0\b0 \cf4 \cf14 viewWillAppear\cf4 :animated];\
  3699. \cf2 //
  3700. \f1 \'bd\'f8\'c8\'eb\'bd\'e7\'c3\'e6\'bc\'b4\'bf\'aa\'c6\'f4\'b6\'a8\'ca\'b1\'c6\'f7
  3701. \f0 \cf4 \
  3702. [
  3703. \f2\b \cf8 self
  3704. \f0\b0 \cf4 .\cf15 noticeTimer\cf4 \cf14 setFireDate\cf4 :[\cf10 NSDate\cf4 \cf14 distantPast\cf4 ]];\
  3705. \cf15 _strURLGoback\cf4 =\cf6 @"1000"\cf4 ;\
  3706. \cf14 dispatch_after\cf4 (\cf14 dispatch_time\cf4 (\cf5 DISPATCH_TIME_NOW\cf4 , (\cf10 int64_t\cf4 )(\cf7 2\cf4 * \cf5 NSEC_PER_SEC\cf4 )), \cf14 dispatch_get_main_queue\cf4 (), ^\{\
  3707. \
  3708. [
  3709. \f2\b \cf8 self
  3710. \f0\b0 \cf4 \cf15 refresh\cf4 :
  3711. \f2\b \cf8 nil
  3712. \f0\b0 \cf4 ];\
  3713. \});\
  3714. \
  3715. \f2\b \cf8 BOOL
  3716. \f0\b0 \cf4 isOpen = [\cf5 g_default\cf4 \cf14 boolForKey\cf4 :\cf5 kgoucaiComePush\cf4 ];\
  3717. \
  3718. \f2\b \cf8 BOOL
  3719. \f0\b0 \cf4 isOpen2 = [\cf5 g_default\cf4 \cf14 boolForKey\cf4 :\cf5 kGuanXinComePush\cf4 ];\
  3720. \
  3721. \f2\b \cf8 if
  3722. \f0\b0 \cf4 (isOpen==\cf7 1\cf4 && isOpen2==\cf7 1\cf4 ) \{\
  3723. \cf15 _noticeView2\cf4 .\cf14 hidden\cf4 =
  3724. \f2\b \cf8 YES
  3725. \f0\b0 \cf4 ;\
  3726. \cf15 _noticeViewScrollView\cf4 .\cf14 hidden\cf4 =
  3727. \f2\b \cf8 YES
  3728. \f0\b0 \cf4 ;\
  3729. \
  3730. \}
  3731. \f2\b \cf8 else
  3732. \f0\b0 \cf4
  3733. \f2\b \cf8 if
  3734. \f0\b0 \cf4 (isOpen==\cf7 1\cf4 && isOpen2==\cf7 0\cf4 ) \{\
  3735. \
  3736. \cf2 // _table.contentInset = UIEdgeInsetsMake(38, 0, 0, 0);\cf4 \
  3737. \cf15 _noticeViewScrollView\cf4 .\cf14 hidden\cf4 =
  3738. \f2\b \cf8 NO
  3739. \f0\b0 \cf4 ;\
  3740. \cf15 _noticeViewScrollView\cf4 .\cf14 frame\cf4 =\cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf5 JX_SCREEN_TOP\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf7 37\cf4 );\
  3741. \cf15 _noticeView2\cf4 .\cf14 hidden\cf4 =
  3742. \f2\b \cf8 YES
  3743. \f0\b0 \cf4 ;\
  3744. \}
  3745. \f2\b \cf8 else
  3746. \f0\b0 \cf4
  3747. \f2\b \cf8 if
  3748. \f0\b0 \cf4 (isOpen==\cf7 0\cf4 && isOpen2==\cf7 1\cf4 )\{\
  3749. \
  3750. \f2\b \cf8 if
  3751. \f0\b0 \cf4 ( \cf15 _biaotishifoBC\cf4 ==\cf7 1111\cf4 ) \{\
  3752. \
  3753. \f2\b \cf8 self
  3754. \f0\b0 \cf4 .\cf15 showTopView\cf4 .\cf15 xiaLineView\cf4 .\cf14 hidden\cf4 =
  3755. \f2\b \cf8 NO
  3756. \f0\b0 \cf4 ;\
  3757. \cf15 _noticeView2\cf4 .\cf14 hidden\cf4 =
  3758. \f2\b \cf8 NO
  3759. \f0\b0 \cf4 ;\
  3760. \f2\b \cf8 self
  3761. \f0\b0 \cf4 .\cf15 showTopView\cf4 .\cf15 xiaLineView\cf4 .\cf14 hidden\cf4 =
  3762. \f2\b \cf8 YES
  3763. \f0\b0 \cf4 ;\
  3764. \}
  3765. \f2\b \cf8 else
  3766. \f0\b0 \cf4 \{\
  3767. \
  3768. \cf15 _noticeView2\cf4 .\cf14 hidden\cf4 =
  3769. \f2\b \cf8 YES
  3770. \f0\b0 \cf4 ;\
  3771. \}\
  3772. \
  3773. \cf15 _noticeViewScrollView\cf4 .\cf14 hidden\cf4 =
  3774. \f2\b \cf8 YES
  3775. \f0\b0 \cf4 ;\
  3776. \}
  3777. \f2\b \cf8 else
  3778. \f0\b0 \cf4
  3779. \f2\b \cf8 if
  3780. \f0\b0 \cf4 (isOpen==\cf7 0\cf4 && isOpen2==\cf7 0\cf4 ) \{\
  3781. \cf15 _noticeViewScrollView\cf4 .\cf14 hidden\cf4 =
  3782. \f2\b \cf8 NO
  3783. \f0\b0 \cf4 ;\
  3784. \
  3785. \f2\b \cf8 self
  3786. \f0\b0 \cf4 .\cf15 showTopView\cf4 .\cf15 xiaLineView\cf4 .\cf14 hidden\cf4 =
  3787. \f2\b \cf8 NO
  3788. \f0\b0 \cf4 ;\
  3789. \cf15 _noticeView2\cf4 .\cf14 hidden\cf4 =
  3790. \f2\b \cf8 NO
  3791. \f0\b0 \cf4 ;\
  3792. \cf15 _noticeViewScrollView\cf4 .\cf14 frame\cf4 =\cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 37\cf4 +\cf5 JX_SCREEN_TOP\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf7 37\cf4 );\
  3793. \cf2 //_table.contentInset = UIEdgeInsetsMake(73, 0, 0, 0);\cf4 \
  3794. \}\
  3795. \cf2 // [g_notify removeObserver:self];\cf4 \
  3796. \
  3797. \
  3798. \
  3799. \}\
  3800. \
  3801. - (
  3802. \f2\b \cf8 void
  3803. \f0\b0 \cf4 )\cf11 viewDidDisappear\cf4 :(
  3804. \f2\b \cf8 BOOL
  3805. \f0\b0 \cf4 )animated \{\
  3806. [
  3807. \f2\b \cf8 super
  3808. \f0\b0 \cf4 \cf14 viewDidDisappear\cf4 :animated];\
  3809. \cf2 //
  3810. \f1 \'cd\'cb\'b3\'f6\'bd\'e7\'c3\'e6\'bc\'b4\'b9\'d8\'b1\'d5\'b6\'a8\'ca\'b1\'c6\'f7
  3811. \f0 \cf4 \
  3812. [\cf15 _wait\cf4 \cf15 stop\cf4 ];\
  3813. [
  3814. \f2\b \cf8 self
  3815. \f0\b0 \cf4 .\cf15 noticeTimer\cf4 \cf14 setFireDate\cf4 :[\cf10 NSDate\cf4 \cf14 distantFuture\cf4 ]];\
  3816. \cf15 _strURLGoback\cf4 =\cf6 @""\cf4 ;\
  3817. \}\
  3818. \
  3819. - (
  3820. \f2\b \cf8 void
  3821. \f0\b0 \cf4 )\cf11 viewWillDisappear\cf4 :(
  3822. \f2\b \cf8 BOOL
  3823. \f0\b0 \cf4 )animated \{\
  3824. [
  3825. \f2\b \cf8 super
  3826. \f0\b0 \cf4 \cf14 viewWillDisappear\cf4 :animated];\
  3827. [[\cf10 UIApplication\cf4 \cf14 sharedApplication\cf4 ] \cf14 setStatusBarHidden\cf4 :
  3828. \f2\b \cf8 NO
  3829. \f0\b0 \cf4 ];\
  3830. \cf2 // [_floating hide];\cf4 \
  3831. [\cf15 _wait\cf4 \cf15 stop\cf4 ];\
  3832. \cf15 _strURLGoback\cf4 =\cf6 @""\cf4 ;\
  3833. \}\
  3834. \
  3835. \cf2 //
  3836. \f1 \'bb\'f1\'c8\'a1\'b9\'d8\'d0\'c4\'c8\'cb\'b5\'c4\'d7\'ee\'ba\'f3\'d2\'bb\'cc\'f5
  3837. \f0 cell\cf4 \
  3838. - (
  3839. \f2\b \cf8 void
  3840. \f0\b0 \cf4 )\cf11 attioPersonBtnX\cf4 \{\
  3841. \
  3842. \cf9 memberData\cf4 *modelXXX=[\cf15 _tempArrMM\cf4 \cf14 firstObject\cf4 ];\
  3843. \
  3844. \f2\b \cf8 long
  3845. \f0\b0 \cf4 time = (
  3846. \f2\b \cf8 long
  3847. \f0\b0 \cf4 )[[\cf10 NSDate\cf4 \cf14 date\cf4 ] \cf14 timeIntervalSince1970\cf4 ];\
  3848. time = (time *\cf7 1000\cf4 + \cf5 g_server\cf4 .\cf15 timeDifference\cf4 );\
  3849. \cf10 NSString\cf4 *salt = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%ld"\cf4 , time];\
  3850. \cf10 NSString\cf4 *jid_room=[[\cf10 NSUserDefaults\cf4 \cf14 standardUserDefaults\cf4 ] \cf14 objectForKey\cf4 :\cf6 @"jid_roomJid"\cf4 ];\
  3851. \
  3852. [\cf5 g_server\cf4 \cf15 getUserRoomAttentionattentionLastInfo\cf4 :salt \cf15 userId\cf4 :[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%ld"\cf4 ,modelXXX.\cf15 userId\cf4 ] \cf15 jid\cf4 :\cf15 _roomJid\cf4 \cf15 andToView\cf4 :
  3853. \f2\b \cf8 self
  3854. \f0\b0 \cf4 ];\
  3855. \}\
  3856. \cf2 //
  3857. \f1 \'cc\'d8\'b1\'f0\'b9\'d8\'d0\'c4
  3858. \f0 \cf4 \
  3859. - (
  3860. \f2\b \cf8 void
  3861. \f0\b0 \cf4 )\cf11 attionBtnCLick\cf4 \{\
  3862. \
  3863. \f2\b \cf8 __weak
  3864. \f0\b0 \cf4
  3865. \f2\b \cf8 __typeof
  3866. \f0\b0 \cf4 (
  3867. \f2\b \cf8 self
  3868. \f0\b0 \cf4 )weakSelf =
  3869. \f2\b \cf8 self
  3870. \f0\b0 \cf4 ;\
  3871. \cf9 JxChatGetNoticePersonGVc\cf4 *pervc=[[\cf9 JxChatGetNoticePersonGVc\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
  3872. pervc.\cf15 block\cf4 = ^(\cf9 memberData\cf4 *
  3873. \f2\b \cf8 _Nonnull
  3874. \f0\b0 \cf4 responseObject) \{\
  3875. \
  3876. \cf15 _backUserId\cf4 =[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%ld"\cf4 ,responseObject.\cf15 userId\cf4 ];\
  3877. [weakSelf.\cf15 attioPersonBtn\cf4 \cf14 setTitle\cf4 :responseObject.\cf15 userNickName\cf4 \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  3878. \
  3879. \};\
  3880. pervc.\cf15 dataArr\cf4 =\cf15 _dataArrGetGroundPersonArr\cf4 ;\
  3881. pervc.\cf15 roomID\cf4 =
  3882. \f2\b \cf8 self
  3883. \f0\b0 \cf4 .\cf15 roomJid\cf4 ;\
  3884. [\cf5 g_navigation\cf4 \cf15 pushViewController\cf4 :pervc \cf15 animated\cf4 :
  3885. \f2\b \cf8 YES
  3886. \f0\b0 \cf4 ];\
  3887. \
  3888. \}\
  3889. - (
  3890. \f2\b \cf8 void
  3891. \f0\b0 \cf4 )\cf11 setupNotice\cf4 \{\
  3892. \cf10 CGFloat\cf4 noticHHH=\cf7 37\cf4 ;\
  3893. \
  3894. \f2\b \cf8 BOOL
  3895. \f0\b0 \cf4 isOpen = [\cf5 g_default\cf4 \cf14 boolForKey\cf4 :\cf5 kgoucaiComePush\cf4 ];\
  3896. \f2\b \cf8 if
  3897. \f0\b0 \cf4 (isOpen==\cf7 1\cf4 ) \{\
  3898. noticHHH=\cf7 0\cf4 ;\
  3899. \}\
  3900. \cf15 _noticeViewScrollView\cf4 = [[\cf10 UIScrollView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 0\cf4 , noticHHH+\cf5 JX_SCREEN_TOP\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf7 37\cf4 )];\
  3901. \
  3902. \cf15 _noticeViewScrollView\cf4 .\cf14 backgroundColor\cf4 =\cf5 kRGBColor\cf4 (\cf7 246\cf4 , \cf7 246\cf4 , \cf7 246\cf4 );\
  3903. [
  3904. \f2\b \cf8 self
  3905. \f0\b0 \cf4 .\cf14 view\cf4 \cf14 addSubview\cf4 :\cf15 _noticeViewScrollView\cf4 ];\
  3906. \
  3907. \cf10 UIView\cf4 *lineView1 = [[\cf10 UIView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 0\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf7 1\cf4 )];\
  3908. lineView1.\cf14 backgroundColor\cf4 =[\cf10 UIColor\cf4 \cf14 whiteColor\cf4 ];\
  3909. [\cf15 _noticeViewScrollView\cf4 \cf14 addSubview\cf4 :lineView1];\
  3910. \
  3911. \
  3912. \cf10 UIView\cf4 *lineView = [[\cf10 UIView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 36\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf7 1\cf4 )];\
  3913. lineView.\cf14 backgroundColor\cf4 =[\cf10 UIColor\cf4 \cf14 grayColor\cf4 ];\
  3914. [\cf15 _noticeViewScrollView\cf4 \cf14 addSubview\cf4 :lineView];\
  3915. \
  3916. \cf10 UIButton\cf4 *attionBtn=[[\cf10 UIButton\cf4 \cf14 alloc\cf4 ]\cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 10\cf4 , \cf7 7\cf4 , \cf7 80\cf4 , \cf7 24\cf4 )];\
  3917. [attionBtn \cf14 setTitle\cf4 :\cf6 @"
  3918. \f1 \'d1\'a1\'d4\'f1\'ba\'c3\'d3\'d1
  3919. \f0 "\cf4 forState:\cf14 UIControlStateNormal\cf4 ];\
  3920. attionBtn.\cf14 layer\cf4 .\cf14 cornerRadius\cf4 =\cf7 8\cf4 ;\
  3921. attionBtn.\cf14 layer\cf4 .\cf14 masksToBounds\cf4 =
  3922. \f2\b \cf8 YES
  3923. \f0\b0 \cf4 ;\
  3924. attionBtn.\cf14 backgroundColor\cf4 =[\cf10 UIColor\cf4 \cf14 whiteColor\cf4 ];\
  3925. [attionBtn \cf14 setTitleColor\cf4 :\cf5 kRGBColor51\cf4 \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  3926. attionBtn.\cf14 titleLabel\cf4 .\cf14 font\cf4 =[\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 15\cf4 \cf14 weight\cf4 :\cf14 UIFontWeightMedium\cf4 ];\
  3927. attionBtn.\cf14 showsTouchWhenHighlighted\cf4 =
  3928. \f2\b \cf8 YES
  3929. \f0\b0 \cf4 ;\
  3930. [\cf15 _noticeViewScrollView\cf4 \cf14 addSubview\cf4 :attionBtn];\
  3931. [attionBtn \cf14 addTarget\cf4 :
  3932. \f2\b \cf8 self
  3933. \f0\b0 \cf4 \cf14 action\cf4 :
  3934. \f2\b \cf8 @selector
  3935. \f0\b0 \cf4 (attionBtnCLick) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  3936. \
  3937. \
  3938. \cf15 _attioPersonBtn\cf4 =[[\cf10 UIButton\cf4 \cf14 alloc\cf4 ]\cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 100\cf4 , \cf7 7\cf4 , \cf7 80\cf4 , \cf7 24\cf4 )];\
  3939. [\cf15 _attioPersonBtn\cf4 \cf14 setTitle\cf4 :\cf6 @""\cf4 \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  3940. \cf15 _attioPersonBtn\cf4 .\cf14 layer\cf4 .\cf14 cornerRadius\cf4 =\cf7 8\cf4 ;\
  3941. \cf15 _attioPersonBtn\cf4 .\cf14 layer\cf4 .\cf14 masksToBounds\cf4 =
  3942. \f2\b \cf8 YES
  3943. \f0\b0 \cf4 ;\
  3944. \cf15 _attioPersonBtn\cf4 .\cf14 backgroundColor\cf4 =[\cf10 UIColor\cf4 \cf14 whiteColor\cf4 ];\
  3945. [\cf15 _attioPersonBtn\cf4 \cf14 setTitleColor\cf4 :\cf5 kRGBColor51\cf4 \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  3946. \cf15 _attioPersonBtn\cf4 .\cf14 titleLabel\cf4 .\cf14 font\cf4 =[\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 15\cf4 \cf14 weight\cf4 :\cf14 UIFontWeightMedium\cf4 ];\
  3947. [\cf15 _noticeViewScrollView\cf4 \cf14 addSubview\cf4 :\cf15 _attioPersonBtn\cf4 ];\
  3948. [\cf15 _attioPersonBtn\cf4 \cf14 addTarget\cf4 :
  3949. \f2\b \cf8 self
  3950. \f0\b0 \cf4 \cf14 action\cf4 :
  3951. \f2\b \cf8 @selector
  3952. \f0\b0 \cf4 (attioPersonBtnX) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  3953. \
  3954. \
  3955. \
  3956. \f2\b \cf8 return
  3957. \f0\b0 \cf4 ;\
  3958. _noticeView = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , JX_SCREEN_TOP, JX_SCREEN_WIDTH, \cf7 36\cf4 )];\
  3959. _noticeView.backgroundColor = [UIColor whiteColor];\
  3960. _noticeView.hidden =
  3961. \f2\b \cf8 NO
  3962. \f0\b0 \cf4 ;\
  3963. [
  3964. \f2\b \cf8 self
  3965. \f0\b0 \cf4 .view addSubview:_noticeView];\
  3966. \
  3967. \cf2 // UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideNoticeView:)];\cf4 \
  3968. \cf2 // [_noticeView addGestureRecognizer:tap];\cf4 \
  3969. \
  3970. _noticeImgV = [[UIImageView alloc] initWithFrame:CGRectMake(\cf7 15\cf4 , \cf7 10\cf4 , \cf7 16\cf4 , \cf7 16\cf4 )];\
  3971. _noticeImgV.image = [UIImage imageNamed:\cf6 @"chat_notice"\cf4 ];\
  3972. [_noticeView addSubview:_noticeImgV];\
  3973. \
  3974. _noticeLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_noticeImgV.frame)+\cf7 4\cf4 , \cf7 0\cf4 , \cf7 64\cf4 , \cf7 36\cf4 )];\
  3975. _noticeLabel.text = Localized(\cf6 @"JX_LatestAnnouncement:"\cf4 );\
  3976. _noticeLabel.textColor = HEXCOLOR(\cf7 0x323232\cf4 );\
  3977. _noticeLabel.font = SYSFONT(\cf7 13\cf4 );\
  3978. [_noticeView addSubview:_noticeLabel];\
  3979. \
  3980. _showNoticeView = [[UIView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_noticeLabel.frame)+\cf7 5\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH-\cf7 125\cf4 , \cf7 36\cf4 )];\
  3981. _showNoticeView.backgroundColor = [UIColor whiteColor];\
  3982. _showNoticeView.clipsToBounds =
  3983. \f2\b \cf8 YES
  3984. \f0\b0 \cf4 ;\
  3985. [_noticeView addSubview:_showNoticeView];\
  3986. \
  3987. _leftLabel = [[UILabel alloc] initWithFrame:_showNoticeView.bounds];\
  3988. _leftLabel.textColor = HEXCOLOR(\cf7 0x323232\cf4 );\
  3989. _leftLabel.textAlignment = NSTextAlignmentLeft;\
  3990. _leftLabel.lineBreakMode = NSLineBreakByCharWrapping;\
  3991. _leftLabel.font = SYSFONT(\cf7 13\cf4 );\
  3992. [_showNoticeView addSubview:_leftLabel];\
  3993. \
  3994. _rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_leftLabel.frame), \cf7 0\cf4 , JX_SCREEN_WIDTH-\cf7 130\cf4 , \cf7 36\cf4 )];\
  3995. _rightLabel.textColor = HEXCOLOR(\cf7 0x323232\cf4 );\
  3996. _rightLabel.font = SYSFONT(\cf7 13\cf4 );\
  3997. _rightLabel.textAlignment = NSTextAlignmentLeft;\
  3998. _rightLabel.lineBreakMode = NSLineBreakByCharWrapping;\
  3999. [_showNoticeView addSubview:_rightLabel];\
  4000. \
  4001. \}\
  4002. \
  4003. \cf2 //json
  4004. \f1 \'b8\'f1\'ca\'bd\'d7\'d6\'b7\'fb\'b4\'ae\'d7\'aa\'d7\'d6\'b5\'e4\'a3\'ba
  4005. \f0 \cf4 \
  4006. \
  4007. - (NSArray *)\cf11 dictionaryWithJsonString\cf4 :(NSString *)jsonString \{\
  4008. \
  4009. \f2\b \cf8 if
  4010. \f0\b0 \cf4 (jsonString ==
  4011. \f2\b \cf8 nil
  4012. \f0\b0 \cf4 ) \{\
  4013. \
  4014. \f2\b \cf8 return
  4015. \f0\b0 \cf4
  4016. \f2\b \cf8 nil
  4017. \f0\b0 \cf4 ;\
  4018. \
  4019. \}\
  4020. \
  4021. NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];\
  4022. \
  4023. NSError *err;\
  4024. \
  4025. NSArray *dic = [NSJSONSerialization JSONObjectWithData:jsonData\
  4026. \
  4027. options:NSJSONReadingMutableContainers\
  4028. \
  4029. error:&err];\
  4030. \
  4031. \f2\b \cf8 if
  4032. \f0\b0 \cf4 (err) \{\
  4033. \
  4034. NSLog(\cf6 @"json
  4035. \f1 \'bd\'e2\'ce\'f6\'ca\'a7\'b0\'dc\'a3\'ba
  4036. \f0 %@"\cf4 ,err);\
  4037. \
  4038. \f2\b \cf8 return
  4039. \f0\b0 \cf4
  4040. \f2\b \cf8 nil
  4041. \f0\b0 \cf4 ;\
  4042. \
  4043. \}\
  4044. \
  4045. \f2\b \cf8 return
  4046. \f0\b0 \cf4 dic;\
  4047. \
  4048. \}\
  4049. \
  4050. - (
  4051. \f2\b \cf8 void
  4052. \f0\b0 \cf4 )\cf11 notice2ndClick\cf4 \{\
  4053. JLSelectView *customView = [[JLSelectView alloc] init];\
  4054. \f2\b \cf8 __weak
  4055. \f0\b0 \cf4
  4056. \f2\b \cf8 __typeof
  4057. \f0\b0 \cf4 (
  4058. \f2\b \cf8 self
  4059. \f0\b0 \cf4 )weakSelf =
  4060. \f2\b \cf8 self
  4061. \f0\b0 \cf4 ;\
  4062. customView.returnModelBlock = ^(JLSelectModel *model, NSIndexPath *indexPath) \{\
  4063. NSLog(\cf6 @"
  4064. \f1 \'d1\'a1\'d4\'f1\'c1\'cb
  4065. \f0 %@-%@"\cf4 , model.name,model.data[indexPath.row].content);\
  4066. \cf2 //NSString *title = [NSString stringWithFormat:@"%@%@:", model.name, model.data[indexPath.row].subName];\cf4 \
  4067. \cf2 //[weakSelf.selectButton setTitle:title forState:(UIControlStateNormal)];\cf4 \
  4068. [weakSelf.container dismiss];\
  4069. \cf2 //
  4070. \f1 \'b1\'a3\'b4\'e6
  4071. \f0 key\cf4 \
  4072. \cf2 // [g_default set];\cf4 \
  4073. JXLabelObject *obj = [JXLabelObject sharedInstance];\
  4074. obj.roomJid = weakSelf.roomJid;\
  4075. obj.selectItem = [NSString stringWithFormat:\cf6 @"%@-%@"\cf4 , model.name, model.data[indexPath.row].subName];\
  4076. [obj updateRecordGroupAnnouncementSelectItem];\
  4077. \cf2 //
  4078. \f1 \'b8\'fc\'d0\'c2
  4079. \f0 UI\cf4 \
  4080. \cf2 //weakSelf.leftLabel2.text = model.data[indexPath.row].content;\cf4 \
  4081. \
  4082. \
  4083. JLSelectItemModel *selectItemModel = model.data[indexPath.row];\
  4084. [_showTopView.caizongBtn setTitle:selectItemModel.subName forState:UIControlStateNormal];\
  4085. _showTopView.selectItemModel=selectItemModel;\
  4086. \};\
  4087. \
  4088. JXLabelObject *obj = [JXLabelObject sharedInstance];\
  4089. obj.roomJid =
  4090. \f2\b \cf8 self
  4091. \f0\b0 \cf4 .roomJid;\
  4092. NSString *groupAnnouncement = [obj fetchAllGroupAnnouncementFromLocal];\
  4093. NSArray *response = [
  4094. \f2\b \cf8 self
  4095. \f0\b0 \cf4 dictionaryWithJsonString: groupAnnouncement];\
  4096. \
  4097. customView.dataArray = response.copy;\
  4098. \cf2 // customView.dataArray = @[\cf4 \
  4099. \cf2 // @\{\cf4 \
  4100. \cf2 // @"name":@"
  4101. \f1 \'b9\'d9\'b7\'bd
  4102. \f0 ",\cf4 \
  4103. \cf2 // @"data":@[\cf4 \
  4104. \cf2 // @\{@"subName":@"
  4105. \f1 \'d2\'bb\'b7\'d6\'c8\'fc\'b3\'b5
  4106. \f0 111111111111111111",@"content":@"
  4107. \f1 \'d2\'bb\'b7\'d6\'c8\'fc\'b3\'b5
  4108. \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
  4109. \f0 "\},\cf4 \
  4110. \cf2 // @\{@"subName":@"
  4111. \f1 \'b6\'fe\'b7\'d6\'c8\'fc\'b3\'b5
  4112. \f0 ",@"content":@"
  4113. \f1 \'b6\'fe\'b7\'d6\'c8\'fc\'b3\'b5
  4114. \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
  4115. \f0 "\},\cf4 \
  4116. \cf2 // @\{@"subName":@"
  4117. \f1 \'c8\'fd\'b7\'d6\'c8\'fc\'b3\'b5
  4118. \f0 ",@"content":@"
  4119. \f1 \'c8\'fd\'b7\'d6\'c8\'fc\'b3\'b5
  4120. \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
  4121. \f0 "\},\cf4 \
  4122. \cf2 // @\{@"subName":@"
  4123. \f1 \'cb\'c4\'b7\'d6\'c8\'fc\'b3\'b5
  4124. \f0 ",@"content":@"
  4125. \f1 \'cb\'c4\'b7\'d6\'c8\'fc\'b3\'b5
  4126. \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
  4127. \f0 "\},\cf4 \
  4128. \cf2 // @\{@"subName":@"
  4129. \f1 \'d2\'bb\'b7\'d6\'c8\'fc\'b3\'b5
  4130. \f0 ",@"content":@"
  4131. \f1 \'d2\'bb\'b7\'d6\'c8\'fc\'b3\'b5
  4132. \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
  4133. \f0 "\},\cf4 \
  4134. \cf2 // @\{@"subName":@"
  4135. \f1 \'b6\'fe\'b7\'d6\'c8\'fc\'b3\'b5
  4136. \f0 ",@"content":@"
  4137. \f1 \'b6\'fe\'b7\'d6\'c8\'fc\'b3\'b5
  4138. \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
  4139. \f0 "\},\cf4 \
  4140. \cf2 // @\{@"subName":@"
  4141. \f1 \'c8\'fd\'b7\'d6\'c8\'fc\'b3\'b5
  4142. \f0 ",@"content":@"
  4143. \f1 \'c8\'fd\'b7\'d6\'c8\'fc\'b3\'b5
  4144. \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
  4145. \f0 "\},\cf4 \
  4146. \cf2 // @\{@"subName":@"
  4147. \f1 \'cb\'c4\'b7\'d6\'c8\'fc\'b3\'b5
  4148. \f0 ",@"content":@"
  4149. \f1 \'cb\'c4\'b7\'d6\'c8\'fc\'b3\'b5
  4150. \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
  4151. \f0 "\},\cf4 \
  4152. \cf2 // ]\cf4 \
  4153. \cf2 // \},\cf4 \
  4154. \cf2 // @\{\cf4 \
  4155. \cf2 // @"name":@"
  4156. \f1 \'b4\'ab\'cd\'b3
  4157. \f0 ",\cf4 \
  4158. \cf2 // @"data":@[\cf4 \
  4159. \cf2 // @\{@"subName":@"
  4160. \f1 \'d2\'bb\'b7\'d6\'c8\'fc\'b3\'b5
  4161. \f0 ",@"content":@"
  4162. \f1 \'d2\'bb\'b7\'d6\'c8\'fc\'b3\'b5
  4163. \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
  4164. \f0 "\},\cf4 \
  4165. \cf2 // @\{@"subName":@"
  4166. \f1 \'b6\'fe\'b7\'d6\'c8\'fc\'b3\'b5
  4167. \f0 ",@"content":@"
  4168. \f1 \'b6\'fe\'b7\'d6\'c8\'fc\'b3\'b5
  4169. \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
  4170. \f0 "\},\cf4 \
  4171. \cf2 // @\{@"subName":@"
  4172. \f1 \'c8\'fd\'b7\'d6\'c8\'fc\'b3\'b5
  4173. \f0 ",@"content":@"
  4174. \f1 \'c8\'fd\'b7\'d6\'c8\'fc\'b3\'b5
  4175. \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
  4176. \f0 "\}\cf4 \
  4177. \cf2 // ]\cf4 \
  4178. \cf2 // \}];\cf4 \
  4179. _container = [[DSHPopupContainer alloc] initWithCustomPopupView:customView];\
  4180. _container.maskColor = [[UIColor blackColor] colorWithAlphaComponent:\cf7 .5\cf4 ];\
  4181. [_container show];\
  4182. \
  4183. \}\
  4184. \
  4185. - (
  4186. \f2\b \cf8 void
  4187. \f0\b0 \cf4 )\cf11 tebieBtnClickXX\cf4 \{\
  4188. \
  4189. \f2\b \cf8 long
  4190. \f0\b0 \cf4 time = (
  4191. \f2\b \cf8 long
  4192. \f0\b0 \cf4 )[[NSDate date] timeIntervalSince1970];\
  4193. time = (time *\cf7 1000\cf4 + g_server.timeDifference);\
  4194. NSString *salt = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , time];\
  4195. [g_server getUserRoomAttentionattentionLastInfo:salt userId:_backUserId jid:_roomJid andToView:
  4196. \f2\b \cf8 self
  4197. \f0\b0 \cf4 ];\
  4198. \
  4199. \}\
  4200. \cf2 //
  4201. \f1 \'cc\'d8\'b1\'f0\'b9\'d8\'d0\'c4
  4202. \f0 \cf4 \
  4203. - (
  4204. \f2\b \cf8 void
  4205. \f0\b0 \cf4 )\cf11 tebieBtnClick\cf4 \{\
  4206. \
  4207. \f2\b \cf8 __weak
  4208. \f0\b0 \cf4
  4209. \f2\b \cf8 __typeof
  4210. \f0\b0 \cf4 (
  4211. \f2\b \cf8 self
  4212. \f0\b0 \cf4 )weakSelf =
  4213. \f2\b \cf8 self
  4214. \f0\b0 \cf4 ;\
  4215. JxChatGetNoticePersonGVc *pervc=[[JxChatGetNoticePersonGVc alloc]init];\
  4216. pervc.block = ^(memberData *
  4217. \f2\b \cf8 _Nonnull
  4218. \f0\b0 \cf4 responseObject) \{\
  4219. \
  4220. \
  4221. _backUserId=[NSString stringWithFormat:\cf6 @"%ld"\cf4 ,responseObject.userId];\
  4222. [weakSelf.showTopView.tebieGuanXin setTitle:responseObject.userNickName forState:UIControlStateNormal];\
  4223. \
  4224. \};\
  4225. pervc.dataArr=_dataArrGetGroundPersonArr;\
  4226. pervc.roomID=
  4227. \f2\b \cf8 self
  4228. \f0\b0 \cf4 .roomJid;\
  4229. \
  4230. \
  4231. [g_navigation pushViewController:pervc animated:
  4232. \f2\b \cf8 YES
  4233. \f0\b0 \cf4 ];\
  4234. \
  4235. \}\
  4236. \
  4237. - (
  4238. \f2\b \cf8 void
  4239. \f0\b0 \cf4 )\cf11 setupNotice2nd\cf4 \{\
  4240. _noticeView2 = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , JX_SCREEN_TOP, JX_SCREEN_WIDTH, \cf7 38\cf4 )];\
  4241. _noticeView2.backgroundColor = [UIColor whiteColor];\
  4242. [
  4243. \f2\b \cf8 self
  4244. \f0\b0 \cf4 .view addSubview:_noticeView2];\
  4245. \
  4246. \
  4247. JXtopShowVIew *showTopView=[JXtopShowVIew xibJXtopShowVIew];\
  4248. showTopView.frame= _noticeView2.bounds;\
  4249. [_noticeView2 addSubview:showTopView];\
  4250. \f2\b \cf8 self
  4251. \f0\b0 \cf4 .showTopView=showTopView;\
  4252. [showTopView.tebieGuanXin addTarget:
  4253. \f2\b \cf8 self
  4254. \f0\b0 \cf4 action:
  4255. \f2\b \cf8 @selector
  4256. \f0\b0 \cf4 (tebieBtnClickXX) forControlEvents:UIControlEventTouchUpInside];\
  4257. [showTopView.tebieBtn addTarget:
  4258. \f2\b \cf8 self
  4259. \f0\b0 \cf4 action:
  4260. \f2\b \cf8 @selector
  4261. \f0\b0 \cf4 (tebieBtnClick) forControlEvents:UIControlEventTouchUpInside];\
  4262. \
  4263. \
  4264. showTopView.jxGuanXinBlockBtn = ^(UIButton *btn) \{\
  4265. \
  4266. memberData *modelXXX=_tempArrMM[btn.tag];\
  4267. \
  4268. \f2\b \cf8 long
  4269. \f0\b0 \cf4 time = (
  4270. \f2\b \cf8 long
  4271. \f0\b0 \cf4 )[[NSDate date] timeIntervalSince1970];\
  4272. time = (time *\cf7 1000\cf4 + g_server.timeDifference);\
  4273. NSString *salt = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , time];\
  4274. \
  4275. [g_server getUserRoomAttentionattentionLastInfo:salt userId:[NSString stringWithFormat:\cf6 @"%ld"\cf4 ,modelXXX.userId] jid:_roomJid andToView:
  4276. \f2\b \cf8 self
  4277. \f0\b0 \cf4 ];\
  4278. \};\
  4279. \
  4280. \
  4281. JXLabelObject *obj = [JXLabelObject sharedInstance];\
  4282. obj.roomJid =
  4283. \f2\b \cf8 self
  4284. \f0\b0 \cf4 .roomJid;\
  4285. NSString *selectItem = [obj fetchGroupAnnouncementSelectItemFromLocal];\
  4286. \cf2 // if (selectItem) \{\cf4 \
  4287. \cf2 // NSArray *temp = [selectItem componentsSeparatedByString:@"-"];\cf4 \
  4288. \cf2 // //NSString *first = temp.firstObject;\cf4 \
  4289. \cf2 // NSString *last = temp.lastObject;\cf4 \
  4290. \cf2 // [showTopView.caizongBtn setTitle:[NSString stringWithFormat:@"%@:",last] forState:(UIControlStateNormal)];\cf4 \
  4291. \cf2 // \}else \{\cf4 \
  4292. \cf2 // [showTopView.caizongBtn setTitle:@"
  4293. \f1 \'bf\'aa\'bd\'b1\'bd\'e1\'b9\'fb
  4294. \f0 " forState:(UIControlStateNormal)];\cf4 \
  4295. \cf2 // \}\cf4 \
  4296. [showTopView.caizongBtn addTarget:
  4297. \f2\b \cf8 self
  4298. \f0\b0 \cf4 action:
  4299. \f2\b \cf8 @selector
  4300. \f0\b0 \cf4 (notice2ndClick) forControlEvents:(UIControlEventTouchUpInside)];\
  4301. \
  4302. \
  4303. \f2\b \cf8 if
  4304. \f0\b0 \cf4 (selectItem) \{\
  4305. \cf2 //_table.contentInset = UIEdgeInsetsMake(73, 0, 0, 0);\cf4 \
  4306. _noticeView2.hidden =
  4307. \f2\b \cf8 NO
  4308. \f0\b0 \cf4 ;\
  4309. _noticeViewScrollView.hidden =
  4310. \f2\b \cf8 YES
  4311. \f0\b0 \cf4 ;\
  4312. NSArray *temp = [selectItem componentsSeparatedByString:\cf6 @"-"\cf4 ];\
  4313. \cf2 //NSString *first = temp.firstObject;\cf4 \
  4314. NSString *last = temp.lastObject;\
  4315. \
  4316. \cf2 //NSString *ganF=[temp.firstObject stringByReplacingOccurrencesOfString:@"
  4317. \f1 \'b2\'ca
  4318. \f0 " withString:@""];\cf4 \
  4319. NSString *titleName = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,last];\
  4320. \
  4321. [showTopView.caizongBtn setTitle:[NSString stringWithFormat:\cf6 @"%@:"\cf4 ,titleName] forState:(UIControlStateNormal)];\
  4322. \}
  4323. \f2\b \cf8 else
  4324. \f0\b0 \cf4 \{\
  4325. \
  4326. _table.contentInset = UIEdgeInsetsMake(\cf7 40\cf4 , \cf7 0\cf4 , \cf7 0\cf4 , \cf7 0\cf4 );\
  4327. _noticeViewScrollView.hidden =
  4328. \f2\b \cf8 NO
  4329. \f0\b0 \cf4 ;\
  4330. _noticeView2.hidden =
  4331. \f2\b \cf8 YES
  4332. \f0\b0 \cf4 ;\
  4333. \
  4334. [showTopView.caizongBtn setTitle:\cf6 @"
  4335. \f1 \'bf\'aa\'bd\'b1\'bd\'e1\'b9\'fb
  4336. \f0 "\cf4 forState:(UIControlStateNormal)];\
  4337. \}\
  4338. \
  4339. \
  4340. \
  4341. NSString *groupAnnouncement = [obj fetchAllGroupAnnouncementFromLocal];\
  4342. NSArray *response = [
  4343. \f2\b \cf8 self
  4344. \f0\b0 \cf4 dictionaryWithJsonString: groupAnnouncement];\
  4345. NSMutableArray *modelArray = [NSMutableArray array];\
  4346. \f2\b \cf8 for
  4347. \f0\b0 \cf4 (NSDictionary *dict
  4348. \f2\b \cf8 in
  4349. \f0\b0 \cf4 response) \{\
  4350. [JLSelectModel mj_setupObjectClassInArray:^NSDictionary *\{\
  4351. \f2\b \cf8 return
  4352. \f0\b0 \cf4 \cf7 @\{\cf4 \
  4353. \cf6 @"data"\cf4 : \cf6 @"JLSelectItemModel"\cf4 \
  4354. \cf7 \}\cf4 ;\
  4355. \}];\
  4356. JLSelectModel *model = [JLSelectModel mj_objectWithKeyValues:dict];\
  4357. [modelArray addObject:model];\
  4358. \}\
  4359. \
  4360. \cf2 //
  4361. \f1 \'b2\'f0\'b7\'d6
  4362. \f0 \cf4 \
  4363. \f2\b \cf8 if
  4364. \f0\b0 \cf4 (selectItem) \{\
  4365. NSArray *temp = [selectItem componentsSeparatedByString:\cf6 @"-"\cf4 ];\
  4366. NSString *first = temp.firstObject;\
  4367. NSString *last = temp.lastObject;\
  4368. \
  4369. \f2\b \cf8 for
  4370. \f0\b0 \cf4 (JLSelectModel *model
  4371. \f2\b \cf8 in
  4372. \f0\b0 \cf4 modelArray) \{\
  4373. \f2\b \cf8 if
  4374. \f0\b0 \cf4 ([model.name isEqualToString:first]) \{\
  4375. \f2\b \cf8 for
  4376. \f0\b0 \cf4 (JLSelectItemModel *selectItemModel
  4377. \f2\b \cf8 in
  4378. \f0\b0 \cf4 model.data) \{\
  4379. \f2\b \cf8 if
  4380. \f0\b0 \cf4 ([selectItemModel.subName isEqualToString:last]) \{\
  4381. groupAnnouncement = selectItemModel.content;\
  4382. \cf2 //_leftLabel2.text = groupAnnouncement;\cf4 \
  4383. \
  4384. showTopView.selectItemModel=selectItemModel;\
  4385. \}\
  4386. \}\
  4387. \}\
  4388. \}\
  4389. \
  4390. \}
  4391. \f2\b \cf8 else
  4392. \f0\b0 \cf4 \{\
  4393. \cf2 // groupAnnouncement = @"";\cf4 \
  4394. \}\
  4395. \
  4396. NSString *allGroupAnnouncement = [obj fetchAllGroupAnnouncementFromLocal];\
  4397. \
  4398. \
  4399. \f2\b \cf8 if
  4400. \f0\b0 \cf4 (allGroupAnnouncement ==
  4401. \f2\b \cf8 nil
  4402. \f0\b0 \cf4 ) \{\
  4403. _noticeView2.hidden =
  4404. \f2\b \cf8 YES
  4405. \f0\b0 \cf4 ;\
  4406. \}
  4407. \f2\b \cf8 else
  4408. \f0\b0 \cf4 \{\
  4409. _noticeView2.hidden =
  4410. \f2\b \cf8 NO
  4411. \f0\b0 \cf4 ;\
  4412. \}\
  4413. \
  4414. \
  4415. \cf2 /*\cf4 \
  4416. \cf2 // _leftLabel2.text = (groupAnnouncement.length>1)?groupAnnouncement:@"";\cf4 \
  4417. \cf2 _leftLabel2.textColor = HEXCOLOR(0x323232);\cf4 \
  4418. \cf2 _leftLabel2.textAlignment = NSTextAlignmentLeft;\cf4 \
  4419. \cf2 _leftLabel2.lineBreakMode = NSLineBreakByCharWrapping;\cf4 \
  4420. \cf2 _leftLabel2.font = SYSFONT(13);\cf4 \
  4421. \cf2 [_showNoticeView2 addSubview:_leftLabel2];\cf4 \
  4422. \
  4423. \cf2 _rightLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_leftLabel2.frame), 0, JX_SCREEN_WIDTH-130, 36)];\cf4 \
  4424. \cf2 _rightLabel2.text = @"";\cf4 \
  4425. \cf2 _rightLabel2.textColor = HEXCOLOR(0x323232);\cf4 \
  4426. \cf2 _rightLabel2.font = SYSFONT(13);\cf4 \
  4427. \cf2 _rightLabel2.textAlignment = NSTextAlignmentLeft;\cf4 \
  4428. \cf2 _rightLabel2.lineBreakMode = NSLineBreakByCharWrapping;\cf4 \
  4429. \cf2 [_showNoticeView2 addSubview:_rightLabel2];*/\cf4 \
  4430. \
  4431. \}\
  4432. \
  4433. - (
  4434. \f2\b \cf8 void
  4435. \f0\b0 \cf4 )\cf11 hideNoticeView\cf4 :(UITapGestureRecognizer *)tap \{\
  4436. _noticeView.hidden =
  4437. \f2\b \cf8 YES
  4438. \f0\b0 \cf4 ;\
  4439. _noticeHeight = \cf7 0\cf4 ;\
  4440. _table.frame = CGRectMake(\cf7 0\cf4 , JX_SCREEN_TOP, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-JX_SCREEN_TOP-JX_SCREEN_BOTTOM);\
  4441. _jumpNewMsgBtn.frame = CGRectMake(JX_SCREEN_WIDTH - \cf7 105\cf4 , JX_SCREEN_TOP + \cf7 20\cf4 +_noticeHeight, \cf7 120\cf4 , \cf7 30\cf4 );\
  4442. \}\
  4443. \
  4444. - (
  4445. \f2\b \cf8 void
  4446. \f0\b0 \cf4 )\cf11 startNoticeTimer\cf4 \{\
  4447. _leftW = \cf7 0\cf4 ;\
  4448. _rightW = _noticeStrW+NOTICE_WIDTH;\
  4449. _noticeTimer = [NSTimer scheduledTimerWithTimeInterval:\cf7 0.04f\cf4 target:
  4450. \f2\b \cf8 self
  4451. \f0\b0 \cf4 selector:
  4452. \f2\b \cf8 @selector
  4453. \f0\b0 \cf4 (updateNoticeTimer:) userInfo:
  4454. \f2\b \cf8 nil
  4455. \f0\b0 \cf4 repeats:
  4456. \f2\b \cf8 YES
  4457. \f0\b0 \cf4 ];\
  4458. \
  4459. [
  4460. \f2\b \cf8 self
  4461. \f0\b0 \cf4 .noticeTimer setFireDate:[NSDate distantPast]];\
  4462. \}\
  4463. \
  4464. - (
  4465. \f2\b \cf8 void
  4466. \f0\b0 \cf4 )\cf11 stopNoticeTimer\cf4 \{\
  4467. [
  4468. \f2\b \cf8 self
  4469. \f0\b0 \cf4 .timer setFireDate:[NSDate distantFuture]];\
  4470. \}\
  4471. \
  4472. - (
  4473. \f2\b \cf8 void
  4474. \f0\b0 \cf4 )\cf11 updateNoticeTimer\cf4 :(NSTimer *)timer \{\
  4475. \f2\b \cf8 self
  4476. \f0\b0 \cf4 .leftW --;\
  4477. \f2\b \cf8 self
  4478. \f0\b0 \cf4 .rightW --;\
  4479. \f2\b \cf8 self
  4480. \f0\b0 \cf4 .leftLabel.frame = CGRectMake(
  4481. \f2\b \cf8 self
  4482. \f0\b0 \cf4 .leftW, \cf7 0\cf4 , _noticeStrW+NOTICE_WIDTH, \cf7 36\cf4 );\
  4483. \f2\b \cf8 self
  4484. \f0\b0 \cf4 .rightLabel.frame = CGRectMake(
  4485. \f2\b \cf8 self
  4486. \f0\b0 \cf4 .rightW, \cf7 0\cf4 , _noticeStrW+NOTICE_WIDTH, \cf7 36\cf4 );\
  4487. \f2\b \cf8 if
  4488. \f0\b0 \cf4 (
  4489. \f2\b \cf8 self
  4490. \f0\b0 \cf4 .leftW <= -_noticeStrW-NOTICE_WIDTH) \{\
  4491. \f2\b \cf8 self
  4492. \f0\b0 \cf4 .leftW = _noticeStrW+NOTICE_WIDTH;\
  4493. \}\
  4494. \f2\b \cf8 if
  4495. \f0\b0 \cf4 (
  4496. \f2\b \cf8 self
  4497. \f0\b0 \cf4 .rightW <= -_noticeStrW-NOTICE_WIDTH) \{\
  4498. \f2\b \cf8 self
  4499. \f0\b0 \cf4 .rightW = _noticeStrW+NOTICE_WIDTH;\
  4500. \}\
  4501. \}\
  4502. \
  4503. - (
  4504. \f2\b \cf8 void
  4505. \f0\b0 \cf4 )\cf11 setupNoticeWithContent\cf4 :(NSString *)noticeStr \cf11 time\cf4 :(NSString *)noticeTime \{\
  4506. CGSize size = [noticeStr sizeWithAttributes:\cf7 @\{\cf4 NSFontAttributeName:SYSFONT(\cf7 13\cf4 )\cf7 \}\cf4 ];\
  4507. _leftLabel.frame = CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , size.width, \cf7 36\cf4 );\
  4508. _leftLabel.text = noticeStr;\
  4509. _rightLabel.frame = CGRectMake(CGRectGetMaxX(_leftLabel.frame), \cf7 0\cf4 , size.width, \cf7 36\cf4 );\
  4510. _rightLabel.text = noticeStr;\
  4511. _noticeStrW = size.width;\
  4512. \f2\b \cf8 if
  4513. \f0\b0 \cf4 (_noticeStrW > _showNoticeView.frame.size.width) \{\
  4514. _rightLabel.hidden =
  4515. \f2\b \cf8 NO
  4516. \f0\b0 \cf4 ;\
  4517. [
  4518. \f2\b \cf8 self
  4519. \f0\b0 \cf4 startNoticeTimer];\
  4520. \}
  4521. \f2\b \cf8 else
  4522. \f0\b0 \cf4 \{\
  4523. _rightLabel.hidden =
  4524. \f2\b \cf8 YES
  4525. \f0\b0 \cf4 ;\
  4526. [
  4527. \f2\b \cf8 self
  4528. \f0\b0 \cf4 stopNoticeTimer];\
  4529. [
  4530. \f2\b \cf8 self
  4531. \f0\b0 \cf4 .noticeTimer invalidate];\
  4532. \f2\b \cf8 self
  4533. \f0\b0 \cf4 .noticeTimer =
  4534. \f2\b \cf8 nil
  4535. \f0\b0 \cf4 ;\
  4536. \}\
  4537. \f2\b \cf8 if
  4538. \f0\b0 \cf4 (noticeStr.length > \cf7 0\cf4 ) \{\
  4539. NSTimeInterval time = [[NSDate date] timeIntervalSince1970];\
  4540. \cf2 //
  4541. \f1 \'b9\'ab\'b8\'e6\'ca\'b1\'bc\'e4\'b3\'ac\'b9\'fd\'d2\'bb\'d6\'dc\'bc\'b4\'b2\'bb\'d4\'d9\'cf\'d4\'ca\'be
  4542. \f0 \cf4 \
  4543. \f2\b \cf8 if
  4544. \f0\b0 \cf4 (time >= \cf7 60\cf4 *\cf7 60\cf4 *\cf7 24\cf4 *\cf7 7\cf4 +[noticeTime intValue]) \{\
  4545. _noticeView.hidden =
  4546. \f2\b \cf8 NO
  4547. \f0\b0 \cf4 ;\
  4548. \cf2 // _noticeHeight = 36*2;\cf4 \
  4549. _noticeHeight = \cf7 0\cf4 ;\
  4550. \}
  4551. \f2\b \cf8 else
  4552. \f0\b0 \cf4 \{\
  4553. _noticeView.hidden =
  4554. \f2\b \cf8 NO
  4555. \f0\b0 \cf4 ;\
  4556. \cf2 //_noticeHeight = 36*2;\cf4 \
  4557. _noticeHeight = \cf7 0\cf4 ;\
  4558. _table.frame = CGRectMake(\cf7 0\cf4 , JX_SCREEN_TOP+_noticeHeight, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-JX_SCREEN_TOP-JX_SCREEN_BOTTOM - _noticeHeight);\
  4559. [_table gotoLastRow:
  4560. \f2\b \cf8 NO
  4561. \f0\b0 \cf4 ];\
  4562. \}\
  4563. \}
  4564. \f2\b \cf8 else
  4565. \f0\b0 \cf4 \{\
  4566. _noticeView.hidden =
  4567. \f2\b \cf8 NO
  4568. \f0\b0 \cf4 ;\
  4569. \cf2 //_noticeHeight = 36*2;\cf4 \
  4570. _noticeHeight = \cf7 0\cf4 ;\
  4571. \}\
  4572. _jumpNewMsgBtn.frame = CGRectMake(JX_SCREEN_WIDTH - \cf7 105\cf4 , JX_SCREEN_TOP + \cf7 20\cf4 +_noticeHeight, \cf7 120\cf4 , \cf7 30\cf4 );\
  4573. \}\
  4574. \
  4575. \
  4576. \
  4577. \cf2 //
  4578. \f1 \'cc\'f8\'d7\'aa\'b5\'bd\'d0\'c2\'cf\'fb\'cf\'a2
  4579. \f0 \cf4 \
  4580. - (
  4581. \f2\b \cf8 void
  4582. \f0\b0 \cf4 )\cf11 jumpNewMsgBtnAction\cf4 \{\
  4583. NSIndexPath* indexPat = [NSIndexPath indexPathForRow:\cf7 0\cf4 inSection:\cf7 0\cf4 ];\
  4584. [
  4585. \f2\b \cf8 self
  4586. \f0\b0 \cf4 .tableView scrollToRowAtIndexPath:indexPat atScrollPosition:UITableViewScrollPositionBottom animated:
  4587. \f2\b \cf8 YES
  4588. \f0\b0 \cf4 ];\
  4589. _jumpNewMsgBtn.hidden =
  4590. \f2\b \cf8 YES
  4591. \f0\b0 \cf4 ;\
  4592. \}\
  4593. \
  4594. - (
  4595. \f2\b \cf8 void
  4596. \f0\b0 \cf4 )\cf11 screenShotViewAction\cf4 :(UITapGestureRecognizer *)tap \{\
  4597. \
  4598. \f2\b \cf8 if
  4599. \f0\b0 \cf4 ([
  4600. \f2\b \cf8 self
  4601. \f0\b0 \cf4 showDisableSay])\
  4602. \f2\b \cf8 return
  4603. \f0\b0 \cf4 ;\
  4604. \
  4605. \f2\b \cf8 if
  4606. \f0\b0 \cf4 ([
  4607. \f2\b \cf8 self
  4608. \f0\b0 \cf4 sendMsgCheck])\{\
  4609. \f2\b \cf8 return
  4610. \f0\b0 \cf4 ;\
  4611. \}\
  4612. KKImageEditorViewController *editor = [[KKImageEditorViewController alloc] initWithImage:
  4613. \f2\b \cf8 self
  4614. \f0\b0 \cf4 .screenImage delegate:
  4615. \f2\b \cf8 self
  4616. \f0\b0 \cf4 ];\
  4617. \
  4618. UINavigationController *vc = [[UINavigationController alloc] initWithRootViewController:editor];\
  4619. [
  4620. \f2\b \cf8 self
  4621. \f0\b0 \cf4 presentViewController:vc animated:
  4622. \f2\b \cf8 YES
  4623. \f0\b0 \cf4 completion:
  4624. \f2\b \cf8 nil
  4625. \f0\b0 \cf4 ];\
  4626. \
  4627. \}\
  4628. \
  4629. \cf5 #pragma mark
  4630. \f2\b \cf16 -
  4631. \f4 \'d5\'d5\'c6\'ac\'b1\'e0\'bc\'ad\'ba\'f3\'b5\'c4\'bb\'d8\'b5\'f7
  4632. \f0\b0 \cf4 \
  4633. - (
  4634. \f2\b \cf8 void
  4635. \f0\b0 \cf4 )\cf11 imageDidFinishEdittingWithImage\cf4 :(UIImage *)image \cf11 asset\cf4 :(PHAsset *)asset\
  4636. \{\
  4637. \f2\b \cf8 self
  4638. \f0\b0 \cf4 .screenShotImageView.image = image;\
  4639. UIImage *chosedImage =
  4640. \f2\b \cf8 self
  4641. \f0\b0 \cf4 .screenShotImageView.image;\
  4642. \cf2 //
  4643. \f1 \'bb\'f1\'c8\'a1
  4644. \f0 image
  4645. \f1 \'b5\'c4\'b3\'a4\'bf\'ed
  4646. \f0 \cf4 \
  4647. \f2\b \cf8 int
  4648. \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
  4649. \f2\b \cf8 int
  4650. \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
  4651. \
  4652. \f2\b \cf8 self
  4653. \f0\b0 \cf4 .view.frame = CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT);\
  4654. [
  4655. \f2\b \cf8 self
  4656. \f0\b0 \cf4 hideKeyboard:
  4657. \f2\b \cf8 YES
  4658. \f0\b0 \cf4 ];\
  4659. \
  4660. \
  4661. NSString *name = \cf6 @"jpg"\cf4 ;\
  4662. \f2\b \cf8 if
  4663. \f0\b0 \cf4 (
  4664. \f2\b \cf8 self
  4665. \f0\b0 \cf4 .isGroupMessages) \{\
  4666. \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
  4667. \cf2 // NSString *userId = self.userIds[i];\cf4 \
  4668. \cf2 //\cf4 \
  4669. \cf2 // NSString *file = [FileInfo getUUIDFileName:name];\cf4 \
  4670. \cf2 // [g_server saveImageToFile:chosedImage file:file isOriginal:NO];\cf4 \
  4671. \cf2 // [self sendImage:file withWidth:imageWidth andHeight:imageHeight userId:userId];\cf4 \
  4672. \cf12 ///
  4673. \f3 \cf2 / [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];
  4674. \f0 \cf4 \
  4675. \cf2 // \}\cf4 \
  4676. [
  4677. \f2\b \cf8 self
  4678. \f0\b0 \cf4 \cf15 addWaitGroupSendViewWithMsgNum\cf4 :\cf7 1\cf4 \cf15 withType\cf4 :\cf5 groupsend_msgType_image\cf4 ];\
  4679. \f2\b \cf8 self
  4680. \f0\b0 \cf4 .\cf15 groupUploadObjArray\cf4 = [\cf10 NSMutableArray\cf4 \cf14 arrayWithObject\cf4 :chosedImage];\
  4681. \cf15 _onceSendNum\cf4 = \cf7 10\cf4 ;\
  4682. \cf15 _isOriginal\cf4 =
  4683. \f2\b \cf8 NO
  4684. \f0\b0 \cf4 ;\
  4685. [
  4686. \f2\b \cf8 self
  4687. \f0\b0 \cf4 \cf15 sendPhotos\cf4 :
  4688. \f2\b \cf8 self
  4689. \f0\b0 \cf4 .\cf15 groupUploadObjArray\cf4 \cf15 withOriginal\cf4 :
  4690. \f2\b \cf8 NO
  4691. \f0\b0 \cf4 ];\
  4692. \}
  4693. \f2\b \cf8 else
  4694. \f0\b0 \cf4 \{\
  4695. \cf10 NSString\cf4 *file = [\cf9 FileInfo\cf4 \cf15 getUUIDFileName\cf4 :name];\
  4696. [\cf5 g_server\cf4 \cf15 saveImageToFile\cf4 :chosedImage \cf15 file\cf4 :file \cf15 isOriginal\cf4 :
  4697. \f2\b \cf8 NO
  4698. \f0\b0 \cf4 ];\
  4699. [
  4700. \f2\b \cf8 self
  4701. \f0\b0 \cf4 \cf15 sendImage\cf4 :file \cf15 withWidth\cf4 :imageWidth \cf15 andHeight\cf4 :imageHeight \cf15 userId\cf4 :
  4702. \f2\b \cf8 nil
  4703. \f0\b0 \cf4 ];\
  4704. \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
  4705. \}\
  4706. \cf2 // NSString* file = [FileInfo getUUIDFileName:name];\cf4 \
  4707. \cf2 //\cf4 \
  4708. \cf2 // file = [FileInfo getUUIDFileName:name];\cf4 \
  4709. \cf2 // [g_server saveImageToFile:chosedImage file:file isOriginal:NO];\cf4 \
  4710. \cf12 ///
  4711. \f3 \cf2 / [self sendImage:file withWidth:imageWidth andHeight:imageHeight];
  4712. \f0 \cf4 \
  4713. \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut toView:self];\cf4 \
  4714. \
  4715. \f2\b \cf8 self
  4716. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 hidden\cf4 =
  4717. \f2\b \cf8 YES
  4718. \f0\b0 \cf4 ;\
  4719. \cf2 // NSFileManager* fileManager=[NSFileManager defaultManager];\cf4 \
  4720. \cf2 // BOOL blDele= [fileManager removeItemAtPath:ScreenShotImage error:nil];\cf4 \
  4721. \cf2 // if (blDele) \{\cf4 \
  4722. \cf2 // NSLog(@"dele success");\cf4 \
  4723. \cf2 // \}else \{\cf4 \
  4724. \cf2 // NSLog(@"dele fail");\cf4 \
  4725. \cf2 // \}\cf4 \
  4726. \}\
  4727. \
  4728. \
  4729. - (
  4730. \f2\b \cf8 void
  4731. \f0\b0 \cf4 ) \cf11 createFooterSubViews\cf4 \{\
  4732. \
  4733. [\cf15 inputBar\cf4 \cf14 removeFromSuperview\cf4 ];\
  4734. [\cf15 _publicMenuBar\cf4 \cf14 removeFromSuperview\cf4 ];\
  4735. [\cf15 _selectMoreView\cf4 \cf14 removeFromSuperview\cf4 ];\
  4736. \
  4737. \cf2 //
  4738. \f1 \'ca\'e4\'c8\'eb\'cc\'f5
  4739. \f0 \cf4 \
  4740. \cf15 inputBar\cf4 = [[\cf10 UIImageView\cf4 \cf14 alloc\cf4 ] \cf14 initWithImage\cf4 :
  4741. \f2\b \cf8 nil
  4742. \f0\b0 \cf4 ];\
  4743. \cf15 inputBar\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 0\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf7 49\cf4 );\
  4744. \cf15 inputBar\cf4 .\cf14 backgroundColor\cf4 = \cf5 HEXCOLOR\cf4 (\cf7 0xF9F9F9\cf4 );\
  4745. \cf15 inputBar\cf4 .\cf14 userInteractionEnabled\cf4 =
  4746. \f2\b \cf8 YES
  4747. \f0\b0 \cf4 ;\
  4748. \cf15 inputBar\cf4 .\cf14 clipsToBounds\cf4 =
  4749. \f2\b \cf8 YES
  4750. \f0\b0 \cf4 ;\
  4751. [
  4752. \f2\b \cf8 self
  4753. \f0\b0 \cf4 .\cf15 tableFooter\cf4 \cf14 addSubview\cf4 :\cf15 inputBar\cf4 ];\
  4754. \cf2 // [inputBar release];\cf4 \
  4755. \
  4756. \cf2 // UIView* line = [[UIView alloc]initWithFrame:CGRectMake(0,0,JX_SCREEN_WIDTH,0.5)];\cf4 \
  4757. \cf2 // line.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:0.9 alpha:1];\cf4 \
  4758. \cf2 // [inputBar addSubview:line];\cf4 \
  4759. \cf2 // [line release];\cf4 \
  4760. \
  4761. \cf2 //
  4762. \f1 \'a3\'ab
  4763. \f0 \cf4 \
  4764. \f2\b \cf8 self
  4765. \f0\b0 \cf4 .\cf15 shareMore\cf4 = [\cf9 UIFactory\cf4 \cf15 createButtonWithImage\cf4 :\cf6 @"im_show_one_icon"\cf4 \cf15 highlight\cf4 :
  4766. \f2\b \cf8 nil
  4767. \f0\b0 \cf4 \cf15 target\cf4 :
  4768. \f2\b \cf8 self
  4769. \f0\b0 \cf4 \cf15 selector\cf4 :
  4770. \f2\b \cf8 @selector
  4771. \f0\b0 \cf4 (shareMore:)];\
  4772. [
  4773. \f2\b \cf8 self
  4774. \f0\b0 \cf4 .\cf15 shareMore\cf4 \cf14 setImage\cf4 :[\cf10 UIImage\cf4 \cf14 imageNamed\cf4 :\cf6 @"im_input_more_normal"\cf4 ] \cf14 forState\cf4 :\cf14 UIControlStateSelected\cf4 ];\
  4775. \f2\b \cf8 self
  4776. \f0\b0 \cf4 .\cf15 shareMore\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf5 JX_SCREEN_WIDTH\cf4 - \cf7 25\cf4 -\cf7 15\cf4 , \cf7 15\cf4 , \cf7 25\cf4 , \cf7 25\cf4 );\
  4777. [\cf15 inputBar\cf4 \cf14 addSubview\cf4 :
  4778. \f2\b \cf8 self
  4779. \f0\b0 \cf4 .\cf15 shareMore\cf4 ];\
  4780. \cf10 CGFloat\cf4 firstX;\
  4781. \f2\b \cf8 if
  4782. \f0\b0 \cf4 (\cf15 _menuList\cf4 .\cf14 count\cf4 > \cf7 0\cf4 ) \{\
  4783. \f2\b \cf8 self
  4784. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 whiteColor\cf4 ];\
  4785. \cf10 UIButton\cf4 *btn = [\cf9 UIFactory\cf4 \cf15 createButtonWithImage\cf4 :\cf6 @"lashang"\cf4 \cf15 selected\cf4 :\cf6 @"lashang"\cf4 \cf15 target\cf4 :
  4786. \f2\b \cf8 self
  4787. \f0\b0 \cf4 \cf15 selector\cf4 :
  4788. \f2\b \cf8 @selector
  4789. \f0\b0 \cf4 (inputBarSwitch:)];\
  4790. btn.\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf7 10\cf4 , \cf7 8\cf4 +\cf7 2\cf4 , \cf7 32\cf4 , \cf7 32\cf4 );\
  4791. btn.\cf14 selected\cf4 =
  4792. \f2\b \cf8 NO
  4793. \f0\b0 \cf4 ;\
  4794. [\cf15 inputBar\cf4 \cf14 addSubview\cf4 :btn];\
  4795. \
  4796. \cf10 UIView\cf4 *v = [[\cf10 UIView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 47\cf4 , \cf7 0\cf4 , \cf5 LINE_WH\cf4 ,
  4797. \f2\b \cf8 self
  4798. \f0\b0 \cf4 .\cf15 heightFooter\cf4 )];\
  4799. v.\cf14 backgroundColor\cf4 = \cf5 THE_LINE_COLOR\cf4 ;\
  4800. [\cf15 inputBar\cf4 \cf14 addSubview\cf4 :v];\
  4801. \
  4802. firstX = \cf7 52\cf4 ;\
  4803. \
  4804. \cf15 inputBar\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf15 inputBar\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 x\cf4 , \cf15 inputBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 , \cf15 inputBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 , \cf15 inputBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 );\
  4805. \
  4806. \}
  4807. \f2\b \cf8 else
  4808. \f0\b0 \cf4 \{\
  4809. firstX = \cf7 10\cf4 ;\
  4810. inputBar.frame = CGRectMake(inputBar.frame.origin.x, \cf7 0\cf4 , inputBar.frame.size.width, inputBar.frame.size.height);\
  4811. \}\
  4812. \
  4813. UIButton *btn = [UIFactory createButtonWithImage:\cf6 @"im_input_ptt_normal"\cf4 selected:\cf6 @"im_input_keyboard_normal"\cf4 target:
  4814. \f2\b \cf8 self
  4815. \f0\b0 \cf4 selector:
  4816. \f2\b \cf8 @selector
  4817. \f0\b0 \cf4 (recordSwitch:)];\
  4818. btn.frame = CGRectMake(firstX, \cf7 15\cf4 , \cf7 25\cf4 , \cf7 25\cf4 );\
  4819. btn.selected =
  4820. \f2\b \cf8 NO
  4821. \f0\b0 \cf4 ;\
  4822. [inputBar addSubview:btn];\
  4823. _recordBtnLeft = btn;\
  4824. \
  4825. \cf2 //eomoj\cf4 \
  4826. btn = [UIFactory createButtonWithImage:\cf6 @"im_input_expression_normal"\cf4 selected:\cf6 @"im_input_keyboard_normal"\cf4 target:
  4827. \f2\b \cf8 self
  4828. \f0\b0 \cf4 selector:
  4829. \f2\b \cf8 @selector
  4830. \f0\b0 \cf4 (actionFace:)];\
  4831. btn.frame = CGRectMake(JX_SCREEN_WIDTH -\cf7 15\cf4 -\cf7 25\cf4 -\cf7 18\cf4 -\cf7 25\cf4 , \cf7 15\cf4 , \cf7 25\cf4 , \cf7 25\cf4 );\
  4832. btn.selected =
  4833. \f2\b \cf8 NO
  4834. \f0\b0 \cf4 ;\
  4835. [inputBar addSubview:btn];\
  4836. _btnFace = btn;\
  4837. \
  4838. _messageText = [[UITextView alloc] initWithFrame:CGRectMake(firstX + \cf7 35\cf4 , \cf7 8\cf4 , JX_SCREEN_WIDTH-firstX - \cf7 35\cf4 -\cf7 15\cf4 -\cf7 25\cf4 -\cf7 18\cf4 -\cf7 25\cf4 -\cf7 20\cf4 , \cf7 33\cf4 )];\
  4839. _messageText.font = SYSFONT(\cf7 18\cf4 );\
  4840. _messageText.delegate =
  4841. \f2\b \cf8 self
  4842. \f0\b0 \cf4 ;\
  4843. _messageText.layer.cornerRadius = \cf7 2.0\cf4 ;\
  4844. _messageText.layer.masksToBounds =
  4845. \f2\b \cf8 YES
  4846. \f0\b0 \cf4 ;\
  4847. _messageText.enablesReturnKeyAutomatically =
  4848. \f2\b \cf8 YES
  4849. \f0\b0 \cf4 ;\
  4850. _messageText.returnKeyType = UIReturnKeySend;\
  4851. \f2\b \cf8 if
  4852. \f0\b0 \cf4 (![
  4853. \f2\b \cf8 self
  4854. \f0\b0 \cf4 changeEmjoyText:chatPerson.lastInput textColor:[UIColor blackColor]]) \{\
  4855. _messageText.text = chatPerson.lastInput;\
  4856. \}\
  4857. [inputBar addSubview:_messageText];\
  4858. [
  4859. \f2\b \cf8 self
  4860. \f0\b0 \cf4 setTableFooterFrame:_messageText];\
  4861. \
  4862. \cf2 //
  4863. \f1 \'c9\'e8\'d6\'c3\'b2\'cb\'b5\'a5
  4864. \f0 \cf4 \
  4865. UIMenuItem *menuItem = [[UIMenuItem alloc]initWithTitle:Localized(\cf6 @"JX_Newline"\cf4 ) action:
  4866. \f2\b \cf8 @selector
  4867. \f0\b0 \cf4 (selfMenu:)];\
  4868. UIMenuController *menuController = [UIMenuController sharedMenuController];\
  4869. [menuController setMenuItems:[NSArray arrayWithObject:menuItem]];\
  4870. \
  4871. _textViewBtn = [[UIButton alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 10\cf4 , _messageText.frame.size.width, \cf7 12\cf4 )];\
  4872. _textViewBtn.backgroundColor = [UIColor clearColor];\
  4873. [_textViewBtn addTarget:
  4874. \f2\b \cf8 self
  4875. \f0\b0 \cf4 action:
  4876. \f2\b \cf8 @selector
  4877. \f0\b0 \cf4 (textViewBtnAction:) forControlEvents:UIControlEventTouchUpInside];\
  4878. _textViewBtn.hidden =
  4879. \f2\b \cf8 YES
  4880. \f0\b0 \cf4 ;\
  4881. [_messageText addSubview:_textViewBtn];\
  4882. \
  4883. _talkTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , _messageText.frame.size.width, _messageText.frame.size.height)];\
  4884. _talkTimeLabel.font = [UIFont systemFontOfSize:\cf7 15.0\cf4 ];\
  4885. _talkTimeLabel.text = Localized(\cf6 @"JX_TotalSilence"\cf4 );\
  4886. _talkTimeLabel.textColor = [UIColor lightGrayColor];\
  4887. _talkTimeLabel.textAlignment = NSTextAlignmentCenter;\
  4888. [_messageText addSubview:_talkTimeLabel];\
  4889. _talkTimeLabel.hidden =
  4890. \f2\b \cf8 YES
  4891. \f0\b0 \cf4 ;\
  4892. \
  4893. memberData *roomD = [[memberData alloc] init];\
  4894. roomD.roomId =
  4895. \f2\b \cf8 self
  4896. \f0\b0 \cf4 .room.roomId;\
  4897. memberData *roomData = [roomD getCardNameById:MY_USER_ID];\
  4898. \
  4899. \f2\b \cf8 if
  4900. \f0\b0 \cf4 (([
  4901. \f2\b \cf8 self
  4902. \f0\b0 \cf4 .chatPerson.talkTime longLongValue] > \cf7 0\cf4 && !_isAdmin) || [roomData.role intValue] == \cf7 4\cf4 ) \{\
  4903. \f2\b \cf8 if
  4904. \f0\b0 \cf4 ([roomData.role intValue] == \cf7 4\cf4 ) \{\
  4905. _talkTimeLabel.text = Localized(\cf6 @"JX_ProhibitToSpeak"\cf4 );\
  4906. \}\
  4907. _messageText.userInteractionEnabled =
  4908. \f2\b \cf8 NO
  4909. \f0\b0 \cf4 ;\
  4910. _shareMore.enabled =
  4911. \f2\b \cf8 NO
  4912. \f0\b0 \cf4 ;\
  4913. _recordBtnLeft.enabled =
  4914. \f2\b \cf8 NO
  4915. \f0\b0 \cf4 ;\
  4916. _btnFace.enabled =
  4917. \f2\b \cf8 NO
  4918. \f0\b0 \cf4 ;\
  4919. \cf15 _messageText\cf4 .\cf14 text\cf4 =
  4920. \f2\b \cf8 nil
  4921. \f0\b0 \cf4 ;\
  4922. \}
  4923. \f2\b \cf8 else
  4924. \f0\b0 \cf4 \{\
  4925. \cf15 _talkTimeLabel\cf4 .\cf14 hidden\cf4 =
  4926. \f2\b \cf8 YES
  4927. \f0\b0 \cf4 ;\
  4928. \cf15 _shareMore\cf4 .\cf14 enabled\cf4 =
  4929. \f2\b \cf8 YES
  4930. \f0\b0 \cf4 ;\
  4931. \cf15 _recordBtnLeft\cf4 .\cf14 enabled\cf4 =
  4932. \f2\b \cf8 YES
  4933. \f0\b0 \cf4 ;\
  4934. \cf15 _btnFace\cf4 .\cf14 enabled\cf4 =
  4935. \f2\b \cf8 YES
  4936. \f0\b0 \cf4 ;\
  4937. \cf15 _messageText\cf4 .\cf14 userInteractionEnabled\cf4 =
  4938. \f2\b \cf8 YES
  4939. \f0\b0 \cf4 ;\
  4940. \}\
  4941. \
  4942. \cf2 //
  4943. \f1 \'b5\'e3\'bb\'f7\'d3\'ef\'d2\'f4\'cd\'bc\'c6\'ac\'ba\'f3\'b3\'f6\'cf\'d6\'b5\'c4\'c2\'bc\'d6\'c6\'d3\'ef\'d2\'f4\'b0\'b4\'c5\'a5
  4944. \f0 \cf4 \
  4945. btn = [\cf10 UIButton\cf4 \cf14 buttonWithType\cf4 :\cf14 UIButtonTypeRoundedRect\cf4 ];\
  4946. btn.\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf15 _messageText\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 x\cf4 , \cf7 8\cf4 , \cf15 _messageText\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 , \cf7 32\cf4 +\cf7 5.5\cf4 );\
  4947. btn.\cf14 backgroundColor\cf4 = \cf5 HEXCOLOR\cf4 (\cf7 0xFEFEFE\cf4 );\
  4948. btn.\cf14 layer\cf4 .\cf14 borderWidth\cf4 = \cf7 0.5\cf4 ;\
  4949. btn.\cf14 layer\cf4 .\cf14 borderColor\cf4 = [[\cf10 UIColor\cf4 \cf14 grayColor\cf4 ] \cf14 CGColor\cf4 ];\
  4950. [btn \cf14 setTitle\cf4 :\cf5 Localized\cf4 (\cf6 @"JXChatVC_TouchTalk"\cf4 ) \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  4951. [btn \cf14 setTitle\cf4 :\cf5 Localized\cf4 (\cf6 @"JXChatVC_ReleaseEnd"\cf4 ) \cf14 forState\cf4 :\cf14 UIControlEventTouchDown\cf4 ];\
  4952. \cf2 // [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];\cf4 \
  4953. [btn \cf14 setTitleColor\cf4 :[\cf10 UIColor\cf4 \cf14 grayColor\cf4 ] \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  4954. btn.\cf14 titleLabel\cf4 .\cf14 font\cf4 = \cf5 g_factory\cf4 .\cf15 font15b\cf4 ;\
  4955. \cf2 // [btn setTitleShadowColor:[UIColor blackColor] forState:UIControlStateNormal];\cf4 \
  4956. \cf2 // [btn setTitleShadowOffset:CGSizeMake(1, 1)];\cf4 \
  4957. btn.\cf14 layer\cf4 .\cf14 cornerRadius\cf4 = \cf7 5\cf4 ;\
  4958. btn.\cf14 layer\cf4 .\cf14 masksToBounds\cf4 =
  4959. \f2\b \cf8 YES
  4960. \f0\b0 \cf4 ;\
  4961. [\cf15 inputBar\cf4 \cf14 addSubview\cf4 :btn];\
  4962. [btn \cf14 addTarget\cf4 :
  4963. \f2\b \cf8 self
  4964. \f0\b0 \cf4 \cf14 action\cf4 :
  4965. \f2\b \cf8 @selector
  4966. \f0\b0 \cf4 (recordStart:) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchDown\cf4 ];\
  4967. [btn \cf14 addTarget\cf4 :
  4968. \f2\b \cf8 self
  4969. \f0\b0 \cf4 \cf14 action\cf4 :
  4970. \f2\b \cf8 @selector
  4971. \f0\b0 \cf4 (recordStop:) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  4972. [btn \cf14 addTarget\cf4 :
  4973. \f2\b \cf8 self
  4974. \f0\b0 \cf4 \cf14 action\cf4 :
  4975. \f2\b \cf8 @selector
  4976. \f0\b0 \cf4 (recordCancel:) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpOutside\cf4 ];\
  4977. \cf2 //
  4978. \f1 \'ca\'d6\'d6\'b8\'d4\'da
  4979. \f0 control
  4980. \f1 \'b5\'c4
  4981. \f0 bounds
  4982. \f1 \'b7\'b6\'ce\'a7\'c4\'da\'cd\'cf\'b6\'af\'b5\'c4\'b5\'c4\'ca\'c2\'bc\'fe
  4983. \f0 \cf4 \
  4984. [btn \cf14 addTarget\cf4 :
  4985. \f2\b \cf8 self
  4986. \f0\b0 \cf4 \cf14 action\cf4 :
  4987. \f2\b \cf8 @selector
  4988. \f0\b0 \cf4 (showVoice:) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchDragInside\cf4 ];\
  4989. \cf2 //
  4990. \f1 \'b5\'b1\'ca\'d6\'d6\'b8\'cd\'cf\'b6\'af\'b8\'d5\'ba\'c3\'d4\'da
  4991. \f0 control
  4992. \f1 \'b5\'c4
  4993. \f0 bounds
  4994. \f1 \'b7\'b6\'ce\'a7\'cd\'e2\'b5\'c4\'ca\'c2\'bc\'fe
  4995. \f0 \cf4 \
  4996. [btn \cf14 addTarget\cf4 :
  4997. \f2\b \cf8 self
  4998. \f0\b0 \cf4 \cf14 action\cf4 :
  4999. \f2\b \cf8 @selector
  5000. \f0\b0 \cf4 (showCancel:) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchDragOutside\cf4 ];\
  5001. \
  5002. btn.\cf14 selected\cf4 =
  5003. \f2\b \cf8 NO
  5004. \f0\b0 \cf4 ;\
  5005. \cf15 _recordBtn\cf4 = btn;\
  5006. \cf15 _recordBtn\cf4 .\cf14 hidden\cf4 =
  5007. \f2\b \cf8 YES
  5008. \f0\b0 \cf4 ;\
  5009. \
  5010. \f2\b \cf8 if
  5011. \f0\b0 \cf4 (\cf15 _menuList\cf4 .\cf14 count\cf4 > \cf7 0\cf4 ) \{\
  5012. \cf2 //
  5013. \f1 \'b9\'ab\'d6\'da\'ba\'c5\'b2\'cb\'b5\'a5
  5014. \f0 \cf4 \
  5015. \cf15 _publicMenuBar\cf4 = [[\cf10 UIView\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
  5016. \cf15 _publicMenuBar\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 0\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf15 inputBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 );\
  5017. \cf15 _publicMenuBar\cf4 .\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 whiteColor\cf4 ];\
  5018. \cf2 // _publicMenuBar.layer.borderWidth = .5;\cf4 \
  5019. \cf2 // _publicMenuBar.layer.borderColor = [HEXCOLOR(0xdcdcdc) CGColor];\cf4 \
  5020. [
  5021. \f2\b \cf8 self
  5022. \f0\b0 \cf4 .\cf15 tableFooter\cf4 \cf14 addSubview\cf4 :\cf15 _publicMenuBar\cf4 ];\
  5023. [
  5024. \f2\b \cf8 self
  5025. \f0\b0 \cf4 \cf15 createPublicMenu\cf4 :\cf15 _menuList\cf4 ];\
  5026. \}\
  5027. \
  5028. \cf14 dispatch_after\cf4 (\cf14 dispatch_time\cf4 (\cf5 DISPATCH_TIME_NOW\cf4 , (\cf10 int64_t\cf4 )(\cf7 1\cf4 * \cf5 NSEC_PER_SEC\cf4 )), \cf14 dispatch_get_main_queue\cf4 (), ^\{\
  5029. [
  5030. \f2\b \cf8 self
  5031. \f0\b0 \cf4 \cf15 createSelectMoreView\cf4 ];\
  5032. \});\
  5033. \
  5034. \}\
  5035. \
  5036. - (
  5037. \f2\b \cf8 void
  5038. \f0\b0 \cf4 )\cf11 showVoice\cf4 :(\cf10 UIButton\cf4 *)button \{\
  5039. \cf15 _voice\cf4 .\cf15 isWillCancel\cf4 =
  5040. \f2\b \cf8 NO
  5041. \f0\b0 \cf4 ;\
  5042. \}\
  5043. - (
  5044. \f2\b \cf8 void
  5045. \f0\b0 \cf4 )\cf11 showCancel\cf4 :(\cf10 UIButton\cf4 *)button \{\
  5046. \cf15 _voice\cf4 .\cf15 isWillCancel\cf4 =
  5047. \f2\b \cf8 YES
  5048. \f0\b0 \cf4 ;\
  5049. \}\
  5050. \
  5051. \cf2 //
  5052. \f1 \'d2\'fe\'b2\'d8\'cf\'b5\'cd\'b3\'b2\'cb\'b5\'a5\'b5\'c4\'b7\'bd\'b7\'a8
  5053. \f0 \cf4 \
  5054. -(
  5055. \f2\b \cf8 BOOL
  5056. \f0\b0 \cf4 )\cf11 canPerformAction\cf4 :(
  5057. \f2\b \cf8 SEL
  5058. \f0\b0 \cf4 )action \cf11 withSender\cf4 :(
  5059. \f2\b \cf8 id
  5060. \f0\b0 \cf4 )sender\
  5061. \{\
  5062. \cf2 //
  5063. \f1 \'d4\'ca\'d0\'ed\'cf\'d4\'ca\'be
  5064. \f0 \cf4 \
  5065. \f2\b \cf8 if
  5066. \f0\b0 \cf4 (action ==
  5067. \f2\b \cf8 @selector
  5068. \f0\b0 \cf4 (selfMenu:)) \{\
  5069. \f2\b \cf8 return
  5070. \f0\b0 \cf4
  5071. \f2\b \cf8 YES
  5072. \f0\b0 \cf4 ;\
  5073. \}\
  5074. \cf2 //
  5075. \f1 \'c6\'e4\'cb\'fb\'b2\'bb\'d4\'ca\'d0\'ed\'cf\'d4\'ca\'be
  5076. \f0 \cf4 \
  5077. \f2\b \cf8 return
  5078. \f0\b0 \cf4
  5079. \f2\b \cf8 NO
  5080. \f0\b0 \cf4 ;\
  5081. \}\
  5082. \
  5083. - (
  5084. \f2\b \cf8 void
  5085. \f0\b0 \cf4 )\cf11 selfMenu\cf4 :(
  5086. \f2\b \cf8 id
  5087. \f0\b0 \cf4 )sender \{\
  5088. \cf15 _messageText\cf4 .\cf14 text\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@\\r"\cf4 ,\cf15 _messageText\cf4 .\cf14 text\cf4 ];\
  5089. [
  5090. \f2\b \cf8 self
  5091. \f0\b0 \cf4 \cf14 textViewDidChange\cf4 :\cf15 _messageText\cf4 ];\
  5092. \
  5093. \}\
  5094. \
  5095. - (
  5096. \f2\b \cf8 void
  5097. \f0\b0 \cf4 )\cf11 textViewBtnAction\cf4 :(UIButton *)btn \{\
  5098. \
  5099. _messageText.inputView =
  5100. \f2\b \cf8 nil
  5101. \f0\b0 \cf4 ;\
  5102. [_messageText reloadInputViews];\
  5103. \}\
  5104. \
  5105. - (
  5106. \f2\b \cf8 void
  5107. \f0\b0 \cf4 ) \cf11 createPublicMenu\cf4 :(\cf10 NSArray\cf4 *) array \{\
  5108. \
  5109. \cf10 UIButton\cf4 *btn = [\cf9 UIFactory\cf4 \cf15 createButtonWithImage\cf4 :\cf6 @"jiangp"\cf4 \cf15 selected\cf4 :\cf6 @"jiangp"\cf4 \cf15 target\cf4 :
  5110. \f2\b \cf8 self
  5111. \f0\b0 \cf4 \cf15 selector\cf4 :
  5112. \f2\b \cf8 @selector
  5113. \f0\b0 \cf4 (publicMenuSwitch:)];\
  5114. btn.\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf7 10\cf4 , \cf7 8\cf4 , \cf7 32\cf4 , \cf7 32\cf4 );\
  5115. btn.\cf14 selected\cf4 =
  5116. \f2\b \cf8 NO
  5117. \f0\b0 \cf4 ;\
  5118. [\cf15 _publicMenuBar\cf4 \cf14 addSubview\cf4 :btn];\
  5119. \
  5120. \
  5121. \cf10 CGFloat\cf4 btnWidth = (\cf5 JX_SCREEN_WIDTH\cf4 - \cf7 52\cf4 ) / array.\cf14 count\cf4 ;\
  5122. \f2\b \cf8 for
  5123. \f0\b0 \cf4 (\cf10 NSInteger\cf4 i = \cf7 0\cf4 ; i < array.\cf14 count\cf4 ; i ++) \{\
  5124. \cf10 NSDictionary\cf4 *dict = array[i];\
  5125. \cf10 NSString\cf4 *name = dict[\cf6 @"name"\cf4 ];\
  5126. btn = [[\cf10 UIButton\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf14 CGRectGetMaxX\cf4 (btn.\cf14 frame\cf4 ), \cf7 0\cf4 , btnWidth, \cf15 _publicMenuBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 )];\
  5127. btn.\cf14 tag\cf4 = i;\
  5128. [btn \cf14 addTarget\cf4 :
  5129. \f2\b \cf8 self
  5130. \f0\b0 \cf4 \cf14 action\cf4 :
  5131. \f2\b \cf8 @selector
  5132. \f0\b0 \cf4 (publicMenuBtnAction:) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  5133. \
  5134. \f2\b \cf8 if
  5135. \f0\b0 \cf4 (i == \cf7 0\cf4 ) \{\
  5136. \cf10 CGRect\cf4 frame = btn.\cf14 frame\cf4 ;\
  5137. frame.\cf14 origin\cf4 .\cf14 x\cf4 = \cf7 52\cf4 ;\
  5138. btn.\cf14 frame\cf4 = frame;\
  5139. \}\
  5140. btn.\cf14 titleLabel\cf4 .\cf14 font\cf4 = \cf5 SYSFONT\cf4 (\cf7 15.0\cf4 );\
  5141. [btn \cf14 setTitleColor\cf4 :[\cf10 UIColor\cf4 \cf14 darkGrayColor\cf4 ] \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  5142. [btn \cf14 setTitle\cf4 :name \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  5143. [\cf15 _publicMenuBar\cf4 \cf14 addSubview\cf4 :btn];\
  5144. \
  5145. \cf10 UIView\cf4 *v = [[\cf10 UIView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (btn.\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 x\cf4 , \cf7 0\cf4 , \cf5 LINE_WH\cf4 , \cf15 _publicMenuBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 )];\
  5146. v.\cf14 backgroundColor\cf4 = \cf5 THE_LINE_COLOR\cf4 ;\
  5147. [\cf15 _publicMenuBar\cf4 \cf14 addSubview\cf4 :v];\
  5148. \
  5149. \cf10 CGSize\cf4 size = [name \cf14 boundingRectWithSize\cf4 :\cf14 CGSizeMake\cf4 (\cf5 MAXFLOAT\cf4 , \cf5 MAXFLOAT\cf4 ) \cf14 options\cf4 :\cf14 NSStringDrawingUsesLineFragmentOrigin\cf4 \cf14 attributes\cf4 :\cf7 @\{\cf14 NSFontAttributeName\cf4 :\cf5 SYSFONT\cf4 (\cf7 15.0\cf4 )\cf7 \}\cf4 \cf14 context\cf4 :
  5150. \f2\b \cf8 nil
  5151. \f0\b0 \cf4 ].\cf14 size\cf4 ;\
  5152. \cf10 CGFloat\cf4 imageX = (btnWidth - size.\cf14 width\cf4 ) / \cf7 2\cf4 - \cf7 20\cf4 ;\
  5153. \cf10 UIImageView\cf4 *imageView = [[\cf10 UIImageView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (imageX, (btn.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 - \cf7 16\cf4 ) / \cf7 2\cf4 , \cf7 15\cf4 , \cf7 15\cf4 )];\
  5154. imageView.\cf14 image\cf4 = [\cf10 UIImage\cf4 \cf14 imageNamed\cf4 :\cf6 @"public_menu"\cf4 ];\
  5155. [btn \cf14 addSubview\cf4 :imageView];\
  5156. \}\
  5157. \}\
  5158. \
  5159. - (
  5160. \f2\b \cf8 void
  5161. \f0\b0 \cf4 )\cf11 createSelectMoreView\cf4 \{\
  5162. \
  5163. \cf15 _selectMoreView\cf4 = [[\cf10 UIView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :
  5164. \f2\b \cf8 self
  5165. \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 bounds\cf4 ];\
  5166. \cf15 _selectMoreView\cf4 .\cf14 hidden\cf4 =
  5167. \f2\b \cf8 YES
  5168. \f0\b0 \cf4 ;\
  5169. \cf15 _selectMoreView\cf4 .\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 whiteColor\cf4 ];\
  5170. [
  5171. \f2\b \cf8 self
  5172. \f0\b0 \cf4 .\cf15 tableFooter\cf4 \cf14 addSubview\cf4 :\cf15 _selectMoreView\cf4 ];\
  5173. \
  5174. \cf10 NSArray\cf4 *imageNames = \cf7 @[\cf6 @"msf"\cf4 , \cf6 @"msc"\cf4 , \cf6 @"msd"\cf4 , \cf6 @"mse"\cf7 ]\cf4 ;\
  5175. \cf10 CGFloat\cf4 w = \cf7 40\cf4 ;\
  5176. \cf10 CGFloat\cf4 margin = (\cf5 JX_SCREEN_WIDTH\cf4 - imageNames.\cf14 count\cf4 * w) / (imageNames.\cf14 count\cf4 + \cf7 1\cf4 );\
  5177. \cf10 CGFloat\cf4 x = margin;\
  5178. \f2\b \cf8 for
  5179. \f0\b0 \cf4 (\cf10 NSInteger\cf4 i = \cf7 0\cf4 ; i < imageNames.\cf14 count\cf4 ; i ++) \{\
  5180. \cf10 NSString\cf4 *imageName = imageNames[i];\
  5181. \cf10 UIButton\cf4 *btn = [[\cf10 UIButton\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (x, \cf7 5\cf4 , w, w)];\
  5182. [btn \cf14 setBackgroundImage\cf4 :[\cf10 UIImage\cf4 \cf14 imageNamed\cf4 :imageName] \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
  5183. btn.\cf14 tag\cf4 = i;\
  5184. [btn \cf14 addTarget\cf4 :
  5185. \f2\b \cf8 self
  5186. \f0\b0 \cf4 \cf14 action\cf4 :
  5187. \f2\b \cf8 @selector
  5188. \f0\b0 \cf4 (selectMoreViewBtnAction:) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
  5189. [\cf15 _selectMoreView\cf4 \cf14 addSubview\cf4 :btn];\
  5190. \
  5191. x = \cf14 CGRectGetMaxX\cf4 (btn.\cf14 frame\cf4 ) + margin;\
  5192. \}\
  5193. \}\
  5194. \
  5195. - (
  5196. \f2\b \cf8 void
  5197. \f0\b0 \cf4 )\cf11 selectMoreViewBtnAction\cf4 :(\cf10 UIButton\cf4 *)btn \{\
  5198. \
  5199. \f2\b \cf8 for
  5200. \f0\b0 \cf4 (\cf10 NSInteger\cf4 i = \cf7 0\cf4 ; i <
  5201. \f2\b \cf8 self
  5202. \f0\b0 \cf4 .\cf15 selectMoreArr\cf4 .\cf14 count\cf4 ; i ++) \{\
  5203. \cf9 JXMessageObject\cf4 *msg1 =
  5204. \f2\b \cf8 self
  5205. \f0\b0 \cf4 .\cf15 selectMoreArr\cf4 [i];\
  5206. \f2\b \cf8 for
  5207. \f0\b0 \cf4 (\cf10 NSInteger\cf4 j = i + \cf7 1\cf4 ; j <
  5208. \f2\b \cf8 self
  5209. \f0\b0 \cf4 .\cf15 selectMoreArr\cf4 .\cf14 count\cf4 ; j ++) \{\
  5210. \cf9 JXMessageObject\cf4 *msg2 =
  5211. \f2\b \cf8 self
  5212. \f0\b0 \cf4 .\cf15 selectMoreArr\cf4 [j];\
  5213. \f2\b \cf8 if
  5214. \f0\b0 \cf4 ([msg1.\cf15 timeSend\cf4 \cf14 timeIntervalSince1970\cf4 ] > [msg2.\cf15 timeSend\cf4 \cf14 timeIntervalSince1970\cf4 ]) \{\
  5215. \cf9 JXMessageObject\cf4 *msg = msg1;\
  5216. msg1 = msg2;\
  5217. \f2\b \cf8 self
  5218. \f0\b0 \cf4 .\cf15 selectMoreArr\cf4 [i] = msg2;\
  5219. msg2 = msg;\
  5220. \f2\b \cf8 self
  5221. \f0\b0 \cf4 .\cf15 selectMoreArr\cf4 [j] = msg;\
  5222. \}\
  5223. \}\
  5224. \}\
  5225. \
  5226. \f2\b \cf8 if
  5227. \f0\b0 \cf4 (
  5228. \f2\b \cf8 self
  5229. \f0\b0 \cf4 .\cf15 selectMoreArr\cf4 .\cf14 count\cf4 <= \cf7 0\cf4 ) \{\
  5230. [\cf5 g_App\cf4 \cf15 showAlert\cf4 :\cf5 Localized\cf4 (\cf6 @"JX_PleaseSelectTheMessageRecord"\cf4 )];\
  5231. \f2\b \cf8 return
  5232. \f0\b0 \cf4 ;\
  5233. \}\
  5234. \
  5235. \f2\b \cf8 switch
  5236. \f0\b0 \cf4 (btn.\cf14 tag\cf4 ) \{\
  5237. \f2\b \cf8 case
  5238. \f0\b0 \cf4 \cf7 0\cf4 :\{ \cf2 //
  5239. \f1 \'c5\'fa\'c1\'bf\'d7\'aa\'b7\'a2
  5240. \f0 \cf4 \
  5241. \
  5242. \cf9 memberData\cf4 *data = [
  5243. \f2\b \cf8 self
  5244. \f0\b0 \cf4 .\cf15 room\cf4 \cf15 getMember\cf4 :\cf5 g_myself\cf4 .\cf15 userId\cf4 ];\
  5245. \f2\b \cf8 if
  5246. \f0\b0 \cf4 ([data.\cf15 role\cf4 \cf14 integerValue\cf4 ] == \cf7 4\cf4 ) \{\
  5247. [\cf9 JXMyTools\cf4 \cf15 showTipView\cf4 :\cf6 @"
  5248. \f1 \'d2\'fe\'c9\'ed\'c8\'cb\'b2\'bb\'c4\'dc\'d7\'aa\'b7\'a2\'cf\'fb\'cf\'a2
  5249. \f0 "\cf4 ];\
  5250. \f2\b \cf8 return
  5251. \f0\b0 \cf4 ;\
  5252. \}\
  5253. \
  5254. \cf9 JXActionSheetVC\cf4 *actionVC = [[\cf9 JXActionSheetVC\cf4 \cf14 alloc\cf4 ] \cf15 initWithImages\cf4 :\cf7 @[]\cf4 \cf15 names\cf4 :\cf7 @[\cf5 Localized\cf4 (\cf6 @"JX_OneByOneForward"\cf4 ),\cf5 Localized\cf4 (\cf6 @"JX_MergeAndForward"\cf4 )\cf7 ]\cf4 ];\
  5255. actionVC.\cf15 tag\cf4 = \cf7 2457\cf4 ;\
  5256. actionVC.\cf15 delegate\cf4 =
  5257. \f2\b \cf8 self
  5258. \f0\b0 \cf4 ;\
  5259. [
  5260. \f2\b \cf8 self
  5261. \f0\b0 \cf4 \cf14 presentViewController\cf4 :actionVC \cf14 animated\cf4 :
  5262. \f2\b \cf8 NO
  5263. \f0\b0 \cf4 \cf14 completion\cf4 :
  5264. \f2\b \cf8 nil
  5265. \f0\b0 \cf4 ];\
  5266. \}\
  5267. \
  5268. \f2\b \cf8 break
  5269. \f0\b0 \cf4 ;\
  5270. \f2\b \cf8 case
  5271. \f0\b0 \cf4 \cf7 1\cf4 :\{ \cf2 //
  5272. \f1 \'c5\'fa\'c1\'bf\'ca\'d5\'b2\'d8
  5273. \f0 \cf4 \
  5274. \cf10 UIAlertView\cf4 *alert = [[\cf10 UIAlertView\cf4 \cf14 alloc\cf4 ] \cf14 initWithTitle\cf4 :
  5275. \f2\b \cf8 nil
  5276. \f0\b0 \cf4 \cf14 message\cf4 :\cf5 Localized\cf4 (\cf6 @"JX_CollectedType"\cf4 ) \cf14 delegate\cf4 :
  5277. \f2\b \cf8 self
  5278. \f0\b0 \cf4 \cf14 cancelButtonTitle\cf4 :\cf5 Localized\cf4 (\cf6 @"JX_Cencal"\cf4 ) \cf14 otherButtonTitles\cf4 :\cf5 Localized\cf4 (\cf6 @"JX_Collection"\cf4 ),
  5279. \f2\b \cf8 nil
  5280. \f0\b0 \cf4 ];\
  5281. alert.\cf14 tag\cf4 = \cf7 2457\cf4 ;\
  5282. [alert \cf14 show\cf4 ];\
  5283. \}\
  5284. \f2\b \cf8 break
  5285. \f0\b0 \cf4 ;\
  5286. \f2\b \cf8 case
  5287. \f0\b0 \cf4 \cf7 2\cf4 :\{ \cf2 //
  5288. \f1 \'c5\'fa\'c1\'bf\'c9\'be\'b3\'fd
  5289. \f0 \cf4 \
  5290. \
  5291. \cf10 NSMutableString\cf4 *msgIds = [\cf10 NSMutableString\cf4 \cf14 string\cf4 ];\
  5292. \f2\b \cf8 for
  5293. \f0\b0 \cf4 (\cf10 NSInteger\cf4 i = \cf7 0\cf4 ; i <
  5294. \f2\b \cf8 self
  5295. \f0\b0 \cf4 .\cf15 selectMoreArr\cf4 .\cf14 count\cf4 ; i ++) \{\
  5296. \cf9 JXMessageObject\cf4 *msg =
  5297. \f2\b \cf8 self
  5298. \f0\b0 \cf4 .\cf15 selectMoreArr\cf4 [i];\
  5299. \cf10 NSInteger\cf4 indexNum = -\cf7 1\cf4 ;\
  5300. \f2\b \cf8 for
  5301. \f0\b0 \cf4 (\cf10 NSInteger\cf4 j = \cf7 0\cf4 ; j < \cf15 _array\cf4 .\cf14 count\cf4 ; j ++) \{\
  5302. \cf9 JXMessageObject\cf4 *msg1 = \cf15 _array\cf4 [j];\
  5303. \f2\b \cf8 if
  5304. \f0\b0 \cf4 ([msg1.\cf15 messageId\cf4 \cf14 isEqualToString\cf4 :msg.\cf15 messageId\cf4 ]) \{\
  5305. \f2\b \cf8 if
  5306. \f0\b0 \cf4 (msgIds.\cf14 length\cf4 <= \cf7 0\cf4 ) \{\
  5307. [msgIds \cf14 appendString\cf4 :msg1.\cf15 messageId\cf4 ];\
  5308. \}
  5309. \f2\b \cf8 else
  5310. \f0\b0 \cf4 \{\
  5311. [msgIds \cf14 appendFormat\cf4 :\cf6 @",%@"\cf4 ,msg1.\cf15 messageId\cf4 ];\
  5312. \}\
  5313. indexNum = j;\
  5314. \f2\b \cf8 break
  5315. \f0\b0 \cf4 ;\
  5316. \}\
  5317. \}\
  5318. \
  5319. \cf10 NSString\cf4 * s;\
  5320. \f2\b \cf8 if
  5321. \f0\b0 \cf4 ([
  5322. \f2\b \cf8 self
  5323. \f0\b0 \cf4 .\cf15 roomJid\cf4 \cf14 length\cf4 ]>\cf7 0\cf4 )\
  5324. s =
  5325. \f2\b \cf8 self
  5326. \f0\b0 \cf4 .\cf15 roomJid\cf4 ;\
  5327. \f2\b \cf8 else
  5328. \f0\b0 \cf4 \
  5329. s = \cf15 chatPerson\cf4 .\cf15 userId\cf4 ;\
  5330. \
  5331. \
  5332. \f2\b \cf8 if
  5333. \f0\b0 \cf4 (indexNum == \cf15 _array\cf4 .\cf14 count\cf4 - \cf7 1\cf4 ) \{\
  5334. \f2\b \cf8 if
  5335. \f0\b0 \cf4 (indexNum <= \cf7 0\cf4 ) \{\
  5336. \cf9 JXMessageObject\cf4 *lastMsg = [\cf15 _array\cf4 \cf14 firstObject\cf4 ];\
  5337. \f2\b \cf8 self
  5338. \f0\b0 \cf4 .\cf15 lastMsg\cf4 .\cf15 content\cf4 =
  5339. \f2\b \cf8 nil
  5340. \f0\b0 \cf4 ;\
  5341. [lastMsg \cf15 updateLastSend\cf4 :\cf15 UpdateLastSendType_None\cf4 ];\
  5342. \}
  5343. \f2\b \cf8 else
  5344. \f0\b0 \cf4 \{\
  5345. \cf9 JXMessageObject\cf4 *newLastMsg = \cf15 _array\cf4 [indexNum - \cf7 1\cf4 ];\
  5346. \f2\b \cf8 self
  5347. \f0\b0 \cf4 .\cf15 lastMsg\cf4 .\cf15 content\cf4 = newLastMsg.\cf15 content\cf4 ;\
  5348. [newLastMsg \cf15 updateLastSend\cf4 :\cf15 UpdateLastSendType_None\cf4 ];\
  5349. \}\
  5350. \}\
  5351. \
  5352. \cf2 //
  5353. \f1 \'c9\'be\'b3\'fd\'b1\'be\'b5\'d8\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
  5354. \f0 \cf4 \
  5355. [\cf15 _array\cf4 \cf14 removeObjectAtIndex\cf4 :indexNum];\
  5356. [msg
  5357. \f2\b \cf8 delete
  5358. \f0\b0 \cf4 ];\
  5359. \
  5360. [\cf15 _table\cf4 \cf15 deleteRow\cf4 :(
  5361. \f2\b \cf8 int
  5362. \f0\b0 \cf4 )indexNum \cf15 section\cf4 :\cf7 0\cf4 ];\
  5363. \
  5364. \}\
  5365. \
  5366. \f2\b \cf8 if
  5367. \f0\b0 \cf4 (msgIds.\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  5368. \f2\b \cf8 int
  5369. \f0\b0 \cf4 type = \cf7 1\cf4 ;\
  5370. \f2\b \cf8 if
  5371. \f0\b0 \cf4 (
  5372. \f2\b \cf8 self
  5373. \f0\b0 \cf4 .\cf15 roomJid\cf4 ) \{\
  5374. type = \cf7 2\cf4 ;\
  5375. \}\
  5376. \f2\b \cf8 self
  5377. \f0\b0 \cf4 .\cf15 withdrawIndex\cf4 = -\cf7 1\cf4 ;\
  5378. \cf2 // [g_server tigaseDeleteMsgWithMessageId:msgIds type:type deleteType:1 roomJid:self.roomJid toView:self];\cf4 \
  5379. [\cf5 g_server\cf4 \cf15 tigaseDeleteMsgWithMessageId\cf4 :msgIds \cf15 type\cf4 :type \cf15 deleteType\cf4 :\cf7 2\cf4 \cf15 roomJid\cf4 :
  5380. \f2\b \cf8 self
  5381. \f0\b0 \cf4 .\cf15 roomJid\cf4 \cf15 deleteOrWithdraw\cf4 :\cf15 kWCMessageTypeSuperDelete\cf4 \cf15 toView\cf4 :
  5382. \f2\b \cf8 self
  5383. \f0\b0 \cf4 ];\
  5384. \}\
  5385. \
  5386. \f2\b \cf8 if
  5387. \f0\b0 \cf4 (
  5388. \f2\b \cf8 self
  5389. \f0\b0 \cf4 .\cf15 isSelectMore\cf4 ) \{\
  5390. [
  5391. \f2\b \cf8 self
  5392. \f0\b0 \cf4 \cf15 actionQuit\cf4 ];\
  5393. \}\
  5394. \
  5395. \}\
  5396. \
  5397. \f2\b \cf8 break
  5398. \f0\b0 \cf4 ;\
  5399. \f2\b \cf8 case
  5400. \f0\b0 \cf4 \cf7 3\cf4 :\{\
  5401. \cf9 JXActionSheetVC\cf4 *actionVC = [[\cf9 JXActionSheetVC\cf4 \cf14 alloc\cf4 ] \cf15 initWithImages\cf4 :\cf7 @[]\cf4 \cf15 names\cf4 :\cf7 @[\cf5 Localized\cf4 (\cf6 @"JX_SaveToTheAlbum"\cf4 )\cf7 ]\cf4 ];\
  5402. actionVC.\cf15 tag\cf4 = \cf7 2458\cf4 ;\
  5403. actionVC.\cf15 delegate\cf4 =
  5404. \f2\b \cf8 self
  5405. \f0\b0 \cf4 ;\
  5406. [
  5407. \f2\b \cf8 self
  5408. \f0\b0 \cf4 \cf14 presentViewController\cf4 :actionVC \cf14 animated\cf4 :
  5409. \f2\b \cf8 NO
  5410. \f0\b0 \cf4 \cf14 completion\cf4 :
  5411. \f2\b \cf8 nil
  5412. \f0\b0 \cf4 ];\
  5413. \}\
  5414. \
  5415. \f2\b \cf8 break
  5416. \f0\b0 \cf4 ;\
  5417. \
  5418. \f2\b \cf8 default
  5419. \f0\b0 \cf4 :\
  5420. \f2\b \cf8 break
  5421. \f0\b0 \cf4 ;\
  5422. \}\
  5423. \}\
  5424. \
  5425. - (
  5426. \f2\b \cf8 void
  5427. \f0\b0 \cf4 )\cf11 inputBarSwitch\cf4 :(\cf10 UIButton\cf4 *)btn \{\
  5428. \f2\b \cf8 self
  5429. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 whiteColor\cf4 ];\
  5430. \f2\b \cf8 self
  5431. \f0\b0 \cf4 .\cf15 heightFooter\cf4 = \cf7 49\cf4 ;\
  5432. [
  5433. \f2\b \cf8 self
  5434. \f0\b0 \cf4 \cf15 hideKeyboard\cf4 :
  5435. \f2\b \cf8 YES
  5436. \f0\b0 \cf4 ];\
  5437. \cf15 _publicMenuBar\cf4 .\cf14 hidden\cf4 =
  5438. \f2\b \cf8 NO
  5439. \f0\b0 \cf4 ;\
  5440. \cf15 inputBar\cf4 .\cf14 hidden\cf4 =
  5441. \f2\b \cf8 YES
  5442. \f0\b0 \cf4 ;\
  5443. [\cf10 UIView\cf4 \cf14 animateWithDuration\cf4 :\cf7 .3\cf4 \cf14 animations\cf4 :^\{\
  5444. \cf15 _publicMenuBar\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf15 _publicMenuBar\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 x\cf4 , \cf7 0\cf4 , \cf15 _publicMenuBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 , \cf15 _publicMenuBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 );\
  5445. \cf15 inputBar\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf15 inputBar\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 x\cf4 ,
  5446. \f2\b \cf8 self
  5447. \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 , \cf15 inputBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 , \cf15 inputBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 );\
  5448. \}];\
  5449. \}\
  5450. \
  5451. - (
  5452. \f2\b \cf8 void
  5453. \f0\b0 \cf4 )\cf11 publicMenuSwitch\cf4 :(\cf10 UIButton\cf4 *)btn \{\
  5454. [
  5455. \f2\b \cf8 self
  5456. \f0\b0 \cf4 \cf15 setTableFooterFrame\cf4 :\cf15 _messageText\cf4 ];\
  5457. \f2\b \cf8 self
  5458. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 backgroundColor\cf4 = \cf5 HEXCOLOR\cf4 (\cf7 0xF9F9F9\cf4 );\
  5459. \cf15 _publicMenuBar\cf4 .\cf14 hidden\cf4 =
  5460. \f2\b \cf8 YES
  5461. \f0\b0 \cf4 ;\
  5462. \cf15 inputBar\cf4 .\cf14 hidden\cf4 =
  5463. \f2\b \cf8 NO
  5464. \f0\b0 \cf4 ;\
  5465. [\cf10 UIView\cf4 \cf14 animateWithDuration\cf4 :\cf7 .3\cf4 \cf14 animations\cf4 :^\{\
  5466. \cf15 _publicMenuBar\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf15 _publicMenuBar\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 x\cf4 ,
  5467. \f2\b \cf8 self
  5468. \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 , \cf15 _publicMenuBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 , \cf15 _publicMenuBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 );\
  5469. \cf15 inputBar\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf15 inputBar\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 x\cf4 , \cf7 0\cf4 , \cf15 inputBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 , \cf15 inputBar\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 );\
  5470. \}];\
  5471. \}\
  5472. \
  5473. - (
  5474. \f2\b \cf8 void
  5475. \f0\b0 \cf4 )\cf11 publicMenuBtnAction\cf4 :(\cf10 UIButton\cf4 *)btn \{\
  5476. \cf10 UIWindow\cf4 *window = [[\cf10 UIApplication\cf4 \cf14 sharedApplication\cf4 ].\cf14 delegate\cf4 \cf14 window\cf4 ];\
  5477. \cf10 CGRect\cf4 moreFrame = [
  5478. \f2\b \cf8 self
  5479. \f0\b0 \cf4 .\cf15 tableFooter\cf4 \cf14 convertRect\cf4 :btn.\cf14 frame\cf4 \cf14 toView\cf4 :window];\
  5480. \
  5481. \f2\b \cf8 self
  5482. \f0\b0 \cf4 .\cf15 selMenuIndex\cf4 = btn.\cf14 tag\cf4 ;\
  5483. \cf10 NSDictionary\cf4 *dict = \cf15 _menuList\cf4 [btn.\cf14 tag\cf4 ];\
  5484. \cf10 NSArray\cf4 *arr = dict[\cf6 @"menuList"\cf4 ];\
  5485. \
  5486. \f2\b \cf8 if
  5487. \f0\b0 \cf4 (!arr || arr.\cf14 count\cf4 <= \cf7 0\cf4 ) \{\
  5488. \cf9 webpageVC\cf4 *webVC = [\cf9 webpageVC\cf4 \cf14 alloc\cf4 ];\
  5489. webVC.\cf15 isGotoBack\cf4 =
  5490. \f2\b \cf8 YES
  5491. \f0\b0 \cf4 ;\
  5492. webVC.\cf15 isSend\cf4 =
  5493. \f2\b \cf8 YES
  5494. \f0\b0 \cf4 ;\
  5495. webVC.\cf14 title\cf4 = [dict \cf14 objectForKey\cf4 :\cf6 @"name"\cf4 ];\
  5496. \cf10 NSString\cf4 * url = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@"\cf4 ,[dict \cf14 objectForKey\cf4 :\cf6 @"url"\cf4 ]];\
  5497. url = [url \cf14 stringByReplacingOccurrencesOfString\cf4 :\cf6 @" "\cf4 \cf14 withString\cf4 :\cf6 @""\cf4 ];\
  5498. url = [url \cf14 stringByReplacingOccurrencesOfString\cf4 :\cf6 @"\\t"\cf4 \cf14 withString\cf4 :\cf6 @""\cf4 ];\
  5499. webVC.\cf15 url\cf4 = url;\
  5500. webVC = [webVC \cf14 init\cf4 ];\
  5501. [\cf5 g_navigation\cf4 .\cf15 navigationView\cf4 \cf14 addSubview\cf4 :webVC.\cf14 view\cf4 ];\
  5502. \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
  5503. \f2\b \cf8 return
  5504. \f0\b0 \cf4 ;\
  5505. \}\
  5506. \
  5507. \cf10 CGFloat\cf4 maxWidth = \cf7 0\cf4 ;\
  5508. \cf10 NSMutableArray\cf4 *arrM = [\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
  5509. \f2\b \cf8 for
  5510. \f0\b0 \cf4 (\cf10 NSInteger\cf4 i = \cf7 0\cf4 ; i < arr.\cf14 count\cf4 ; i ++) \{\
  5511. \cf10 NSDictionary\cf4 *dict2 = arr[i];\
  5512. [arrM \cf14 addObject\cf4 :dict2[\cf6 @"name"\cf4 ]];\
  5513. \cf10 NSString\cf4 *str = dict2[\cf6 @"name"\cf4 ];\
  5514. \cf10 CGSize\cf4 size = [str \cf14 boundingRectWithSize\cf4 :\cf14 CGSizeMake\cf4 (\cf5 MAXFLOAT\cf4 , \cf7 20\cf4 ) \cf14 options\cf4 :\cf14 NSStringDrawingUsesLineFragmentOrigin\cf4 \cf14 attributes\cf4 :\cf7 @\{\cf14 NSFontAttributeName\cf4 :\cf5 SYSFONT\cf4 (\cf7 15.0\cf4 )\cf7 \}\cf4 \cf14 context\cf4 :
  5515. \f2\b \cf8 nil
  5516. \f0\b0 \cf4 ].\cf14 size\cf4 ;\
  5517. \f2\b \cf8 if
  5518. \f0\b0 \cf4 (size.\cf14 width\cf4 > maxWidth) \{\
  5519. maxWidth = size.\cf14 width\cf4 ;\
  5520. \}\
  5521. \}\
  5522. \cf9 JX_DownListView\cf4 * downListView = [[\cf9 JX_DownListView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :
  5523. \f2\b \cf8 self
  5524. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 bounds\cf4 ];\
  5525. downListView.\cf15 listContents\cf4 = arrM;\
  5526. downListView.\cf15 color\cf4 = \cf5 HEXCOLOR\cf4 (\cf7 0xf3f3f3\cf4 );\
  5527. downListView.\cf15 textColor\cf4 = [\cf10 UIColor\cf4 \cf14 darkGrayColor\cf4 ];\
  5528. downListView.\cf15 maxWidth\cf4 = maxWidth;\
  5529. downListView.\cf15 showType\cf4 = \cf15 DownListView_Center\cf4 ;\
  5530. \f2\b \cf8 __weak
  5531. \f0\b0 \cf4
  5532. \f2\b \cf8 typeof
  5533. \f0\b0 \cf4 (
  5534. \f2\b \cf8 self
  5535. \f0\b0 \cf4 ) weakSelf =
  5536. \f2\b \cf8 self
  5537. \f0\b0 \cf4 ;\
  5538. [downListView \cf15 downlistPopOption\cf4 :^(\cf10 NSInteger\cf4 index, \cf10 NSString\cf4 *content) \{\
  5539. [weakSelf \cf15 showPublicMenuContent\cf4 :index];\
  5540. \
  5541. \} \cf15 whichFrame\cf4 :moreFrame \cf15 animate\cf4 :
  5542. \f2\b \cf8 YES
  5543. \f0\b0 \cf4 ];\
  5544. [downListView \cf15 show\cf4 ];\
  5545. \}\
  5546. \
  5547. - (
  5548. \f2\b \cf8 void
  5549. \f0\b0 \cf4 )\cf11 showPublicMenuContent\cf4 :(\cf10 NSInteger\cf4 )index \{\
  5550. \
  5551. \cf10 NSDictionary\cf4 *dict = \cf15 _menuList\cf4 [
  5552. \f2\b \cf8 self
  5553. \f0\b0 \cf4 .\cf15 selMenuIndex\cf4 ];\
  5554. \cf10 NSArray\cf4 *arr = dict[\cf6 @"menuList"\cf4 ];\
  5555. \cf10 NSDictionary\cf4 *dict2 = arr[index];\
  5556. \
  5557. \cf10 NSString\cf4 *menuId = dict2[\cf6 @"menuId"\cf4 ];\
  5558. \f2\b \cf8 if
  5559. \f0\b0 \cf4 (menuId.\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  5560. \cf10 NSString\cf4 * url = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@?access_token=%@"\cf4 ,menuId,\cf5 g_server\cf4 .\cf15 access_token\cf4 ];\
  5561. [\cf5 g_server\cf4 \cf15 requestWithUrl\cf4 :url \cf15 toView\cf4 :
  5562. \f2\b \cf8 self
  5563. \f0\b0 \cf4 ];\
  5564. \}
  5565. \f2\b \cf8 else
  5566. \f0\b0 \cf4 \{\
  5567. \cf9 webpageVC\cf4 *webVC = [\cf9 webpageVC\cf4 \cf14 alloc\cf4 ];\
  5568. webVC.\cf15 isGotoBack\cf4 =
  5569. \f2\b \cf8 YES
  5570. \f0\b0 \cf4 ;\
  5571. webVC.\cf15 isSend\cf4 =
  5572. \f2\b \cf8 YES
  5573. \f0\b0 \cf4 ;\
  5574. webVC.\cf14 title\cf4 = [dict2 \cf14 objectForKey\cf4 :\cf6 @"name"\cf4 ];\
  5575. \cf10 NSString\cf4 * url = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@"\cf4 ,[dict2 \cf14 objectForKey\cf4 :\cf6 @"url"\cf4 ]];\
  5576. url = [url \cf14 stringByReplacingOccurrencesOfString\cf4 :\cf6 @" "\cf4 \cf14 withString\cf4 :\cf6 @""\cf4 ];\
  5577. url = [url \cf14 stringByReplacingOccurrencesOfString\cf4 :\cf6 @"\\t"\cf4 \cf14 withString\cf4 :\cf6 @""\cf4 ];\
  5578. webVC.\cf15 url\cf4 = url;\
  5579. webVC = [webVC \cf14 init\cf4 ];\
  5580. [\cf5 g_navigation\cf4 .\cf15 navigationView\cf4 \cf14 addSubview\cf4 :webVC.\cf14 view\cf4 ];\
  5581. \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
  5582. \}\
  5583. \}\
  5584. \
  5585. -(
  5586. \f2\b \cf8 void
  5587. \f0\b0 \cf4 )\cf11 initAudio\cf4 \{\
  5588. \cf2 // [[UIDevice currentDevice] setProximityMonitoringEnabled:YES]; //
  5589. \f1 \'bd\'a8\'d2\'e9\'d4\'da\'b2\'a5\'b7\'c5\'d6\'ae\'c7\'b0\'c9\'e8\'d6\'c3
  5590. \f0 yes
  5591. \f1 \'a3\'ac\'b2\'a5\'b7\'c5\'bd\'e1\'ca\'f8\'c9\'e8\'d6\'c3
  5592. \f0 NO
  5593. \f1 \'a3\'ac\'d5\'e2\'b8\'f6\'b9\'a6\'c4\'dc\'ca\'c7\'bf\'aa\'c6\'f4\'ba\'ec\'cd\'e2\'b8\'d0\'d3\'a6
  5594. \f0 \cf4 \
  5595. \
  5596. \cf2 //
  5597. \f1 \'cc\'ed\'bc\'d3\'bc\'e0\'cc\'fd
  5598. \f0 \cf4 \
  5599. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5600. \f2\b \cf8 self
  5601. \f0\b0 \cf4 \cf14 selector\cf4 :
  5602. \f2\b \cf8 @selector
  5603. \f0\b0 \cf4 (readTypeMsgCome:) \cf14 name\cf4 :\cf5 kXMPPMessageReadTypeNotification\cf4 \cf14 object\cf4 :
  5604. \f2\b \cf8 nil
  5605. \f0\b0 \cf4 ];\
  5606. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5607. \f2\b \cf8 self
  5608. \f0\b0 \cf4 \cf14 selector\cf4 :
  5609. \f2\b \cf8 @selector
  5610. \f0\b0 \cf4 (readTypeMsgReceipt:) \cf14 name\cf4 :\cf5 kXMPPMessageReadTypeReceiptNotification\cf4 \cf14 object\cf4 :
  5611. \f2\b \cf8 nil
  5612. \f0\b0 \cf4 ];\
  5613. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5614. \f2\b \cf8 self
  5615. \f0\b0 \cf4 \cf14 selector\cf4 :
  5616. \f2\b \cf8 @selector
  5617. \f0\b0 \cf4 (sendText:) \cf14 name\cf4 :\cf5 kSendInputNotifaction\cf4 \cf14 object\cf4 :
  5618. \f2\b \cf8 nil
  5619. \f0\b0 \cf4 ];\
  5620. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5621. \f2\b \cf8 self
  5622. \f0\b0 \cf4 \cf14 selector\cf4 :
  5623. \f2\b \cf8 @selector
  5624. \f0\b0 \cf4 (newMsgCome:) \cf14 name\cf4 :\cf5 kXMPPNewMsgNotifaction\cf4 \cf14 object\cf4 :
  5625. \f2\b \cf8 nil
  5626. \f0\b0 \cf4 ];\
  5627. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5628. \f2\b \cf8 self
  5629. \f0\b0 \cf4 \cf14 selector\cf4 :
  5630. \f2\b \cf8 @selector
  5631. \f0\b0 \cf4 (showMsg:) \cf14 name\cf4 :\cf5 kXMPPShowMsgNotifaction\cf4 \cf14 object\cf4 :
  5632. \f2\b \cf8 nil
  5633. \f0\b0 \cf4 ];\
  5634. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5635. \f2\b \cf8 self
  5636. \f0\b0 \cf4 \cf14 selector\cf4 :
  5637. \f2\b \cf8 @selector
  5638. \f0\b0 \cf4 (newReceipt:) \cf14 name\cf4 :\cf5 kXMPPReceiptNotifaction\cf4 \cf14 object\cf4 :
  5639. \f2\b \cf8 nil
  5640. \f0\b0 \cf4 ];\
  5641. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5642. \f2\b \cf8 self
  5643. \f0\b0 \cf4 \cf14 selector\cf4 :
  5644. \f2\b \cf8 @selector
  5645. \f0\b0 \cf4 (onReceiveFile:) \cf14 name\cf4 :\cf5 kXMPPReceiveFileNotifaction\cf4 \cf14 object\cf4 :
  5646. \f2\b \cf8 nil
  5647. \f0\b0 \cf4 ];\
  5648. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5649. \f2\b \cf8 self
  5650. \f0\b0 \cf4 \cf14 selector\cf4 :
  5651. \f2\b \cf8 @selector
  5652. \f0\b0 \cf4 (onSendTimeout:) \cf14 name\cf4 :\cf5 kXMPPSendTimeOutNotifaction\cf4 \cf14 object\cf4 :
  5653. \f2\b \cf8 nil
  5654. \f0\b0 \cf4 ];\
  5655. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5656. \f2\b \cf8 self
  5657. \f0\b0 \cf4 \cf14 selector\cf4 :
  5658. \f2\b \cf8 @selector
  5659. \f0\b0 \cf4 (onQuitRoom:) \cf14 name\cf4 :\cf5 kQuitRoomNotifaction\cf4 \cf14 object\cf4 :
  5660. \f2\b \cf8 nil
  5661. \f0\b0 \cf4 ];\
  5662. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5663. \f2\b \cf8 self
  5664. \f0\b0 \cf4 \cf14 selector\cf4 :
  5665. \f2\b \cf8 @selector
  5666. \f0\b0 \cf4 (changeKeyBoard:) \cf14 name\cf4 :\cf14 UIKeyboardWillShowNotification\cf4 \cf14 object\cf4 :
  5667. \f2\b \cf8 nil
  5668. \f0\b0 \cf4 ];\
  5669. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5670. \f2\b \cf8 self
  5671. \f0\b0 \cf4 \cf14 selector\cf4 :
  5672. \f2\b \cf8 @selector
  5673. \f0\b0 \cf4 (onReceiveRoomRemind:) \cf14 name\cf4 :\cf5 kXMPPRoomNotifaction\cf4 \cf14 object\cf4 :
  5674. \f2\b \cf8 nil
  5675. \f0\b0 \cf4 ];\
  5676. \cf2 // [g_notify addObserver:self selector:@selector(onLoginChanged:) name:kXmppLoginNotifaction object:nil];//
  5677. \f1 \'b5\'c7\'c2\'bc\'d7\'b4\'cc\'ac\'b8\'c4\'b1\'e4
  5678. \f0 \cf4 \
  5679. \cf2 //
  5680. \f1 \'d5\'fd\'d4\'da\'ca\'e4\'c8\'eb
  5681. \f0 \cf4 \
  5682. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5683. \f2\b \cf8 self
  5684. \f0\b0 \cf4 \cf14 selector\cf4 :
  5685. \f2\b \cf8 @selector
  5686. \f0\b0 \cf4 (enteringNotifi:) \cf14 name\cf4 :\cf5 kXMPPMessageEnteringNotification\cf4 \cf14 object\cf4 :
  5687. \f2\b \cf8 nil
  5688. \f0\b0 \cf4 ];\
  5689. \cf2 //
  5690. \f1 \'b3\'b7\'bb\'d8\'cf\'fb\'cf\'a2
  5691. \f0 \cf4 \
  5692. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5693. \f2\b \cf8 self
  5694. \f0\b0 \cf4 \cf14 selector\cf4 :
  5695. \f2\b \cf8 @selector
  5696. \f0\b0 \cf4 (withdrawNotifi:) \cf14 name\cf4 :\cf5 kXMPPMessageWithdrawNotification\cf4 \cf14 object\cf4 :
  5697. \f2\b \cf8 nil
  5698. \f0\b0 \cf4 ];\
  5699. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5700. \f2\b \cf8 self
  5701. \f0\b0 \cf4 \cf14 selector\cf4 :
  5702. \f2\b \cf8 @selector
  5703. \f0\b0 \cf4 (actionQuitChatVC:) \cf14 name\cf4 :\cf5 kActionRelayQuitVC\cf4 \cf14 object\cf4 :
  5704. \f2\b \cf8 nil
  5705. \f0\b0 \cf4 ];\
  5706. \cf2 //
  5707. \f1 \'c9\'be\'b3\'fd\'ba\'c3\'d3\'d1
  5708. \f0 \cf4 \
  5709. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5710. \f2\b \cf8 self
  5711. \f0\b0 \cf4 \cf14 selector\cf4 :
  5712. \f2\b \cf8 @selector
  5713. \f0\b0 \cf4 (delFriend:) \cf14 name\cf4 :\cf5 kDeleteUserNotifaction\cf4 \cf14 object\cf4 :
  5714. \f2\b \cf8 nil
  5715. \f0\b0 \cf4 ];\
  5716. \cf2 //
  5717. \f1 \'d5\'6e\'b3\'cc\'cf\'fb\'cf\'a2
  5718. \f0 \cf4 \
  5719. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5720. \f2\b \cf8 self
  5721. \f0\b0 \cf4 \cf14 selector\cf4 :
  5722. \f2\b \cf8 @selector
  5723. \f0\b0 \cf4 (sendCourseMsg:) \cf14 name\cf4 :\cf5 kSendCourseMsg\cf4 \cf14 object\cf4 :
  5724. \f2\b \cf8 nil
  5725. \f0\b0 \cf4 ];\
  5726. \cf2 //
  5727. \f1 \'d0\'de\'b8\'c4\'b1\'b8\'d7\'a2
  5728. \f0 \cf4 \
  5729. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5730. \f2\b \cf8 self
  5731. \f0\b0 \cf4 \cf14 selector\cf4 :
  5732. \f2\b \cf8 @selector
  5733. \f0\b0 \cf4 (friendRemarkNotifi:) \cf14 name\cf4 :\cf5 kFriendRemark\cf4 \cf14 object\cf4 :
  5734. \f2\b \cf8 nil
  5735. \f0\b0 \cf4 ];\
  5736. \cf2 //
  5737. \f1 \'c8\'ba\'b3\'c9\'d4\'b1\'b8\'fc\'d0\'c2
  5738. \f0 \cf4 \
  5739. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5740. \f2\b \cf8 self
  5741. \f0\b0 \cf4 \cf14 selector\cf4 :
  5742. \f2\b \cf8 @selector
  5743. \f0\b0 \cf4 (roomMembersRefreshNotifi:) \cf14 name\cf4 :\cf5 kRoomMembersRefresh\cf4 \cf14 object\cf4 :
  5744. \f2\b \cf8 nil
  5745. \f0\b0 \cf4 ];\
  5746. \cf2 //
  5747. \f1 \'c9\'e8\'d6\'c3\'c1\'c4\'cc\'ec\'b1\'b3\'be\'b0
  5748. \f0 \cf4 \
  5749. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5750. \f2\b \cf8 self
  5751. \f0\b0 \cf4 \cf14 selector\cf4 :
  5752. \f2\b \cf8 @selector
  5753. \f0\b0 \cf4 (setBackGroundImageViewNotifi:) \cf14 name\cf4 :\cf5 kSetBackGroundImageView\cf4 \cf14 object\cf4 :
  5754. \f2\b \cf8 nil
  5755. \f0\b0 \cf4 ];\
  5756. \
  5757. [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
  5758. \f2\b \cf8 self
  5759. \f0\b0 \cf4 \cf14 selector\cf4 :
  5760. \f2\b \cf8 @selector
  5761. \f0\b0 \cf4 (showCallMsg:) \cf14 name\cf4 :\cf5 UpdateAcceptCallMsg\cf4 \cf14 object\cf4 :
  5762. \f2\b \cf8 nil
  5763. \f0\b0 \cf4 ];\
  5764. \
  5765. [
  5766. \f2\b \cf8 self
  5767. \f0\b0 \cf4 .\cf15 tableFooter\cf4 \cf14 addObserver\cf4 :
  5768. \f2\b \cf8 self
  5769. \f0\b0 \cf4 \cf14 forKeyPath\cf4 :\cf6 @"frame"\cf4 \cf14 options\cf4 :\cf14 NSKeyValueObservingOptionNew\cf4 \cf14 context\cf4 :
  5770. \f2\b \cf8 nil
  5771. \f0\b0 \cf4 ];\
  5772. \}\
  5773. \
  5774. -(
  5775. \f2\b \cf8 void
  5776. \f0\b0 \cf4 )\cf11 unInitAudio\cf4 \{\
  5777. \cf2 // [[UIDevice currentDevice] setProximityMonitoringEnabled:NO]; //
  5778. \f1 \'bd\'a8\'d2\'e9\'d4\'da\'b2\'a5\'b7\'c5\'d6\'ae\'c7\'b0\'c9\'e8\'d6\'c3
  5779. \f0 yes
  5780. \f1 \'a3\'ac\'b2\'a5\'b7\'c5\'bd\'e1\'ca\'f8\'c9\'e8\'d6\'c3
  5781. \f0 NO
  5782. \f1 \'a3\'ac\'d5\'e2\'b8\'f6\'b9\'a6\'c4\'dc\'ca\'c7\'bf\'aa\'c6\'f4\'ba\'ec\'cd\'e2\'b8\'d0\'d3\'a6
  5783. \f0 \cf4 \
  5784. \
  5785. \cf2 //
  5786. \f1 \'d2\'c6\'b3\'fd\'bc\'e0\'cc\'fd
  5787. \f0 \cf4 \
  5788. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5789. \f2\b \cf8 self
  5790. \f0\b0 \cf4 ];\
  5791. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5792. \f2\b \cf8 self
  5793. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kXMPPNewMsgNotifaction\cf4 \cf14 object\cf4 :
  5794. \f2\b \cf8 nil
  5795. \f0\b0 \cf4 ];\
  5796. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5797. \f2\b \cf8 self
  5798. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kXMPPSendTimeOutNotifaction\cf4 \cf14 object\cf4 :
  5799. \f2\b \cf8 nil
  5800. \f0\b0 \cf4 ];\
  5801. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5802. \f2\b \cf8 self
  5803. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kXMPPReceiptNotifaction\cf4 \cf14 object\cf4 :
  5804. \f2\b \cf8 nil
  5805. \f0\b0 \cf4 ];\
  5806. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5807. \f2\b \cf8 self
  5808. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kSendInputNotifaction\cf4 \cf14 object\cf4 :
  5809. \f2\b \cf8 nil
  5810. \f0\b0 \cf4 ];\
  5811. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5812. \f2\b \cf8 self
  5813. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kXMPPReceiveFileNotifaction\cf4 \cf14 object\cf4 :
  5814. \f2\b \cf8 nil
  5815. \f0\b0 \cf4 ];\
  5816. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5817. \f2\b \cf8 self
  5818. \f0\b0 \cf4 \cf14 name\cf4 :\cf14 UIKeyboardWillShowNotification\cf4 \cf14 object\cf4 :
  5819. \f2\b \cf8 nil
  5820. \f0\b0 \cf4 ];\
  5821. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5822. \f2\b \cf8 self
  5823. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kQuitRoomNotifaction\cf4 \cf14 object\cf4 :
  5824. \f2\b \cf8 nil
  5825. \f0\b0 \cf4 ];\
  5826. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5827. \f2\b \cf8 self
  5828. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kXMPPRoomNotifaction\cf4 \cf14 object\cf4 :
  5829. \f2\b \cf8 nil
  5830. \f0\b0 \cf4 ];\
  5831. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5832. \f2\b \cf8 self
  5833. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kXmppLoginNotifaction\cf4 \cf14 object\cf4 :
  5834. \f2\b \cf8 nil
  5835. \f0\b0 \cf4 ];\
  5836. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5837. \f2\b \cf8 self
  5838. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kXMPPMessageEnteringNotification\cf4 \cf14 object\cf4 :
  5839. \f2\b \cf8 nil
  5840. \f0\b0 \cf4 ];\
  5841. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5842. \f2\b \cf8 self
  5843. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kXMPPMessageWithdrawNotification\cf4 \cf14 object\cf4 :
  5844. \f2\b \cf8 nil
  5845. \f0\b0 \cf4 ];\
  5846. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5847. \f2\b \cf8 self
  5848. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kSendCourseMsg\cf4 \cf14 object\cf4 :
  5849. \f2\b \cf8 nil
  5850. \f0\b0 \cf4 ];\
  5851. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5852. \f2\b \cf8 self
  5853. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kFriendRemark\cf4 \cf14 object\cf4 :
  5854. \f2\b \cf8 nil
  5855. \f0\b0 \cf4 ];\
  5856. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  5857. \f2\b \cf8 self
  5858. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 UpdateAcceptCallMsg\cf4 \cf14 object\cf4 :
  5859. \f2\b \cf8 nil
  5860. \f0\b0 \cf4 ];\
  5861. \
  5862. [
  5863. \f2\b \cf8 self
  5864. \f0\b0 \cf4 .\cf15 tableFooter\cf4 \cf14 removeObserver\cf4 :
  5865. \f2\b \cf8 self
  5866. \f0\b0 \cf4 \cf14 forKeyPath\cf4 :\cf6 @"frame"\cf4 ];\
  5867. \}\
  5868. \
  5869. - (
  5870. \f2\b \cf8 void
  5871. \f0\b0 \cf4 )\cf11 observeValueForKeyPath\cf4 :(\cf10 NSString\cf4 *)keyPath \cf11 ofObject\cf4 :(
  5872. \f2\b \cf8 id
  5873. \f0\b0 \cf4 )object \cf11 change\cf4 :(\cf10 NSDictionary\cf4 <\cf10 NSKeyValueChangeKey\cf4 ,
  5874. \f2\b \cf8 id
  5875. \f0\b0 \cf4 > *)change \cf11 context\cf4 :(
  5876. \f2\b \cf8 void
  5877. \f0\b0 \cf4 *)context \{\
  5878. \
  5879. \f2\b \cf8 if
  5880. \f0\b0 \cf4 (\cf5 THE_DEVICE_HAVE_HEAD\cf4 ) \{\
  5881. \f2\b \cf8 id
  5882. \f0\b0 \cf4 newValue = [change \cf14 objectForKey\cf4 :\cf14 NSKeyValueChangeNewKey\cf4 ];\
  5883. \cf10 CGRect\cf4 newFrame = [newValue \cf14 CGRectValue\cf4 ];\
  5884. \f2\b \cf8 int
  5885. \f0\b0 \cf4 n = (
  5886. \f2\b \cf8 int
  5887. \f0\b0 \cf4 )newFrame.\cf14 origin\cf4 .\cf14 y\cf4 ;\
  5888. \f2\b \cf8 int
  5889. \f0\b0 \cf4 m = (
  5890. \f2\b \cf8 int
  5891. \f0\b0 \cf4 )(
  5892. \f2\b \cf8 self
  5893. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 -
  5894. \f2\b \cf8 self
  5895. \f0\b0 \cf4 .\cf15 heightFooter\cf4 );\
  5896. \
  5897. \f2\b \cf8 if
  5898. \f0\b0 \cf4 (\cf14 fabs\cf4 (n - m) < \cf7 2\cf4 ) \{\
  5899. \
  5900. \f2\b \cf8 self
  5901. \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf5 JX_SCREEN_HEIGHT\cf4 -
  5902. \f2\b \cf8 self
  5903. \f0\b0 \cf4 .\cf15 heightFooter\cf4 - \cf7 35\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 ,
  5904. \f2\b \cf8 self
  5905. \f0\b0 \cf4 .\cf15 heightFooter\cf4 );\
  5906. \cf15 _table\cf4 .\cf14 frame\cf4 =\cf14 CGRectMake\cf4 (\cf7 0\cf4 ,
  5907. \f2\b \cf8 self
  5908. \f0\b0 \cf4 .\cf15 heightHeader\cf4 +\cf15 _noticeHeight\cf4 ,\cf5 self_width\cf4 ,\cf5 JX_SCREEN_HEIGHT\cf4 -
  5909. \f2\b \cf8 self
  5910. \f0\b0 \cf4 .\cf15 heightHeader\cf4 -
  5911. \f2\b \cf8 self
  5912. \f0\b0 \cf4 .\cf15 heightFooter\cf4 - \cf7 35\cf4 -\cf15 _noticeHeight\cf4 );\
  5913. \}\
  5914. \}\
  5915. \}\
  5916. \
  5917. - (
  5918. \f2\b \cf8 void
  5919. \f0\b0 \cf4 )\cf11 setBackGroundImageViewNotifi\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
  5920. \cf10 UIImage\cf4 *image = notif.\cf14 object\cf4 ;\
  5921. \f2\b \cf8 if
  5922. \f0\b0 \cf4 (image) \{\
  5923. \cf15 _table\cf4 .\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 clearColor\cf4 ];\
  5924. \f2\b \cf8 self
  5925. \f0\b0 \cf4 .\cf15 backGroundImageView\cf4 .\cf14 image\cf4 = image;\
  5926. \}
  5927. \f2\b \cf8 else
  5928. \f0\b0 \cf4 \{\
  5929. \f2\b \cf8 self
  5930. \f0\b0 \cf4 .\cf15 backGroundImageView\cf4 .\cf14 image\cf4 =
  5931. \f2\b \cf8 nil
  5932. \f0\b0 \cf4 ;\
  5933. \cf15 _table\cf4 .\cf14 backgroundColor\cf4 = \cf5 HEXCOLOR\cf4 (\cf7 0xF2F2F2\cf4 );\
  5934. \}\
  5935. \}\
  5936. \
  5937. -(
  5938. \f2\b \cf8 void
  5939. \f0\b0 \cf4 )\cf11 friendRemarkNotifi\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
  5940. \
  5941. \f2\b \cf8 if
  5942. \f0\b0 \cf4 (
  5943. \f2\b \cf8 self
  5944. \f0\b0 \cf4 .\cf15 courseId\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  5945. \f2\b \cf8 return
  5946. \f0\b0 \cf4 ;\
  5947. \}\
  5948. \cf9 JXUserObject\cf4 *user = notif.\cf14 object\cf4 ;\
  5949. \f2\b \cf8 if
  5950. \f0\b0 \cf4 ([user.\cf15 userId\cf4 \cf14 isEqualToString\cf4 :\cf15 chatPerson\cf4 .\cf15 userId\cf4 ]) \{\
  5951. [
  5952. \f2\b \cf8 self
  5953. \f0\b0 \cf4 \cf15 setChatTitle\cf4 :user.\cf15 remarkName\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ? user.\cf15 remarkName\cf4 : user.\cf15 userNickname\cf4 ];\
  5954. \}\
  5955. \}\
  5956. \
  5957. - (
  5958. \f2\b \cf8 void
  5959. \f0\b0 \cf4 )\cf11 roomMembersRefreshNotifi\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
  5960. \
  5961. \cf2 // NSArray * memberArray = [memberData fetchAllMembers:_room.roomId];\cf4 \
  5962. \f2\b \cf8 int
  5963. \f0\b0 \cf4 userSize = [notif.\cf14 object\cf4 \cf14 intValue\cf4 ];\
  5964. \f2\b \cf8 self
  5965. \f0\b0 \cf4 .\cf14 title\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@(%d)"\cf4 ,
  5966. \f2\b \cf8 self
  5967. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 userNickname\cf4 , userSize];\
  5968. \
  5969. [
  5970. \f2\b \cf8 self
  5971. \f0\b0 \cf4 \cf15 setAudioIconFrame\cf4 ];\
  5972. \}\
  5973. \
  5974. - (
  5975. \f2\b \cf8 void
  5976. \f0\b0 \cf4 )\cf11 actionQuitChatVC\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
  5977. \f2\b \cf8 self
  5978. \f0\b0 \cf4 .\cf15 isSelectMore\cf4 =
  5979. \f2\b \cf8 NO
  5980. \f0\b0 \cf4 ;\
  5981. [
  5982. \f2\b \cf8 self
  5983. \f0\b0 \cf4 \cf15 actionQuit\cf4 ];\
  5984. \}\
  5985. \
  5986. - (
  5987. \f2\b \cf8 void
  5988. \f0\b0 \cf4 )\cf11 delFriend\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
  5989. \cf9 JXUserObject\cf4 * user = (\cf9 JXUserObject\cf4 *)notif.\cf14 object\cf4 ;\
  5990. \
  5991. \f2\b \cf8 if
  5992. \f0\b0 \cf4 ([\cf15 chatPerson\cf4 .\cf15 userId\cf4 \cf14 isEqualToString\cf4 :user.\cf15 userId\cf4 ]) \{\
  5993. [
  5994. \f2\b \cf8 self
  5995. \f0\b0 \cf4 \cf15 actionQuit\cf4 ];\
  5996. \}\
  5997. \}\
  5998. \
  5999. \
  6000. - (
  6001. \f2\b \cf8 void
  6002. \f0\b0 \cf4 )\cf11 sendCourseMsg\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
  6003. \cf9 JXMessageObject\cf4 *msg = (\cf9 JXMessageObject\cf4 *)notif.\cf14 object\cf4 ;\
  6004. \f2\b \cf8 if
  6005. \f0\b0 \cf4 ([msg.\cf15 toUserId\cf4 \cf14 isEqualToString\cf4 :\cf15 chatPerson\cf4 .\cf15 userId\cf4 ]) \{\
  6006. [
  6007. \f2\b \cf8 self
  6008. \f0\b0 \cf4 \cf15 showOneMsg\cf4 :msg];\
  6009. \}\
  6010. \}\
  6011. \
  6012. \cf2 //
  6013. \f1 \'c8\'ba\'cd\'b7\'cf\'ce\'cb\'a2\'d0\'c2
  6014. \f0 \cf4 \
  6015. - (
  6016. \f2\b \cf8 void
  6017. \f0\b0 \cf4 )\cf11 groupLevelNameRefresh\cf4 :(\cf10 NSNotification\cf4 *)note \{\
  6018. \cf15 _groupLevelNameArray\cf4 = note.\cf14 object\cf4 ;\
  6019. [
  6020. \f2\b \cf8 self
  6021. \f0\b0 \cf4 \cf15 refresh\cf4 :
  6022. \f2\b \cf8 nil
  6023. \f0\b0 \cf4 ];\
  6024. [\cf15 _table\cf4 \cf14 reloadData\cf4 ];\
  6025. \
  6026. \}\
  6027. \
  6028. -(
  6029. \f2\b \cf8 void
  6030. \f0\b0 \cf4 )\cf11 refresh\cf4 :(\cf9 JXMessageObject\cf4 *)msg\
  6031. \{\
  6032. \cf15 _isRefreshing\cf4 =
  6033. \f2\b \cf8 YES
  6034. \f0\b0 \cf4 ;\
  6035. \f2\b \cf8 if
  6036. \f0\b0 \cf4 (
  6037. \f2\b \cf8 self
  6038. \f0\b0 \cf4 .\cf15 courseId\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  6039. \cf10 NSMutableArray\cf4 *arr = [\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
  6040. \f2\b \cf8 for
  6041. \f0\b0 \cf4 (\cf10 NSDictionary\cf4 *dict
  6042. \f2\b \cf8 in
  6043. \f0\b0 \cf4
  6044. \f2\b \cf8 self
  6045. \f0\b0 \cf4 .\cf15 courseArray\cf4 ) \{\
  6046. [arr \cf14 addObject\cf4 :dict[\cf6 @"message"\cf4 ]];\
  6047. \}\
  6048. \cf15 _array\cf4 = arr;\
  6049. [\cf15 _table\cf4 \cf15 gotoLastRow\cf4 :
  6050. \f2\b \cf8 NO
  6051. \f0\b0 \cf4 ];\
  6052. \f2\b \cf8 self
  6053. \f0\b0 \cf4 .\cf15 isShowHeaderPull\cf4 =
  6054. \f2\b \cf8 NO
  6055. \f0\b0 \cf4 ;\
  6056. \f2\b \cf8 return
  6057. \f0\b0 \cf4 ;\
  6058. \}\
  6059. \
  6060. \f2\b \cf8 if
  6061. \f0\b0 \cf4 (
  6062. \f2\b \cf8 self
  6063. \f0\b0 \cf4 .\cf15 chatLogArray\cf4 .\cf14 count\cf4 > \cf7 0\cf4 ) \{\
  6064. \cf15 _array\cf4 =
  6065. \f2\b \cf8 self
  6066. \f0\b0 \cf4 .\cf15 chatLogArray\cf4 ;\
  6067. [
  6068. \f2\b \cf8 self
  6069. \f0\b0 \cf4 .\cf15 tableView\cf4 \cf14 reloadData\cf4 ];\
  6070. \f2\b \cf8 self
  6071. \f0\b0 \cf4 .\cf15 isShowFooterPull\cf4 =
  6072. \f2\b \cf8 NO
  6073. \f0\b0 \cf4 ;\
  6074. \f2\b \cf8 return
  6075. \f0\b0 \cf4 ;\
  6076. \}\
  6077. \
  6078. [\cf15 _messageText\cf4 \cf14 setInputView\cf4 :
  6079. \f2\b \cf8 nil
  6080. \f0\b0 \cf4 ];\
  6081. [\cf15 _messageText\cf4 \cf14 resignFirstResponder\cf4 ];\
  6082. \f2\b \cf8 BOOL
  6083. \f0\b0 \cf4 b=
  6084. \f2\b \cf8 YES
  6085. \f0\b0 \cf4 ;\
  6086. \f2\b \cf8 BOOL
  6087. \f0\b0 \cf4 bPull=
  6088. \f2\b \cf8 NO
  6089. \f0\b0 \cf4 ;\
  6090. \cf10 NSInteger\cf4 firstNum = \cf7 1\cf4 ;\
  6091. \f2\b \cf8 if
  6092. \f0\b0 \cf4 ([\cf15 _array\cf4 \cf14 count\cf4 ]>\cf7 0\cf4 )\
  6093. firstNum = \cf15 _array\cf4 .\cf14 count\cf4 ;\
  6094. \
  6095. \
  6096. \cf10 CGFloat\cf4 allHeight = \cf7 0\cf4 ;\
  6097. \f2\b \cf8 if
  6098. \f0\b0 \cf4 (msg ==
  6099. \f2\b \cf8 nil
  6100. \f0\b0 \cf4 )\{\
  6101. \cf10 NSString\cf4 * s;\
  6102. \f2\b \cf8 if
  6103. \f0\b0 \cf4 ([
  6104. \f2\b \cf8 self
  6105. \f0\b0 \cf4 .\cf15 roomJid\cf4 \cf14 length\cf4 ]>\cf7 0\cf4 )\
  6106. s =
  6107. \f2\b \cf8 self
  6108. \f0\b0 \cf4 .\cf15 roomJid\cf4 ;\
  6109. \f2\b \cf8 else
  6110. \f0\b0 \cf4 \
  6111. s = \cf15 chatPerson\cf4 .\cf15 userId\cf4 ;\
  6112. \cf10 NSMutableArray\cf4 * p;\
  6113. \f2\b \cf8 if
  6114. \f0\b0 \cf4 (
  6115. \f2\b \cf8 self
  6116. \f0\b0 \cf4 .\cf15 isGetServerMsg\cf4 ) \{\
  6117. \cf2 //
  6118. \f1 \'bb\'f1\'c8\'a1\'c2\'fe\'d3\'ce\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
  6119. \f0 \cf4 \
  6120. \cf2 // [_wait start];\cf4 \
  6121. \f2\b \cf8 long
  6122. \f0\b0 \cf4 starTime;\
  6123. \f2\b \cf8 long
  6124. \f0\b0 \cf4 endTime;\
  6125. \cf9 JXSynTask\cf4 *task = \cf15 _taskList\cf4 .\cf14 firstObject\cf4 ;\
  6126. \f2\b \cf8 if
  6127. \f0\b0 \cf4 (task &&
  6128. \f2\b \cf8 self
  6129. \f0\b0 \cf4 .\cf15 roomJid\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  6130. starTime = [task.\cf15 startTime\cf4 \cf14 timeIntervalSince1970\cf4 ] * \cf7 1000\cf4 ;\
  6131. endTime = [task.\cf15 endTime\cf4 \cf14 timeIntervalSince1970\cf4 ] * \cf7 1000\cf4 ;\
  6132. \}
  6133. \f2\b \cf8 else
  6134. \f0\b0 \cf4 \{\
  6135. \cf9 JXMessageObject\cf4 *msg = \cf15 _array\cf4 .\cf14 firstObject\cf4 ;\
  6136. \cf2 // 7
  6137. \f1 \'cc\'ec\'c7\'b0\'b5\'c4\'ca\'b1\'bc\'e4\'b4\'c1
  6138. \f0 \cf4 \
  6139. endTime = [msg.\cf15 timeSend\cf4 \cf14 timeIntervalSince1970\cf4 ] * \cf7 1000\cf4 ;\
  6140. \f2\b \cf8 if
  6141. \f0\b0 \cf4 (endTime == \cf7 0\cf4 ) \{\
  6142. endTime = [[\cf10 NSDate\cf4 \cf14 date\cf4 ] \cf14 timeIntervalSince1970\cf4 ] * \cf7 1000\cf4 ;\
  6143. \}\
  6144. starTime = \cf7 1262275200000\cf4 ;\
  6145. \}\
  6146. \
  6147. starTime = starTime/\cf7 1000\cf4 ;\
  6148. endTime = endTime/\cf7 1000\cf4 ;\
  6149. \
  6150. \cf2 //
  6151. \f1 \'d0\'c5\'cf\'a2\'b5\'c4\'b7\'a2\'cb\'cd\'ca\'b1\'bc\'e4
  6152. \f0 < starTime = endTime - chatSyncTimeLen; retren;\cf4 \
  6153. \
  6154. \f2\b \cf8 long
  6155. \f0\b0 \cf4 chatSyncTimeLen = \cf7 0\cf4 ;\
  6156. \f2\b \cf8 switch
  6157. \f0\b0 \cf4 ([g_myself.chatSyncTimeLen integerValue]) \{\
  6158. \f2\b \cf8 case
  6159. \f0\b0 \cf4 \cf7 0\cf4 : \cf2 // 0.04 1
  6160. \f1 \'d0\'a1\'ca\'b1
  6161. \f0 \cf4 \
  6162. chatSyncTimeLen = \cf7 3600\cf4 ;\
  6163. \f2\b \cf8 break
  6164. \f0\b0 \cf4 ;\
  6165. \f2\b \cf8 case
  6166. \f0\b0 \cf4 \cf7 1\cf4 : \cf2 // 1
  6167. \f1 \'cc\'ec
  6168. \f0 \cf4 \
  6169. chatSyncTimeLen = \cf7 86400\cf4 ;\
  6170. \f2\b \cf8 break
  6171. \f0\b0 \cf4 ;\
  6172. \f2\b \cf8 case
  6173. \f0\b0 \cf4 \cf7 7\cf4 : \cf2 // 7
  6174. \f1 \'cc\'ec
  6175. \f0 \cf4 \
  6176. chatSyncTimeLen = \cf7 604800\cf4 ;\
  6177. \f2\b \cf8 break
  6178. \f0\b0 \cf4 ;\
  6179. \f2\b \cf8 case
  6180. \f0\b0 \cf4 \cf7 30\cf4 : \cf2 // 30
  6181. \f1 \'cc\'ec
  6182. \f0 \cf4 \
  6183. chatSyncTimeLen = \cf7 2629800\cf4 ;\
  6184. \f2\b \cf8 break
  6185. \f0\b0 \cf4 ;\
  6186. \f2\b \cf8 case
  6187. \f0\b0 \cf4 \cf7 90\cf4 : \cf2 // 90
  6188. \f1 \'cc\'ec
  6189. \f0 \cf4 \
  6190. chatSyncTimeLen = \cf7 7889400\cf4 ;\
  6191. \f2\b \cf8 break
  6192. \f0\b0 \cf4 ;\
  6193. \f2\b \cf8 case
  6194. \f0\b0 \cf4 \cf7 365\cf4 : \cf2 //365
  6195. \f1 \'cc\'ec
  6196. \f0 \cf4 \
  6197. chatSyncTimeLen = \cf7 31557600\cf4 ;\
  6198. \f2\b \cf8 break
  6199. \f0\b0 \cf4 ;\
  6200. \f2\b \cf8 case
  6201. \f0\b0 \cf4 -\cf7 1\cf4 : \cf2 //
  6202. \f1 \'d3\'c0\'be\'c3
  6203. \f0 (20
  6204. \f1 \'c4\'ea
  6205. \f0 )\cf4 \
  6206. chatSyncTimeLen = \cf7 631152000\cf4 ;\
  6207. \f2\b \cf8 break
  6208. \f0\b0 \cf4 ;\
  6209. \f2\b \cf8 default
  6210. \f0\b0 \cf4 :\
  6211. \f2\b \cf8 break
  6212. \f0\b0 \cf4 ;\
  6213. \}\
  6214. \f2\b \cf8 long
  6215. \f0\b0 \cf4 currentTime = [[NSDate date] timeIntervalSince1970];\
  6216. \f2\b \cf8 long
  6217. \f0\b0 \cf4 minSyncTime = currentTime - chatSyncTimeLen;\
  6218. \
  6219. \f2\b \cf8 if
  6220. \f0\b0 \cf4 (endTime <= minSyncTime) \{\
  6221. starTime = minSyncTime;\
  6222. endTime = currentTime;\
  6223. \}\
  6224. endTime = endTime*\cf7 1000\cf4 ;\
  6225. starTime = starTime*\cf7 1000\cf4 ;\
  6226. \cf2 // //
  6227. \f1 \'c8\'ba\'d7\'e9\'c9\'be\'b3\'fd\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc\'ca\'b1\'bc\'e4
  6228. \f0 \cf4 \
  6229. \cf2 // NSInteger time1 = 0;\cf4 \
  6230. \cf2 // if ([g_default valueForKey:self.roomId] && ([self.roomJid length]>0)) \{\cf4 \
  6231. \cf2 // time1 = [[g_default valueForKey:self.roomId] integerValue];\cf4 \
  6232. \cf2 // \}\cf4 \
  6233. \cf2 // NSNumber *lastClearRecordTime = [NSNumber numberWithInteger:time1];\cf4 \
  6234. \cf2 // //
  6235. \f1 \'c9\'e8\'d6\'c3\'c9\'be\'b3\'fd\'cb\'f9\'d3\'d0\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc\'ca\'b1\'bc\'e4
  6236. \f0 \cf4 \
  6237. \cf2 // NSInteger time2 = 0;\cf4 \
  6238. \cf2 // if ([g_default valueForKey:@"CLEARALLMSGRECORDTIME"] && ([self.roomJid length]>0)) \{\cf4 \
  6239. \cf2 // time2 = [[g_default valueForKey:@"CLEARALLMSGRECORDTIME"] integerValue];\cf4 \
  6240. \cf2 // \}\cf4 \
  6241. \cf2 // NSNumber *CLEARALLMSGRECORDTIME = [NSNumber numberWithInteger:time2];\cf4 \
  6242. \cf2 // //
  6243. \f1 \'c9\'e8\'d6\'c3\'c2\'fe\'d3\'ce\'b5\'c4\'ca\'b1\'bc\'e4
  6244. \f0 \cf4 \
  6245. \cf2 // NSNumber *synTime = [NSNumber numberWithLong:starTime];\cf4 \
  6246. \cf2 //\cf4 \
  6247. \cf2 // //
  6248. \f1 \'c5\'c5\'d0\'f2\'cb\'c4\'b8\'f6\'ca\'b1\'bc\'e4
  6249. \f0
  6250. \f1 \'c8\'eb\'c8\'ba\'ca\'b1\'bc\'e4
  6251. \f0 ,
  6252. \f1 \'c8\'ba\'d7\'e9\'c9\'be\'b3\'fd\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc\'ca\'b1\'bc\'e4
  6253. \f0 ,
  6254. \f1 \'c9\'e8\'d6\'c3\'c9\'be\'b3\'fd\'cb\'f9\'d3\'d0\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc\'ca\'b1\'bc\'e4
  6255. \f0 ,
  6256. \f1 \'c9\'e8\'d6\'c3\'c2\'fe\'d3\'ce\'b5\'c4\'ca\'b1\'bc\'e4
  6257. \f0 \cf4 \
  6258. \cf2 // NSArray *sortedArray = [@[lastClearRecordTime,synTime,CLEARALLMSGRECORDTIME] sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) \{\cf4 \
  6259. \cf2 // NSComparisonResult result = [obj1 compare: obj2];\cf4 \
  6260. \cf2 // return result;\cf4 \
  6261. \cf2 // \}];\cf4 \
  6262. \cf2 // NSNumber *time = [sortedArray lastObject];\cf4 \
  6263. \cf2 // starTime = [time longValue];\cf4 \
  6264. \
  6265. \f2\b \cf8 if
  6266. \f0\b0 \cf4 ([
  6267. \f2\b \cf8 self
  6268. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
  6269. [g_server tigaseMucMsgsWithRoomId:s StartTime:starTime EndTime:endTime PageIndex:\cf7 0\cf4 PageSize:PAGECOUNT toView:
  6270. \f2\b \cf8 self
  6271. \f0\b0 \cf4 ];\
  6272. \f2\b \cf8 else
  6273. \f0\b0 \cf4 \
  6274. [g_server tigaseMsgsWithReceiver:s StartTime:starTime EndTime:endTime PageIndex:\cf7 0\cf4 toView:
  6275. \f2\b \cf8 self
  6276. \f0\b0 \cf4 ];\
  6277. \}
  6278. \f2\b \cf8 else
  6279. \f0\b0 \cf4 \{\
  6280. \cf2 //
  6281. \f1 \'bb\'f1\'c8\'a1\'b1\'be\'b5\'d8\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
  6282. \f0 \cf4 \
  6283. \f2\b \cf8 if
  6284. \f0\b0 \cf4 (
  6285. \f2\b \cf8 self
  6286. \f0\b0 \cf4 .scrollLine == \cf7 0\cf4 ) \{\
  6287. \f2\b \cf8 int
  6288. \f0\b0 \cf4 pageCount = \cf7 20\cf4 ;\
  6289. \f2\b \cf8 if
  6290. \f0\b0 \cf4 (
  6291. \f2\b \cf8 self
  6292. \f0\b0 \cf4 .newMsgCount > \cf7 20\cf4 ) \{\
  6293. pageCount =
  6294. \f2\b \cf8 self
  6295. \f0\b0 \cf4 .newMsgCount;\
  6296. \f2\b \cf8 self
  6297. \f0\b0 \cf4 .newMsgCount = \cf7 0\cf4 ;\
  6298. \}\
  6299. \
  6300. JXSynTask *task = _taskList.firstObject;\
  6301. \f2\b \cf8 if
  6302. \f0\b0 \cf4 (
  6303. \f2\b \cf8 self
  6304. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 && task) \{\
  6305. \
  6306. p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:task.endTime];\
  6307. \
  6308. \
  6309. \}
  6310. \f2\b \cf8 else
  6311. \f0\b0 \cf4 \{\
  6312. NSString* myUserId = MY_USER_ID;\
  6313. \f2\b \cf8 double
  6314. \f0\b0 \cf4 createTime = \cf7 0\cf4 ;\
  6315. NSArray *array = [memberData getSelfMember:
  6316. \f2\b \cf8 self
  6317. \f0\b0 \cf4 .roomId];\
  6318. \f2\b \cf8 for
  6319. \f0\b0 \cf4 (memberData *mdata
  6320. \f2\b \cf8 in
  6321. \f0\b0 \cf4 array) \{\
  6322. NSString *userId = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , mdata.userId];\
  6323. \f2\b \cf8 if
  6324. \f0\b0 \cf4 ([userId isEqualToString:myUserId])\{\
  6325. createTime = mdata.createTime;\
  6326. \}\
  6327. \}\
  6328. p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:[NSDate dateWithTimeIntervalSince1970:createTime]];\
  6329. \}\
  6330. \f2\b \cf8 if
  6331. \f0\b0 \cf4 (_array.count <= \cf7 0\cf4 &&(!p || p.count <= \cf7 0\cf4 ) && (!
  6332. \f2\b \cf8 self
  6333. \f0\b0 \cf4 .roomJid ||
  6334. \f2\b \cf8 self
  6335. \f0\b0 \cf4 .roomJid.length <= \cf7 0\cf4 )) \{\
  6336. \f2\b \cf8 self
  6337. \f0\b0 \cf4 .isGetServerMsg =
  6338. \f2\b \cf8 YES
  6339. \f0\b0 \cf4 ;\
  6340. [
  6341. \f2\b \cf8 self
  6342. \f0\b0 \cf4 refresh:
  6343. \f2\b \cf8 nil
  6344. \f0\b0 \cf4 ];\
  6345. \f2\b \cf8 return
  6346. \f0\b0 \cf4 ;\
  6347. \}\
  6348. \
  6349. bPull = (p && p.count > \cf7 0\cf4 );\
  6350. \}
  6351. \f2\b \cf8 else
  6352. \f0\b0 \cf4 \{\
  6353. p = [[JXMessageObject sharedInstance] fetchAllMessageListWithUser:s];\
  6354. [_array removeAllObjects];\
  6355. bPull =
  6356. \f2\b \cf8 NO
  6357. \f0\b0 \cf4 ;\
  6358. \}\
  6359. \
  6360. \}\
  6361. \
  6362. \f2\b \cf8 for
  6363. \f0\b0 \cf4 (JXMessageObject *msg
  6364. \f2\b \cf8 in
  6365. \f0\b0 \cf4 p) \{\
  6366. allHeight += [msg.chatMsgHeight floatValue];\
  6367. \}\
  6368. \
  6369. \f2\b \cf8 self
  6370. \f0\b0 \cf4 .isGetServerMsg = !bPull;\
  6371. \
  6372. \cf2 //
  6373. \f1 \'bb\'f1\'c8\'a1\'bf\'da\'c1\'ee\'ba\'ec\'b0\'fc\'bc\'c7\'c2\'bc
  6374. \f0 \cf4 \
  6375. [_orderRedPacketArray removeAllObjects];\
  6376. [_orderRedPacketArray addObjectsFromArray:[
  6377. \f2\b \cf8 self
  6378. \f0\b0 \cf4 fetchRedPacketListWithType:\cf7 3\cf4 ]];\
  6379. \
  6380. b = p.count>\cf7 0\cf4 ;\
  6381. bPull = p.count>=PAGE_SHOW_COUNT;\
  6382. \cf2 // if(_page == 0 || self.scrollLine>0)//
  6383. \f1 \'c8\'e7\'b9\'fb
  6384. \f0 \cf4 \
  6385. \cf2 // [_array removeAllObjects];\cf4 \
  6386. \f2\b \cf8 if
  6387. \f0\b0 \cf4 (b)\{\
  6388. NSMutableArray* temp = [[NSMutableArray alloc]init];\
  6389. [temp addObjectsFromArray:p];\
  6390. [temp addObjectsFromArray:_array];\
  6391. [_array removeAllObjects];\
  6392. [_array addObjectsFromArray:temp];\
  6393. [temp removeAllObjects];\
  6394. \cf2 // [temp release];\cf4 \
  6395. \}\
  6396. [p removeAllObjects];\
  6397. \cf2 // [p release];\cf4 \
  6398. \}
  6399. \f2\b \cf8 else
  6400. \f0\b0 \cf4 \
  6401. [_array addObject:msg];\
  6402. \
  6403. \
  6404. JXMessageObject *lastMsg = _array.lastObject;\
  6405. \f2\b \cf8 if
  6406. \f0\b0 \cf4 (lastMsg && lastMsg.isVisible) \{\
  6407. \f2\b \cf8 if
  6408. \f0\b0 \cf4 (
  6409. \f2\b \cf8 self
  6410. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
  6411. lastMsg.isGroup =
  6412. \f2\b \cf8 YES
  6413. \f0\b0 \cf4 ;\
  6414. \}\
  6415. \f2\b \cf8 if
  6416. \f0\b0 \cf4 (lastMsg.isMySend) \{\
  6417. \f2\b \cf8 if
  6418. \f0\b0 \cf4 ([lastMsg.isSend boolValue]) \{\
  6419. [lastMsg updateLastSend:UpdateLastSendType_None];\
  6420. \}\
  6421. \}
  6422. \f2\b \cf8 else
  6423. \f0\b0 \cf4 \{\
  6424. [lastMsg updateLastSend:UpdateLastSendType_None];\
  6425. \}\
  6426. \
  6427. \f2\b \cf8 self
  6428. \f0\b0 \cf4 .lastMsg.content = [lastMsg getLastContent];\
  6429. \}\
  6430. \
  6431. \
  6432. [
  6433. \f2\b \cf8 self
  6434. \f0\b0 \cf4 setIsShowTime];\
  6435. \
  6436. \f2\b \cf8 if
  6437. \f0\b0 \cf4 (b) \{\
  6438. [_pool removeAllObjects];\
  6439. _refreshCount++;\
  6440. \
  6441. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 .5\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
  6442. \cf2 //
  6443. \f1 \'cb\'a2\'d0\'c2\'cd\'ea\'b3\'c9
  6444. \f0 \cf4 \
  6445. \f2\b \cf8 if
  6446. \f0\b0 \cf4 (
  6447. \f2\b \cf8 self
  6448. \f0\b0 \cf4 .scrollLine > \cf7 0\cf4 ) \{\
  6449. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 0.5\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
  6450. \
  6451. [_table reloadData];\
  6452. [
  6453. \f2\b \cf8 self
  6454. \f0\b0 \cf4 scrollToCurrentLine];\
  6455. _isRefreshing =
  6456. \f2\b \cf8 NO
  6457. \f0\b0 \cf4 ;\
  6458. \});\
  6459. \}
  6460. \f2\b \cf8 else
  6461. \f0\b0 \cf4 \{\
  6462. \f2\b \cf8 if
  6463. \f0\b0 \cf4 (msg || _page == \cf7 0\cf4 )\{\
  6464. \
  6465. [_table reloadData];\
  6466. \f2\b \cf8 if
  6467. \f0\b0 \cf4 (
  6468. \f2\b \cf8 self
  6469. \f0\b0 \cf4 .isSyncMsg ||
  6470. \f2\b \cf8 self
  6471. \f0\b0 \cf4 .isGotoLast) \{\
  6472. [_table gotoLastRow:
  6473. \f2\b \cf8 NO
  6474. \f0\b0 \cf4 ];\
  6475. \}\
  6476. \}\
  6477. \f2\b \cf8 else
  6478. \f0\b0 \cf4 \{\
  6479. \f2\b \cf8 if
  6480. \f0\b0 \cf4 ([_array count]>\cf7 0\cf4 )\{\
  6481. \
  6482. [_table reloadData];\
  6483. \cf2 // [_table gotoRow: (int)(_array.count - firstNum + 2)];\cf4 \
  6484. \cf2 // [_table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:(int)(_array.count - firstNum) inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];\cf4 \
  6485. _table.contentOffset = CGPointMake(\cf7 0\cf4 , allHeight);\
  6486. \
  6487. \}\
  6488. \}\
  6489. \
  6490. \
  6491. _isRefreshing =
  6492. \f2\b \cf8 NO
  6493. \f0\b0 \cf4 ;\
  6494. \}\
  6495. \
  6496. \});\
  6497. \
  6498. \}
  6499. \f2\b \cf8 else
  6500. \f0\b0 \cf4 \{\
  6501. _isRefreshing =
  6502. \f2\b \cf8 NO
  6503. \f0\b0 \cf4 ;\
  6504. \}\
  6505. \
  6506. \}\
  6507. \
  6508. - (
  6509. \f2\b \cf8 void
  6510. \f0\b0 \cf4 ) \cf11 scrollToCurrentLine\cf4 \{\
  6511. [_table gotoRow:
  6512. \f2\b \cf8 self
  6513. \f0\b0 \cf4 .scrollLine];\
  6514. \cf2 // NSIndexPath *indexPath = [NSIndexPath indexPathForRow:self.scrollLine - 1 inSection:0];\cf4 \
  6515. \cf2 // [_table scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES];\cf4 \
  6516. \}\
  6517. \
  6518. - (
  6519. \f2\b \cf8 void
  6520. \f0\b0 \cf4 )\cf11 didReceiveMemoryWarning\cf4 \
  6521. \{\
  6522. [
  6523. \f2\b \cf8 super
  6524. \f0\b0 \cf4 didReceiveMemoryWarning];\
  6525. \cf2 // Dispose of any resources that can be recreated.\cf4 \
  6526. \}\
  6527. \
  6528. - (
  6529. \f2\b \cf8 void
  6530. \f0\b0 \cf4 )\cf11 dealloc\cf4 \{\
  6531. \
  6532. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  6533. \f2\b \cf8 self
  6534. \f0\b0 \cf4 ];\
  6535. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  6536. \f2\b \cf8 self
  6537. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kCellShowCardNotifaction\cf4 \cf14 object\cf4 :
  6538. \f2\b \cf8 nil
  6539. \f0\b0 \cf4 ];\
  6540. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  6541. \f2\b \cf8 self
  6542. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kCellLocationNotifaction\cf4 \cf14 object\cf4 :
  6543. \f2\b \cf8 nil
  6544. \f0\b0 \cf4 ];\
  6545. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  6546. \f2\b \cf8 self
  6547. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kCellImageNotifaction\cf4 \cf14 object\cf4 :
  6548. \f2\b \cf8 nil
  6549. \f0\b0 \cf4 ];\
  6550. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  6551. \f2\b \cf8 self
  6552. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kcellRedPacketDidTouchNotifaction\cf4 \cf14 object\cf4 :
  6553. \f2\b \cf8 nil
  6554. \f0\b0 \cf4 ];\
  6555. \
  6556. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  6557. \f2\b \cf8 self
  6558. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kCellHeadImageNotification\cf4 \cf14 object\cf4 :
  6559. \f2\b \cf8 nil
  6560. \f0\b0 \cf4 ];\
  6561. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  6562. \f2\b \cf8 self
  6563. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kHiddenKeyboardNotification\cf4 \cf14 object\cf4 :
  6564. \f2\b \cf8 nil
  6565. \f0\b0 \cf4 ];\
  6566. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  6567. \f2\b \cf8 self
  6568. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kUpdateChatVCGroupHelperData\cf4 \cf14 object\cf4 :
  6569. \f2\b \cf8 nil
  6570. \f0\b0 \cf4 ];\
  6571. \
  6572. [\cf5 g_notify\cf4 \cf14 removeObserver\cf4 :
  6573. \f2\b \cf8 self
  6574. \f0\b0 \cf4 \cf14 name\cf4 :\cf5 kKeepOnSendGroupSendMessage\cf4 \cf14 object\cf4 :
  6575. \f2\b \cf8 nil
  6576. \f0\b0 \cf4 ];\
  6577. \
  6578. \cf14 NSLog\cf4 (\cf6 @"JXChatViewController.dealloc"\cf4 );\
  6579. [\cf5 g_xmpp\cf4 .\cf15 chatingUserIds\cf4 \cf14 removeObject\cf4 :\cf15 current_chat_userId\cf4 ];\
  6580. \cf15 current_chat_userId\cf4 =
  6581. \f2\b \cf8 nil
  6582. \f0\b0 \cf4 ;\
  6583. \
  6584. [
  6585. \f2\b \cf8 self
  6586. \f0\b0 \cf4 \cf15 hideKeyboard\cf4 :
  6587. \f2\b \cf8 NO
  6588. \f0\b0 \cf4 ];\
  6589. [
  6590. \f2\b \cf8 self
  6591. \f0\b0 \cf4 \cf15 unInitAudio\cf4 ];\
  6592. \
  6593. [\cf15 _wait\cf4 \cf15 stop\cf4 ];\
  6594. [\cf15 _wait\cf4 \cf15 stop\cf4 ];\
  6595. [
  6596. \f2\b \cf8 self
  6597. \f0\b0 \cf4 \cf15 free\cf4 :\cf15 _pool\cf4 ];\
  6598. [\cf15 _pool\cf4 \cf14 removeAllObjects\cf4 ];\
  6599. \cf2 // [_pool release];\cf4 \
  6600. \cf15 _pool\cf4 =
  6601. \f2\b \cf8 nil
  6602. \f0\b0 \cf4 ;\
  6603. \
  6604. [\cf15 _array\cf4 \cf14 removeAllObjects\cf4 ];\
  6605. \cf2 // [_array release];\cf4 \
  6606. \
  6607. \
  6608. \cf2 // [_messageConent release];\cf4 \
  6609. \cf15 _faceView\cf4 .\cf15 delegate\cf4 =
  6610. \f2\b \cf8 nil
  6611. \f0\b0 \cf4 ;\
  6612. \cf2 // [_table release];\cf4 \
  6613. \cf2 // [_moreView release];\cf4 \
  6614. \cf15 _moreView\cf4 =
  6615. \f2\b \cf8 nil
  6616. \f0\b0 \cf4 ;\
  6617. \
  6618. \cf2 // [_voice release];\cf4 \
  6619. \cf2 // _poolSend = nil;\cf4 \
  6620. \
  6621. \cf15 _locationVC\cf4 =
  6622. \f2\b \cf8 nil
  6623. \f0\b0 \cf4 ;\
  6624. \f2\b \cf8 self
  6625. \f0\b0 \cf4 .\cf15 chatPerson\cf4 =
  6626. \f2\b \cf8 nil
  6627. \f0\b0 \cf4 ;\
  6628. \cf2 // [super dealloc];\cf4 \
  6629. \
  6630. [
  6631. \f2\b \cf8 self
  6632. \f0\b0 \cf4 .\cf15 enteringTimer\cf4 \cf14 invalidate\cf4 ];\
  6633. \f2\b \cf8 self
  6634. \f0\b0 \cf4 .\cf15 enteringTimer\cf4 =
  6635. \f2\b \cf8 nil
  6636. \f0\b0 \cf4 ;\
  6637. [
  6638. \f2\b \cf8 self
  6639. \f0\b0 \cf4 .\cf15 noEnteringTimer\cf4 \cf14 invalidate\cf4 ];\
  6640. \f2\b \cf8 self
  6641. \f0\b0 \cf4 .\cf15 noEnteringTimer\cf4 =
  6642. \f2\b \cf8 nil
  6643. \f0\b0 \cf4 ;\
  6644. \
  6645. \}\
  6646. \
  6647. -(
  6648. \f2\b \cf8 void
  6649. \f0\b0 \cf4 )\cf11 free\cf4 :(\cf10 NSMutableArray\cf4 *)array\{\
  6650. \f2\b \cf8 for
  6651. \f0\b0 \cf4 (
  6652. \f2\b \cf8 int
  6653. \f0\b0 \cf4 i=(
  6654. \f2\b \cf8 int
  6655. \f0\b0 \cf4 )[array \cf14 count\cf4 ]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
  6656. \f2\b \cf8 id
  6657. \f0\b0 \cf4 p = [array \cf14 objectAtIndex\cf4 :i];\
  6658. [array \cf14 removeObjectAtIndex\cf4 :i];\
  6659. p =
  6660. \f2\b \cf8 nil
  6661. \f0\b0 \cf4 ;\
  6662. \}\
  6663. \}\
  6664. \
  6665. \cf2 //
  6666. \f1 \'d5\'fd\'d4\'da\'ca\'e4\'c8\'eb
  6667. \f0 \cf4 \
  6668. - (
  6669. \f2\b \cf8 void
  6670. \f0\b0 \cf4 )\cf11 enteringNotifi\cf4 :(\cf10 NSNotification\cf4 *) notif \{\
  6671. \cf9 JXMessageObject\cf4 *msg = notif.\cf14 object\cf4 ;\
  6672. \f2\b \cf8 if
  6673. \f0\b0 \cf4 ([\cf15 chatPerson\cf4 .\cf15 userId\cf4 \cf14 isEqualToString\cf4 :msg.\cf15 fromUserId\cf4 ]) \{\
  6674. \f2\b \cf8 if
  6675. \f0\b0 \cf4 (msg==
  6676. \f2\b \cf8 nil
  6677. \f0\b0 \cf4 )\
  6678. \f2\b \cf8 return
  6679. \f0\b0 \cf4 ;\
  6680. \f2\b \cf8 if
  6681. \f0\b0 \cf4 (
  6682. \f2\b \cf8 self
  6683. \f0\b0 \cf4 .\cf15 roomJid\cf4 || msg.\cf15 isGroup\cf4 ) \{\
  6684. \f2\b \cf8 return
  6685. \f0\b0 \cf4 ;\
  6686. \}\
  6687. \f2\b \cf8 self
  6688. \f0\b0 \cf4 .\cf14 title\cf4 = \cf5 Localized\cf4 (\cf6 @"JX_Entering"\cf4 );\
  6689. \
  6690. [
  6691. \f2\b \cf8 self
  6692. \f0\b0 \cf4 \cf15 setAudioIconFrame\cf4 ];\
  6693. \f2\b \cf8 self
  6694. \f0\b0 \cf4 .\cf15 noEnteringTimer\cf4 = [\cf10 NSTimer\cf4 \cf14 scheduledTimerWithTimeInterval\cf4 :\cf7 10\cf4 \cf14 target\cf4 :
  6695. \f2\b \cf8 self
  6696. \f0\b0 \cf4 \cf14 selector\cf4 :
  6697. \f2\b \cf8 @selector
  6698. \f0\b0 \cf4 (noEnteringTimerAction:) \cf14 userInfo\cf4 :
  6699. \f2\b \cf8 nil
  6700. \f0\b0 \cf4 \cf14 repeats\cf4 :
  6701. \f2\b \cf8 NO
  6702. \f0\b0 \cf4 ];\
  6703. \}\
  6704. \}\
  6705. \
  6706. - (
  6707. \f2\b \cf8 void
  6708. \f0\b0 \cf4 ) \cf11 noEnteringTimerAction\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
  6709. [
  6710. \f2\b \cf8 self
  6711. \f0\b0 \cf4 .\cf15 noEnteringTimer\cf4 \cf14 invalidate\cf4 ];\
  6712. \f2\b \cf8 self
  6713. \f0\b0 \cf4 .\cf15 noEnteringTimer\cf4 =
  6714. \f2\b \cf8 nil
  6715. \f0\b0 \cf4 ;\
  6716. \f2\b \cf8 if
  6717. \f0\b0 \cf4 (
  6718. \f2\b \cf8 self
  6719. \f0\b0 \cf4 .\cf15 courseId\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  6720. \f2\b \cf8 return
  6721. \f0\b0 \cf4 ;\
  6722. \}\
  6723. \f2\b \cf8 if
  6724. \f0\b0 \cf4 ([\cf15 chatPerson\cf4 .\cf15 userId\cf4 \cf14 intValue\cf4 ]<\cf7 10100\cf4 && [\cf15 chatPerson\cf4 .\cf15 userId\cf4 \cf14 intValue\cf4 ]>=\cf7 10000\cf4 ) \{\
  6725. \f2\b \cf8 self
  6726. \f0\b0 \cf4 .\cf14 title\cf4 = \cf15 chatPerson\cf4 .\cf15 userNickname\cf4 ;\
  6727. [
  6728. \f2\b \cf8 self
  6729. \f0\b0 \cf4 \cf15 setAudioIconFrame\cf4 ];\
  6730. \}
  6731. \f2\b \cf8 else
  6732. \f0\b0 \cf4 \{\
  6733. \cf2 // NSString *str = self.onlinestate ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
  6734. \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.remarkName.length > 0 ? chatPerson.remarkName : chatPerson.userNickname,str];\cf4 \
  6735. [
  6736. \f2\b \cf8 self
  6737. \f0\b0 \cf4 \cf15 setChatTitle\cf4 :\cf15 chatPerson\cf4 .\cf15 remarkName\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ? \cf15 chatPerson\cf4 .\cf15 remarkName\cf4 : \cf15 chatPerson\cf4 .\cf15 userNickname\cf4 ];\
  6738. \}\
  6739. \}\
  6740. \
  6741. \cf5 #pragma mark
  6742. \f2\b \cf16 ---
  6743. \f4 \'b4\'a5\'c3\'fe\'b9\'d8\'b1\'d5\'bc\'fc\'c5\'cc
  6744. \f2 ----
  6745. \f0\b0 \cf4 \
  6746. -(
  6747. \f2\b \cf8 void
  6748. \f0\b0 \cf4 )\cf11 handleTap\cf4 :(\cf10 UIGestureRecognizer\cf4 *)gesture\
  6749. \{\
  6750. [
  6751. \f2\b \cf8 self
  6752. \f0\b0 \cf4 .\cf14 view\cf4 \cf14 endEditing\cf4 :
  6753. \f2\b \cf8 YES
  6754. \f0\b0 \cf4 ];\
  6755. \}\
  6756. \
  6757. \
  6758. \cf5 #pragma mark
  6759. \f2\b \cf16 ----
  6760. \f4 \'bc\'fc\'c5\'cc\'b8\'df\'b6\'c8\'b1\'e4\'bb\'af
  6761. \f2 ------
  6762. \f0\b0 \cf4 \
  6763. -(
  6764. \f2\b \cf8 void
  6765. \f0\b0 \cf4 )\cf11 changeKeyBoard\cf4 :(NSNotification *)aNotifacation\
  6766. \{\
  6767. \
  6768. \f2\b \cf8 self
  6769. \f0\b0 \cf4 .\cf15 shareMore\cf4 .\cf14 selected\cf4 =
  6770. \f2\b \cf8 YES
  6771. \f0\b0 \cf4 ;\
  6772. \
  6773. \f2\b \cf8 id
  6774. \f0\b0 \cf4 view = \cf5 g_navigation\cf4 .\cf15 subViews\cf4 .\cf14 lastObject\cf4 ;\
  6775. \f2\b \cf8 if
  6776. \f0\b0 \cf4 (![view \cf14 isEqual\cf4 :
  6777. \f2\b \cf8 self
  6778. \f0\b0 \cf4 ]) \{\
  6779. \f2\b \cf8 return
  6780. \f0\b0 \cf4 ;\
  6781. \}\
  6782. \
  6783. \f2\b \cf8 if
  6784. \f0\b0 \cf4 (!\cf15 _messageText\cf4 .\cf14 isFirstResponder\cf4 ) \{\
  6785. \f2\b \cf8 return
  6786. \f0\b0 \cf4 ;\
  6787. \}\
  6788. \
  6789. \cf2 // return;\cf4 \
  6790. \cf2 //
  6791. \f1 \'bb\'f1\'c8\'a1\'b5\'bd\'bc\'fc\'c5\'cc
  6792. \f0 frame
  6793. \f1 \'b1\'e4\'bb\'af\'d6\'ae\'c7\'b0\'b5\'c4
  6794. \f0 frame\cf4 \
  6795. \cf10 NSValue\cf4 *keyboardBeginBounds=[[aNotifacation \cf14 userInfo\cf4 ]\cf14 objectForKey\cf4 :\cf14 UIKeyboardFrameBeginUserInfoKey\cf4 ];\
  6796. \cf10 CGRect\cf4 beginRect=[keyboardBeginBounds \cf14 CGRectValue\cf4 ];\
  6797. \
  6798. \cf2 //
  6799. \f1 \'bb\'f1\'c8\'a1\'b5\'bd\'bc\'fc\'c5\'cc
  6800. \f0 frame
  6801. \f1 \'b1\'e4\'bb\'af\'d6\'ae\'ba\'f3\'b5\'c4
  6802. \f0 frame\cf4 \
  6803. \cf10 NSValue\cf4 *keyboardEndBounds=[[aNotifacation \cf14 userInfo\cf4 ]\cf14 objectForKey\cf4 :\cf14 UIKeyboardFrameEndUserInfoKey\cf4 ];\
  6804. \
  6805. \cf10 CGRect\cf4 endRect=[keyboardEndBounds \cf14 CGRectValue\cf4 ];\
  6806. \
  6807. \cf10 CGFloat\cf4 deltaY=endRect.\cf14 origin\cf4 .\cf14 y\cf4 -beginRect.\cf14 origin\cf4 .\cf14 y\cf4 ;\
  6808. \f2\b \cf8 self
  6809. \f0\b0 \cf4 .\cf15 deltaY\cf4 = deltaY;\
  6810. \cf2 //
  6811. \f1 \'c4\'c3
  6812. \f0 frame
  6813. \f1 \'b1\'e4\'bb\'af\'d6\'ae\'ba\'f3\'b5\'c4
  6814. \f0 origin.y-
  6815. \f1 \'b1\'e4\'bb\'af\'d6\'ae\'c7\'b0\'b5\'c4
  6816. \f0 origin.y
  6817. \f1 \'a3\'ac\'c6\'e4\'b2\'ee\'d6\'b5
  6818. \f0 (
  6819. \f1 \'b4\'f8\'d5\'fd\'b8\'ba\'ba\'c5
  6820. \f0 )
  6821. \f1 \'be\'cd\'ca\'c7\'ce\'d2\'c3\'c7
  6822. \f0 self.view
  6823. \f1 \'b5\'c4
  6824. \f0 y
  6825. \f1 \'b7\'bd\'cf\'f2\'c9\'cf\'b5\'c4\'d4\'f6\'c1\'bf
  6826. \f0 \cf4 \
  6827. deltaY=-endRect.\cf14 size\cf4 .\cf14 height\cf4 ;\
  6828. \f2\b \cf8 self
  6829. \f0\b0 \cf4 .\cf15 deltaHeight\cf4 = deltaY;\
  6830. \cf2 // NSLog(@"deltaY:%f",deltaY);\cf4 \
  6831. [\cf10 CATransaction\cf4 \cf14 begin\cf4 ];\
  6832. [\cf10 UIView\cf4 \cf14 animateWithDuration\cf4 :\cf7 0.4f\cf4 \cf14 animations\cf4 :^\{\
  6833. \cf2 // [_table setFrame:CGRectMake(0, 0, _table.frame.size.width, self.view.frame.size.height+deltaY-self.heightFooter)];\cf4 \
  6834. \cf2 // [_table gotoLastRow:NO];\cf4 \
  6835. \f2\b \cf8 self
  6836. \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf7 0\cf4 ,
  6837. \f2\b \cf8 self
  6838. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 +deltaY-
  6839. \f2\b \cf8 self
  6840. \f0\b0 \cf4 .\cf15 heightFooter\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 ,
  6841. \f2\b \cf8 self
  6842. \f0\b0 \cf4 .\cf15 heightFooter\cf4 );\
  6843. \
  6844. \f2\b \cf8 self
  6845. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (
  6846. \f2\b \cf8 self
  6847. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 x\cf4 ,
  6848. \f2\b \cf8 self
  6849. \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 y\cf4 -
  6850. \f2\b \cf8 self
  6851. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 - \cf7 10\cf4 ,
  6852. \f2\b \cf8 self
  6853. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 ,
  6854. \f2\b \cf8 self
  6855. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 );\
  6856. \} \cf14 completion\cf4 :^(
  6857. \f2\b \cf8 BOOL
  6858. \f0\b0 \cf4 finished) \{\
  6859. \}];\
  6860. [\cf10 CATransaction\cf4 \cf14 commit\cf4 ];\
  6861. \
  6862. \f2\b \cf8 if
  6863. \f0\b0 \cf4 ((\cf15 _table\cf4 .\cf14 contentSize\cf4 .\cf14 height\cf4 > (
  6864. \f2\b \cf8 self
  6865. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 + deltaY -
  6866. \f2\b \cf8 self
  6867. \f0\b0 \cf4 .\cf15 heightFooter\cf4 - \cf7 64\cf4 - \cf7 40\cf4 )) ||
  6868. \f2\b \cf8 self
  6869. \f0\b0 \cf4 .\cf15 deltaY\cf4 > \cf7 0\cf4 ) \{\
  6870. \
  6871. [\cf10 CATransaction\cf4 \cf14 begin\cf4 ];\cf2 //
  6872. \f1 \'b4\'b4\'bd\'a8\'cf\'d4\'ca\'bd\'ca\'c2\'ce\'f1
  6873. \f0 \cf4 \
  6874. [\cf10 UIView\cf4 \cf14 animateWithDuration\cf4 :\cf7 0.1f\cf4 \cf14 animations\cf4 :^\{\
  6875. \cf2 // self.tableFooter.frame = CGRectMake(0, self.view.frame.size.height+deltaY-self.heightFooter, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
  6876. [\cf15 _table\cf4 \cf14 setFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 0\cf4 +\cf15 _noticeHeight\cf4 , \cf15 _table\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 ,
  6877. \f2\b \cf8 self
  6878. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 +deltaY-
  6879. \f2\b \cf8 self
  6880. \f0\b0 \cf4 .\cf15 heightFooter\cf4 -\cf15 _noticeHeight\cf4 )];\
  6881. [\cf15 _table\cf4 \cf15 gotoLastRow\cf4 :
  6882. \f2\b \cf8 NO
  6883. \f0\b0 \cf4 ];\
  6884. \} \cf14 completion\cf4 :^(
  6885. \f2\b \cf8 BOOL
  6886. \f0\b0 \cf4 finished) \{\
  6887. \}];\
  6888. [\cf10 CATransaction\cf4 \cf14 commit\cf4 ];\
  6889. \}\
  6890. \}\
  6891. \
  6892. - (
  6893. \f2\b \cf8 BOOL
  6894. \f0\b0 \cf4 )\cf11 theTextAllSpace\cf4 :(\cf10 NSString\cf4 *)text \{\
  6895. \cf10 NSString\cf4 *string = [text \cf14 copy\cf4 ];\
  6896. string = [string \cf14 stringByReplacingOccurrencesOfString\cf4 :\cf6 @" "\cf4 \cf14 withString\cf4 :\cf6 @""\cf4 ];\
  6897. \f2\b \cf8 if
  6898. \f0\b0 \cf4 (string.\cf14 length\cf4 <= \cf7 0\cf4 ) \{\
  6899. \f2\b \cf8 return
  6900. \f0\b0 \cf4
  6901. \f2\b \cf8 YES
  6902. \f0\b0 \cf4 ;\
  6903. \}\
  6904. \f2\b \cf8 return
  6905. \f0\b0 \cf4
  6906. \f2\b \cf8 NO
  6907. \f0\b0 \cf4 ;\
  6908. \}\
  6909. \
  6910. - (
  6911. \f2\b \cf8 void
  6912. \f0\b0 \cf4 )\cf11 sendIt\cf4 :(
  6913. \f2\b \cf8 id
  6914. \f0\b0 \cf4 )sender \{\
  6915. \f2\b \cf8 if
  6916. \f0\b0 \cf4 ([
  6917. \f2\b \cf8 self
  6918. \f0\b0 \cf4 \cf15 showDisableSay\cf4 ])\
  6919. \f2\b \cf8 return
  6920. \f0\b0 \cf4 ;\
  6921. \
  6922. \f2\b \cf8 if
  6923. \f0\b0 \cf4 ([
  6924. \f2\b \cf8 self
  6925. \f0\b0 \cf4 \cf15 sendMsgCheck\cf4 ])\{\
  6926. \f2\b \cf8 return
  6927. \f0\b0 \cf4 ;\
  6928. \}\
  6929. \
  6930. \cf10 NSString\cf4 *userId =
  6931. \f2\b \cf8 self
  6932. \f0\b0 \cf4 .\cf15 userIds\cf4 [
  6933. \f2\b \cf8 self
  6934. \f0\b0 \cf4 .\cf15 groupMessagesIndex\cf4 ];\
  6935. \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
  6936. \
  6937. \cf10 NSMutableArray\cf4 * tempArray = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
  6938. \f2\b \cf8 for
  6939. \f0\b0 \cf4 (\cf9 memberData\cf4 * member
  6940. \f2\b \cf8 in
  6941. \f0\b0 \cf4 \cf15 _atMemberArray\cf4 ) \{\
  6942. \f2\b \cf8 if
  6943. \f0\b0 \cf4 (member.\cf15 idStr\cf4 )\{\
  6944. [tempArray \cf14 addObject\cf4 :[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@"\cf4 ,member.\cf15 idStr\cf4 ]];\
  6945. \}
  6946. \f2\b \cf8 else
  6947. \f0\b0 \cf4 \{\
  6948. [tempArray \cf14 addObject\cf4 :[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%ld"\cf4 ,member.\cf15 userId\cf4 ]];\
  6949. \}\
  6950. \}\
  6951. \cf10 NSString\cf4 * ObjectIdStr = [tempArray \cf14 componentsJoinedByString\cf4 :\cf6 @" "\cf4 ];\
  6952. \
  6953. \f2\b \cf8 if
  6954. \f0\b0 \cf4 (
  6955. \f2\b \cf8 self
  6956. \f0\b0 \cf4 .\cf15 objToMsg\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  6957. ObjectIdStr =
  6958. \f2\b \cf8 self
  6959. \f0\b0 \cf4 .\cf15 objToMsg\cf4 ;\
  6960. \}\
  6961. \
  6962. \cf2 // NSString *message = messageText.text;\cf4 \
  6963. \cf10 NSString\cf4 *message = [\cf15 _messageText\cf4 .\cf14 textStorage\cf4 \cf15 getPlainString\cf4 ];\
  6964. \f2\b \cf8 if
  6965. \f0\b0 \cf4 ([
  6966. \f2\b \cf8 self
  6967. \f0\b0 \cf4 \cf15 theTextAllSpace\cf4 :message]) \{\
  6968. \cf2 // txt
  6969. \f1 \'c8\'ab\'ca\'c7\'bf\'d5\'b8\'f1
  6970. \f0 \cf4 \
  6971. \cf15 _messageText\cf4 .\cf14 text\cf4 = \cf6 @""\cf4 ;\
  6972. [
  6973. \f2\b \cf8 self
  6974. \f0\b0 \cf4 \cf15 doEndEdit\cf4 ];\
  6975. \cf2 //
  6976. \f1 \'b2\'bb\'c4\'dc\'b7\'a2\'cb\'cd\'bf\'d5\'b0\'d7\'cf\'fb\'cf\'a2
  6977. \f0 \cf4 \
  6978. [\cf5 g_App\cf4 \cf15 showAlert\cf4 :\cf5 Localized\cf4 (\cf6 @"JX_CannotSendBlankMessage"\cf4 )];\
  6979. \f2\b \cf8 return
  6980. \f0\b0 \cf4 ;\
  6981. \}\
  6982. \f2\b \cf8 if
  6983. \f0\b0 \cf4 (message.\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  6984. \cf9 JXMessageObject\cf4 *msg=[[\cf9 JXMessageObject\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
  6985. msg.\cf15 timeSend\cf4 = [\cf10 NSDate\cf4 \cf14 date\cf4 ];\
  6986. msg.\cf15 fromUserId\cf4 = \cf5 MY_USER_ID\cf4 ;\
  6987. \f2\b \cf8 if
  6988. \f0\b0 \cf4 ([
  6989. \f2\b \cf8 self
  6990. \f0\b0 \cf4 .\cf15 roomJid\cf4 \cf14 length\cf4 ]>\cf7 0\cf4 )\{\
  6991. msg.\cf15 toUserId\cf4 =
  6992. \f2\b \cf8 self
  6993. \f0\b0 \cf4 .\cf15 roomJid\cf4 ;\
  6994. msg.\cf15 isGroup\cf4 =
  6995. \f2\b \cf8 YES
  6996. \f0\b0 \cf4 ;\
  6997. msg.\cf15 fromUserName\cf4 = \cf15 _userNickName\cf4 ;\
  6998. \}\
  6999. \f2\b \cf8 else
  7000. \f0\b0 \cf4 \{\
  7001. \cf2 /*\cf4 \
  7002. \cf2 if (self.isGroupMessages) \{\cf4 \
  7003. \cf2 if (_isGroupSendCancel) \{\cf4 \
  7004. \cf2 return;\cf4 \
  7005. \cf2 \}\cf4 \
  7006. \cf2 msg.toUserId = userId;\cf4 \
  7007. \cf2 msg.isGroupSend = YES;\cf4 \
  7008. \cf2 if ((self.groupMessagesIndex + 1) % _onceSendNum == 0) \{\cf4 \
  7009. \cf2 msg.isLastGroupSend = YES;\cf4 \
  7010. \cf2 \}\cf4 \
  7011. \cf2 \}else \{\cf4 \
  7012. \cf2 msg.toUserId = chatPerson.userId;\cf4 \
  7013. \cf2 \}\cf4 \
  7014. \cf2 msg.isGroup = NO;\cf4 \
  7015. \cf2 */\cf4 \
  7016. \f2\b \cf8 if
  7017. \f0\b0 \cf4 (
  7018. \f2\b \cf8 self
  7019. \f0\b0 \cf4 .\cf15 isGroupMessages\cf4 ) \{\
  7020. msg.\cf15 toUserId\cf4 = userId;\
  7021. \}
  7022. \f2\b \cf8 else
  7023. \f0\b0 \cf4 \{\
  7024. msg.\cf15 toUserId\cf4 = \cf15 chatPerson\cf4 .\cf15 userId\cf4 ;\
  7025. \}\
  7026. msg.\cf15 isGroup\cf4 =
  7027. \f2\b \cf8 NO
  7028. \f0\b0 \cf4 ;\
  7029. \}\
  7030. msg.\cf15 content\cf4 = message;\
  7031. \f2\b \cf8 if
  7032. \f0\b0 \cf4 (
  7033. \f2\b \cf8 self
  7034. \f0\b0 \cf4 .\cf15 objToMsg\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  7035. msg.\cf15 type\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf15 kWCMessageTypeReply\cf4 ];\
  7036. \}
  7037. \f2\b \cf8 else
  7038. \f0\b0 \cf4 \{\
  7039. msg.\cf15 type\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf15 kWCMessageTypeText\cf4 ];\
  7040. \}\
  7041. msg.\cf15 isSend\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf5 transfer_status_ing\cf4 ];\
  7042. msg.\cf15 isRead\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithBool\cf4 :
  7043. \f2\b \cf8 NO
  7044. \f0\b0 \cf4 ];\
  7045. msg.\cf15 isReadDel\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :
  7046. \f2\b \cf8 self
  7047. \f0\b0 \cf4 .\cf15 isReadDelete\cf4 ];\
  7048. \f2\b \cf8 if
  7049. \f0\b0 \cf4 (ObjectIdStr.\cf14 length\cf4 > \cf7 0\cf4 )\{\
  7050. msg.\cf15 objectId\cf4 = ObjectIdStr;\
  7051. \}\
  7052. \cf2 //
  7053. \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
  7054. \f0 \cf4 \
  7055. \cf2 /*\cf4 \
  7056. \cf2 [msg insert:self.roomJid];\cf4 \
  7057. \cf2 [g_xmpp sendMessage:msg roomName:self.roomJid];//
  7058. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  7059. \f0 \cf4 \
  7060. \cf2 */\cf4 \
  7061. \f2\b \cf8 if
  7062. \f0\b0 \cf4 (\cf15 _useInfoTempChat\cf4 ==\cf7 11\cf4 ) \{\
  7063. \
  7064. msg.\cf15 tempChat\cf4 = \cf7 11\cf4 ;\
  7065. \}
  7066. \f2\b \cf8 else
  7067. \f0\b0 \cf4 \
  7068. \{\
  7069. \
  7070. msg.\cf15 tempChat\cf4 = \cf7 1\cf4 ;\
  7071. \}\
  7072. \
  7073. \
  7074. \cf2 //
  7075. \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
  7076. \f0 \cf4 \
  7077. \f2\b \cf8 if
  7078. \f0\b0 \cf4 (
  7079. \f2\b \cf8 self
  7080. \f0\b0 \cf4 .\cf15 isGroupMessages\cf4 ) \{\
  7081. [msg \cf15 insert\cf4 :userId];\
  7082. [\cf5 g_xmpp\cf4 \cf15 sendMessage\cf4 :msg \cf15 roomName\cf4 :userId];\cf2 //
  7083. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  7084. \f0 \cf4 \
  7085. \}
  7086. \f2\b \cf8 else
  7087. \f0\b0 \cf4 \{\
  7088. [msg \cf15 insert\cf4 :
  7089. \f2\b \cf8 self
  7090. \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\
  7091. [\cf5 g_xmpp\cf4 \cf15 sendMessage\cf4 :msg \cf15 roomName\cf4 :
  7092. \f2\b \cf8 self
  7093. \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\cf2 //
  7094. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  7095. \f0 \cf4 \
  7096. \}\
  7097. \f2\b \cf8 if
  7098. \f0\b0 \cf4 (
  7099. \f2\b \cf8 self
  7100. \f0\b0 \cf4 .\cf15 isCYMSGgroupANDFriendy\cf4 )\{\
  7101. \
  7102. \}\
  7103. \
  7104. \
  7105. \
  7106. \cf2 /*\cf4 \
  7107. \cf2 if (self.isGroupMessages) \{\cf4 \
  7108. \cf2 self.groupMessagesIndex ++;\cf4 \
  7109. \cf2 if (msg.isLastGroupSend) \{\cf4 \
  7110. \cf2 return;\cf4 \
  7111. \cf2 \}\cf4 \
  7112. \cf2 if (self.groupMessagesIndex < self.userIds.count) \{\cf4 \
  7113. \cf2 [self sendIt:nil];\cf4 \
  7114. \cf2 \}else if (self.userIds)\{\cf4 \
  7115. \cf2 self.groupMessagesIndex = 0;\cf4 \
  7116. \cf2 _messageText.text = nil;\cf4 \
  7117. \cf2 [self hideKeyboard:YES];\cf4 \
  7118. \cf2 // [g_App showAlert:Localized(@"JX_SendComplete")];\cf4 \
  7119. \cf2 return;\cf4 \
  7120. \cf2 \}\cf4 \
  7121. \cf2 return;\cf4 \
  7122. \cf2 \}\cf4 \
  7123. \cf2 */\cf4 \
  7124. \f2\b \cf8 if
  7125. \f0\b0 \cf4 (
  7126. \f2\b \cf8 self
  7127. \f0\b0 \cf4 .isGroupMessages) \{\
  7128. \f2\b \cf8 self
  7129. \f0\b0 \cf4 .groupMessagesIndex ++;\
  7130. \f2\b \cf8 if
  7131. \f0\b0 \cf4 (
  7132. \f2\b \cf8 self
  7133. \f0\b0 \cf4 .groupMessagesIndex <
  7134. \f2\b \cf8 self
  7135. \f0\b0 \cf4 .userIds.count) \{\
  7136. [msg insert:
  7137. \f2\b \cf8 self
  7138. \f0\b0 \cf4 .roomJid];\
  7139. [g_xmpp sendMessage:msg roomName:
  7140. \f2\b \cf8 self
  7141. \f0\b0 \cf4 .roomJid];\cf2 //
  7142. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  7143. \f0 \cf4 \
  7144. [
  7145. \f2\b \cf8 self
  7146. \f0\b0 \cf4 sendIt:
  7147. \f2\b \cf8 nil
  7148. \f0\b0 \cf4 ];\
  7149. \}
  7150. \f2\b \cf8 else
  7151. \f0\b0 \cf4
  7152. \f2\b \cf8 if
  7153. \f0\b0 \cf4 (
  7154. \f2\b \cf8 self
  7155. \f0\b0 \cf4 .userIds)\{\
  7156. [msg insert:
  7157. \f2\b \cf8 self
  7158. \f0\b0 \cf4 .roomJid];\
  7159. [\cf5 g_xmpp\cf4 \cf15 sendMessage\cf4 :msg \cf15 roomName\cf4 :
  7160. \f2\b \cf8 self
  7161. \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\cf2 //
  7162. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  7163. \f0 \cf4 \
  7164. \f2\b \cf8 self
  7165. \f0\b0 \cf4 .\cf15 groupMessagesIndex\cf4 = \cf7 0\cf4 ;\
  7166. \cf15 _messageText\cf4 .\cf14 text\cf4 =
  7167. \f2\b \cf8 nil
  7168. \f0\b0 \cf4 ;\
  7169. [
  7170. \f2\b \cf8 self
  7171. \f0\b0 \cf4 \cf15 hideKeyboard\cf4 :
  7172. \f2\b \cf8 YES
  7173. \f0\b0 \cf4 ];\
  7174. [\cf5 g_App\cf4 \cf15 showAlert\cf4 :\cf5 Localized\cf4 (\cf6 @"JX_SendComplete"\cf4 )];\
  7175. \
  7176. \cf2 //
  7177. \f1 \'d0\'b4\'c8\'eb\'ca\'fd\'be\'dd\'bf\'e2
  7178. \f0 \cf4 \
  7179. \cf10 NSArray\cf4 *array =
  7180. \f2\b \cf8 self
  7181. \f0\b0 \cf4 .\cf15 userIds\cf4 ;\
  7182. \cf10 NSString\cf4 *userIdsString = [array \cf14 componentsJoinedByString\cf4 :\cf6 @","\cf4 ];\
  7183. array =
  7184. \f2\b \cf8 self
  7185. \f0\b0 \cf4 .\cf15 userNames\cf4 ;\
  7186. \cf10 NSString\cf4 *userNamesString = [array \cf14 componentsJoinedByString\cf4 :\cf6 @","\cf4 ];\
  7187. array =
  7188. \f2\b \cf8 self
  7189. \f0\b0 \cf4 .\cf15 userNamesWithGroup\cf4 ;\
  7190. \cf10 NSString\cf4 *userNamesWithGroupString = [array \cf14 componentsJoinedByString\cf4 :\cf6 @","\cf4 ];\
  7191. \cf10 NSString\cf4 *sendTime = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@"\cf4 , msg.\cf15 dictionary\cf4 [\cf6 @"timeSend"\cf4 ]];\
  7192. \
  7193. array =
  7194. \f2\b \cf8 self
  7195. \f0\b0 \cf4 .\cf15 userNmaesWithFriend\cf4 ;\
  7196. \cf10 NSString\cf4 *userNmaesWithFriendString = [array \cf14 componentsJoinedByString\cf4 :\cf6 @","\cf4 ];\
  7197. \
  7198. \cf9 JXLabelObject\cf4 *obj = \cf15 JXLabelObject\cf4 .\cf15 sharedInstance\cf4 ;\
  7199. obj.\cf15 userId\cf4 = msg.\cf15 fromUserId\cf4 ;\
  7200. obj.\cf15 userIds\cf4 = userIdsString;\
  7201. obj.\cf15 text1\cf4 = \cf15 _names\cf4 ;\
  7202. obj.\cf15 text2\cf4 = \cf15 _names2\cf4 ;\
  7203. obj.\cf15 userNames\cf4 = userNamesString;\
  7204. obj.\cf15 userNamesWithGroup\cf4 = userNamesWithGroupString;\
  7205. obj.\cf15 message\cf4 = msg.\cf15 content\cf4 ;\
  7206. obj.\cf15 sendTime\cf4 = sendTime;\
  7207. obj.\cf15 userNmaesWithFriend\cf4 = userNmaesWithFriendString;\
  7208. \f2\b \cf8 BOOL
  7209. \f0\b0 \cf4 succeed = [obj \cf15 insertRecord\cf4 ];\
  7210. \f2\b \cf8 if
  7211. \f0\b0 \cf4 (succeed) \{\
  7212. [\cf5 g_notify\cf4 \cf14 postNotificationName\cf4 :\cf5 kGroupHelperRefreshNotif\cf4 \cf14 object\cf4 :
  7213. \f2\b \cf8 nil
  7214. \f0\b0 \cf4 ];\
  7215. [\cf5 g_navigation\cf4 \cf15 popToViewController\cf4 :[\cf9 CYGroupSendHelperViewController\cf4
  7216. \f2\b \cf8 class
  7217. \f0\b0 \cf4 ] \cf15 animated\cf4 :
  7218. \f2\b \cf8 YES
  7219. \f0\b0 \cf4 ];\
  7220. \}\
  7221. \
  7222. \f2\b \cf8 return
  7223. \f0\b0 \cf4 ;\
  7224. \}\
  7225. \f2\b \cf8 return
  7226. \f0\b0 \cf4 ;\
  7227. \}\
  7228. [
  7229. \f2\b \cf8 self
  7230. \f0\b0 \cf4 \cf15 showOneMsg\cf4 :msg];\
  7231. \
  7232. \f2\b \cf8 if
  7233. \f0\b0 \cf4 (\cf15 _table\cf4 .\cf14 contentSize\cf4 .\cf14 height\cf4 > (\cf5 JX_SCREEN_HEIGHT\cf4 +
  7234. \f2\b \cf8 self
  7235. \f0\b0 \cf4 .\cf15 deltaHeight\cf4 -
  7236. \f2\b \cf8 self
  7237. \f0\b0 \cf4 .\cf15 heightFooter\cf4 - \cf7 64\cf4 - \cf7 40\cf4 - \cf7 20\cf4 )) \{\
  7238. \f2\b \cf8 if
  7239. \f0\b0 \cf4 (
  7240. \f2\b \cf8 self
  7241. \f0\b0 \cf4 .\cf15 deltaY\cf4 >= \cf7 0\cf4 ) \{\
  7242. \
  7243. \}
  7244. \f2\b \cf8 else
  7245. \f0\b0 \cf4 \{\
  7246. \
  7247. \f2\b \cf8 if
  7248. \f0\b0 \cf4 (
  7249. \f2\b \cf8 self
  7250. \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 y\cf4 != \cf5 JX_SCREEN_HEIGHT\cf4 -
  7251. \f2\b \cf8 self
  7252. \f0\b0 \cf4 .\cf15 heightFooter\cf4 ) \{\
  7253. [\cf10 CATransaction\cf4 \cf14 begin\cf4 ];\
  7254. [\cf10 UIView\cf4 \cf14 animateWithDuration\cf4 :\cf7 0.1f\cf4 \cf14 animations\cf4 :^\{\
  7255. \cf2 // self.tableFooter.frame = CGRectMake(0, self.view.frame.size.height+deltaY-self.heightFooter, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
  7256. [\cf15 _table\cf4 \cf14 setFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 0\cf4 +\cf15 _noticeHeight\cf4 , \cf15 _table\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 ,
  7257. \f2\b \cf8 self
  7258. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 +
  7259. \f2\b \cf8 self
  7260. \f0\b0 \cf4 .\cf15 deltaHeight\cf4 -
  7261. \f2\b \cf8 self
  7262. \f0\b0 \cf4 .\cf15 heightFooter\cf4 -\cf15 _noticeHeight\cf4 )];\
  7263. \cf2 // [_table gotoLastRow:NO];\cf4 \
  7264. \} \cf14 completion\cf4 :^(
  7265. \f2\b \cf8 BOOL
  7266. \f0\b0 \cf4 finished) \{\
  7267. \}];\
  7268. [\cf10 CATransaction\cf4 \cf14 commit\cf4 ];\
  7269. \}\
  7270. \}\
  7271. \}\
  7272. \}\
  7273. \
  7274. \cf2 //
  7275. \f1 \'bc\'ec\'b2\'e9\'ca\'c7\'b7\'f1\'d3\'d0\'bf\'da\'c1\'ee\'ba\'ec\'b0\'fc
  7276. \f0 \cf4 \
  7277. \f2\b \cf8 for
  7278. \f0\b0 \cf4 (\cf9 JXMessageObject\cf4 * msg
  7279. \f2\b \cf8 in
  7280. \f0\b0 \cf4 \cf15 _orderRedPacketArray\cf4 ) \{\
  7281. \f2\b \cf8 if
  7282. \f0\b0 \cf4 ([msg.\cf15 content\cf4 \cf14 caseInsensitiveCompare\cf4 :\cf15 _messageText\cf4 .\cf14 text\cf4 ] == \cf14 NSOrderedSame\cf4 &&[msg.\cf15 fileSize\cf4 \cf14 intValue\cf4 ] != \cf7 2\cf4 ) \{\
  7283. \f2\b \cf8 if
  7284. \f0\b0 \cf4 (
  7285. \f2\b \cf8 self
  7286. \f0\b0 \cf4 .\cf15 roomJid\cf4 .\cf14 length\cf4 > \cf7 0\cf4 || ![msg.\cf15 fromUserId\cf4 \cf14 isEqualToString\cf4 :\cf5 MY_USER_ID\cf4 ]) \{\
  7287. [\cf5 g_server\cf4 \cf15 getRedPacket\cf4 :msg.\cf15 objectId\cf4 \cf15 toView\cf4 :
  7288. \f2\b \cf8 self
  7289. \f0\b0 \cf4 ];\
  7290. \f2\b \cf8 break
  7291. \f0\b0 \cf4 ;\
  7292. \}\
  7293. \}\
  7294. \}\
  7295. [\cf15 _atMemberArray\cf4 \cf14 removeAllObjects\cf4 ];\
  7296. [\cf15 _messageText\cf4 .\cf14 textStorage\cf4 \cf14 removeAttribute\cf4 :\cf14 NSBackgroundColorAttributeName\cf4 \cf14 range\cf4 :\cf14 NSMakeRange\cf4 (\cf7 0\cf4 ,\cf15 _messageText\cf4 .\cf14 text\cf4 .\cf14 length\cf4 )];\
  7297. \cf2 // [_messageText.textStorage removeAttribute:NSFontAttributeName range:NSMakeRange(0,_messageText.text.length)];\cf4 \
  7298. [_messageText setText:
  7299. \f2\b \cf8 nil
  7300. \f0\b0 \cf4 ];\
  7301. [_messageText setAttributedText:
  7302. \f2\b \cf8 nil
  7303. \f0\b0 \cf4 ];\
  7304. \
  7305. chatPerson.lastInput = _messageText.text;\
  7306. [chatPerson updateLastInput];\
  7307. \
  7308. \cf2 //
  7309. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2\'ba\'f3\'d6\'d8\'d6\'c3\'b5\'d7\'b2\'bf\'bf\'d8\'bc\'fe
  7310. \f0 \cf4 \
  7311. [
  7312. \f2\b \cf8 self
  7313. \f0\b0 \cf4 onBackForRecordBtnLeft];\
  7314. \}\
  7315. \
  7316. \cf2 //
  7317. \f1 \'cd\'bc\'c6\'ac
  7318. \f0 piker
  7319. \f1 \'d1\'a1\'d4\'f1\'cd\'ea\'b3\'c9\'ba\'f3\'b5\'f7\'d3\'c3
  7320. \f0 \cf4 \
  7321. -(
  7322. \f2\b \cf8 void
  7323. \f0\b0 \cf4 )\cf11 sendImage\cf4 :(NSString *)file \cf11 withWidth\cf4 :(
  7324. \f2\b \cf8 int
  7325. \f0\b0 \cf4 ) width \cf11 andHeight\cf4 :(
  7326. \f2\b \cf8 int
  7327. \f0\b0 \cf4 ) height \cf11 userId\cf4 :(NSString *)userId\
  7328. \{\
  7329. \
  7330. \cf2 // NSString *userId = self.userIds[self.groupMessagesIndex];\cf4 \
  7331. \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
  7332. \
  7333. \f2\b \cf8 if
  7334. \f0\b0 \cf4 (
  7335. \f2\b \cf8 self
  7336. \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
  7337. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  7338. \
  7339. \f2\b \cf8 for
  7340. \f0\b0 \cf4 (NSString *userId
  7341. \f2\b \cf8 in
  7342. \f0\b0 \cf4 _userIds) \{\
  7343. \
  7344. \f2\b \cf8 if
  7345. \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
  7346. msg.timeSend = [NSDate date];\
  7347. msg.fromUserId = MY_USER_ID;\
  7348. \f2\b \cf8 if
  7349. \f0\b0 \cf4 ([userId length]>\cf7 10\cf4 )\{\
  7350. msg.toUserId = userId;\
  7351. msg.isGroup =
  7352. \f2\b \cf8 YES
  7353. \f0\b0 \cf4 ;\
  7354. msg.fromUserName = _userNickName;\
  7355. \f2\b \cf8 self
  7356. \f0\b0 \cf4 .roomJid = userId;\
  7357. \}\
  7358. \f2\b \cf8 else
  7359. \f0\b0 \cf4 \{\
  7360. msg.toUserId = userId;\
  7361. \f2\b \cf8 self
  7362. \f0\b0 \cf4 .roomJid =
  7363. \f2\b \cf8 nil
  7364. \f0\b0 \cf4 ;\
  7365. msg.isGroup =
  7366. \f2\b \cf8 NO
  7367. \f0\b0 \cf4 ;\
  7368. \}\
  7369. msg.fileName = file;\
  7370. msg.content = [[file lastPathComponent] stringByDeletingPathExtension];\
  7371. msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\
  7372. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  7373. msg.isRead = [NSNumber numberWithBool:
  7374. \f2\b \cf8 NO
  7375. \f0\b0 \cf4 ];\
  7376. msg.isUpload = [NSNumber numberWithBool:
  7377. \f2\b \cf8 NO
  7378. \f0\b0 \cf4 ];\
  7379. \cf2 //
  7380. \f1 \'d0\'c2\'cc\'ed\'bc\'d3\'b5\'c4\'cd\'bc\'c6\'ac\'bf\'ed\'b8\'df
  7381. \f0 \cf4 \
  7382. msg.location_x = [NSNumber numberWithInt:width];\
  7383. msg.location_y = [NSNumber numberWithInt:height];\
  7384. \
  7385. msg.isReadDel = [NSNumber numberWithInt:
  7386. \f2\b \cf8 self
  7387. \f0\b0 \cf4 .isReadDelete];\
  7388. \
  7389. [msg insert:userId];\
  7390. \
  7391. [
  7392. \f2\b \cf8 self
  7393. \f0\b0 \cf4 showOneMsg:msg];\
  7394. \
  7395. \
  7396. \
  7397. \}\
  7398. \
  7399. \}\
  7400. [g_server uploadFile:file validTime:
  7401. \f2\b \cf8 self
  7402. \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:msg.messageId toView:
  7403. \f2\b \cf8 self
  7404. \f0\b0 \cf4 ];\
  7405. \
  7406. \
  7407. \cf2 //
  7408. \f1 \'d0\'b4\'c8\'eb\'ca\'fd\'be\'dd\'bf\'e2
  7409. \f0 \cf4 \
  7410. NSArray *array =
  7411. \f2\b \cf8 self
  7412. \f0\b0 \cf4 .userIds;\
  7413. NSString *userIdsString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
  7414. array =
  7415. \f2\b \cf8 self
  7416. \f0\b0 \cf4 .userNames;\
  7417. NSString *userNamesString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
  7418. array =
  7419. \f2\b \cf8 self
  7420. \f0\b0 \cf4 .userNamesWithGroup;\
  7421. NSString *userNamesWithGroupString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
  7422. NSString *sendTime = [NSString stringWithFormat:\cf6 @"%@"\cf4 , msg.dictionary[\cf6 @"timeSend"\cf4 ]];\
  7423. \
  7424. array =
  7425. \f2\b \cf8 self
  7426. \f0\b0 \cf4 .userNmaesWithFriend;\
  7427. NSString *userNmaesWithFriendString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
  7428. \
  7429. JXLabelObject *obj = JXLabelObject.sharedInstance;\
  7430. obj.userId = msg.fromUserId;\
  7431. obj.userIds = userIdsString;\
  7432. obj.text1 = _names;\
  7433. obj.text2 = _names2;\
  7434. obj.userNames = userNamesString;\
  7435. obj.userNamesWithGroup = userNamesWithGroupString;\
  7436. obj.message = \cf6 @"[
  7437. \f1 \'cd\'bc\'c6\'ac
  7438. \f0 ]"\cf4 ;\
  7439. obj.sendTime = sendTime;\
  7440. obj.userNmaesWithFriend = userNmaesWithFriendString;\
  7441. \f2\b \cf8 BOOL
  7442. \f0\b0 \cf4 succeed = [obj insertRecord];\
  7443. \f2\b \cf8 if
  7444. \f0\b0 \cf4 (succeed) \{\
  7445. [g_notify postNotificationName:kGroupHelperRefreshNotif object:
  7446. \f2\b \cf8 nil
  7447. \f0\b0 \cf4 ];\
  7448. [g_navigation popToViewController:[CYGroupSendHelperViewController
  7449. \f2\b \cf8 class
  7450. \f0\b0 \cf4 ] animated:
  7451. \f2\b \cf8 YES
  7452. \f0\b0 \cf4 ];\
  7453. \}\
  7454. \
  7455. \}
  7456. \f2\b \cf8 else
  7457. \f0\b0 \cf4 \{\
  7458. \f2\b \cf8 if
  7459. \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
  7460. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  7461. msg.timeSend = [NSDate date];\
  7462. msg.fromUserId = MY_USER_ID;\
  7463. \f2\b \cf8 if
  7464. \f0\b0 \cf4 ([
  7465. \f2\b \cf8 self
  7466. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  7467. msg.toUserId =
  7468. \f2\b \cf8 self
  7469. \f0\b0 \cf4 .roomJid;\
  7470. msg.isGroup =
  7471. \f2\b \cf8 YES
  7472. \f0\b0 \cf4 ;\
  7473. msg.fromUserName = _userNickName;\
  7474. \}\
  7475. \f2\b \cf8 else
  7476. \f0\b0 \cf4 \{\
  7477. \f2\b \cf8 if
  7478. \f0\b0 \cf4 (
  7479. \f2\b \cf8 self
  7480. \f0\b0 \cf4 .isGroupMessages) \{\
  7481. msg.toUserId = userId;\
  7482. \}
  7483. \f2\b \cf8 else
  7484. \f0\b0 \cf4 \{\
  7485. msg.toUserId = chatPerson.userId;\
  7486. \}\
  7487. msg.isGroup =
  7488. \f2\b \cf8 NO
  7489. \f0\b0 \cf4 ;\
  7490. \}\
  7491. msg.fileName = file;\
  7492. msg.content = [[file lastPathComponent] stringByDeletingPathExtension];\
  7493. msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\
  7494. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  7495. msg.isRead = [NSNumber numberWithBool:
  7496. \f2\b \cf8 NO
  7497. \f0\b0 \cf4 ];\
  7498. msg.isUpload = [NSNumber numberWithBool:
  7499. \f2\b \cf8 NO
  7500. \f0\b0 \cf4 ];\
  7501. \cf2 //
  7502. \f1 \'d0\'c2\'cc\'ed\'bc\'d3\'b5\'c4\'cd\'bc\'c6\'ac\'bf\'ed\'b8\'df
  7503. \f0 \cf4 \
  7504. msg.location_x = [NSNumber numberWithInt:width];\
  7505. msg.location_y = [NSNumber numberWithInt:height];\
  7506. \
  7507. msg.isReadDel = [NSNumber numberWithInt:
  7508. \f2\b \cf8 self
  7509. \f0\b0 \cf4 .isReadDelete];\
  7510. \
  7511. [msg insert:
  7512. \f2\b \cf8 self
  7513. \f0\b0 \cf4 .roomJid];\
  7514. \
  7515. [
  7516. \f2\b \cf8 self
  7517. \f0\b0 \cf4 showOneMsg:msg];\
  7518. \cf2 // if (self.isGroupMessages) \{\cf4 \
  7519. \cf2 // self.groupMessagesIndex ++;\cf4 \
  7520. \cf2 // if (self.groupMessagesIndex < self.userIds.count) \{\cf4 \
  7521. \cf2 // [self sendImage:file withWidth:width andHeight:height];\cf4 \
  7522. \cf2 // \}else if (self.userIds)\{\cf4 \
  7523. \cf2 // self.groupMessagesIndex = 0;\cf4 \
  7524. \cf2 //\cf4 \
  7525. \cf2 // return;\cf4 \
  7526. \cf2 // \}\cf4 \
  7527. \cf2 // return;\cf4 \
  7528. \cf2 // \}\cf4 \
  7529. \cf2 // [msg release];\cf4 \
  7530. [g_server uploadFile:file validTime:
  7531. \f2\b \cf8 self
  7532. \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:msg.messageId toView:
  7533. \f2\b \cf8 self
  7534. \f0\b0 \cf4 ];\
  7535. \}\
  7536. \}\
  7537. \}\
  7538. \cf2 //
  7539. \f1 \'b7\'a2\'cb\'cd\'ca\'d3\'c6\'b5\'a3\'ac\'d2\'d4\'ba\'f3\'d2\'aa\'b8\'c4\'ca\'d3\'c6\'b5\'b3\'a4\'bf\'ed
  7540. \f0 \cf4 \
  7541. -(
  7542. \f2\b \cf8 void
  7543. \f0\b0 \cf4 )\cf11 sendMedia\cf4 :(JXMediaObject*)p \cf11 userId\cf4 :(NSString *)userId\
  7544. \{\
  7545. NSString* file = p.fileName;\
  7546. \f2\b \cf8 if
  7547. \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
  7548. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  7549. msg.timeSend = [NSDate date];\
  7550. msg.fromUserId = MY_USER_ID;\
  7551. \f2\b \cf8 if
  7552. \f0\b0 \cf4 ([
  7553. \f2\b \cf8 self
  7554. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  7555. msg.toUserId =
  7556. \f2\b \cf8 self
  7557. \f0\b0 \cf4 .roomJid;\
  7558. msg.isGroup =
  7559. \f2\b \cf8 YES
  7560. \f0\b0 \cf4 ;\
  7561. msg.fromUserName = _userNickName;\
  7562. \}\
  7563. \f2\b \cf8 else
  7564. \f0\b0 \cf4 \{\
  7565. \f2\b \cf8 if
  7566. \f0\b0 \cf4 (
  7567. \f2\b \cf8 self
  7568. \f0\b0 \cf4 .isGroupMessages) \{\
  7569. msg.toUserId = userId;\
  7570. \}
  7571. \f2\b \cf8 else
  7572. \f0\b0 \cf4 \{\
  7573. msg.toUserId = chatPerson.userId;\
  7574. \}\
  7575. msg.isGroup =
  7576. \f2\b \cf8 NO
  7577. \f0\b0 \cf4 ;\
  7578. \}\
  7579. msg.fileName = file;\
  7580. msg.content = [[file lastPathComponent] stringByDeletingPathExtension];\
  7581. \f2\b \cf8 if
  7582. \f0\b0 \cf4 (p.isVideo)\
  7583. msg.type = [NSNumber numberWithInt:kWCMessageTypeVideo];\
  7584. \f2\b \cf8 else
  7585. \f0\b0 \cf4 \
  7586. msg.type = [NSNumber numberWithInt:kWCMessageTypeAudio];\
  7587. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  7588. msg.isRead = [NSNumber numberWithBool:
  7589. \f2\b \cf8 NO
  7590. \f0\b0 \cf4 ];\
  7591. msg.isUpload = [NSNumber numberWithBool:
  7592. \f2\b \cf8 NO
  7593. \f0\b0 \cf4 ];\
  7594. msg.location_x = [NSNumber numberWithInt:\cf7 100\cf4 ];\
  7595. msg.location_y = [NSNumber numberWithInt:\cf7 100\cf4 ];\
  7596. \cf2 // NSLog(@"hh%hhd",_isReadDelete);\cf4 \
  7597. msg.isReadDel = [NSNumber numberWithInt:_isReadDelete];\
  7598. \
  7599. [msg insert:
  7600. \f2\b \cf8 self
  7601. \f0\b0 \cf4 .roomJid];\
  7602. [
  7603. \f2\b \cf8 self
  7604. \f0\b0 \cf4 showOneMsg:msg];\
  7605. [g_server uploadFile:p.fileName validTime:
  7606. \f2\b \cf8 self
  7607. \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:msg.messageId toView:
  7608. \f2\b \cf8 self
  7609. \f0\b0 \cf4 ];\
  7610. \cf2 // [msg release];\cf4 \
  7611. \}\
  7612. \}\
  7613. \
  7614. - (
  7615. \f2\b \cf8 void
  7616. \f0\b0 \cf4 )\cf11 shareMore\cf4 :(UIButton*)sender \{\
  7617. \cf2 // [messageText setInputView:messageText.inputView?nil: _moreView];\cf4 \
  7618. \f2\b \cf8 if
  7619. \f0\b0 \cf4 ([
  7620. \f2\b \cf8 self
  7621. \f0\b0 \cf4 showDisableSay])\
  7622. \f2\b \cf8 return
  7623. \f0\b0 \cf4 ;\
  7624. \f2\b \cf8 if
  7625. \f0\b0 \cf4 (!_moreView) \{\
  7626. \f2\b \cf8 return
  7627. \f0\b0 \cf4 ;\
  7628. \}\
  7629. \cf2 // sender.selected = !sender.selected;\cf4 \
  7630. \f2\b \cf8 if
  7631. \f0\b0 \cf4 (_messageText.inputView != _moreView)\{\
  7632. _messageText.inputView = _moreView;\
  7633. [_messageText reloadInputViews];\
  7634. [_messageText becomeFirstResponder];\
  7635. _textViewBtn.hidden =
  7636. \f2\b \cf8 NO
  7637. \f0\b0 \cf4 ;\
  7638. \
  7639. \f2\b \cf8 if
  7640. \f0\b0 \cf4 (
  7641. \f2\b \cf8 self
  7642. \f0\b0 \cf4 .screenShotView.hidden) \{\
  7643. ALAssetsLibrary *al = [[ALAssetsLibrary alloc] init];\
  7644. \
  7645. [al enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group,
  7646. \f2\b \cf8 BOOL
  7647. \f0\b0 \cf4 *stop) \{\
  7648. \f2\b \cf8 if
  7649. \f0\b0 \cf4 (group) \{\
  7650. [group setAssetsFilter:[ALAssetsFilter allPhotos]];\
  7651. [group enumerateAssetsWithOptions:NSEnumerationReverse\cf2 /*
  7652. \f1 \'b1\'e9\'c0\'fa\'b7\'bd\'ca\'bd
  7653. \f0 */\cf4 usingBlock:^(ALAsset *result, NSUInteger index,
  7654. \f2\b \cf8 BOOL
  7655. \f0\b0 \cf4 *stop) \{\
  7656. \f2\b \cf8 if
  7657. \f0\b0 \cf4 (result) \{\
  7658. \f2\b \cf8 int
  7659. \f0\b0 \cf4 photoIndex = [[g_default objectForKey:LastPhotoIndex] intValue];\
  7660. \f2\b \cf8 if
  7661. \f0\b0 \cf4 (photoIndex == index) \{\
  7662. *stop =
  7663. \f2\b \cf8 YES
  7664. \f0\b0 \cf4 ;\
  7665. \f2\b \cf8 return
  7666. \f0\b0 \cf4 ;\
  7667. \}\
  7668. [g_default setObject:[NSNumber numberWithInteger:index] forKey:LastPhotoIndex];\
  7669. NSString *type = [result valueForProperty:ALAssetPropertyType];\
  7670. \f2\b \cf8 if
  7671. \f0\b0 \cf4 ([type isEqual:ALAssetTypePhoto])\{\
  7672. UIImage *needImage = [UIImage imageWithCGImage:result.defaultRepresentation.fullScreenImage];\
  7673. \f2\b \cf8 if
  7674. \f0\b0 \cf4 (needImage) \{\
  7675. \f2\b \cf8 self
  7676. \f0\b0 \cf4 .screenImage = needImage;\
  7677. \f2\b \cf8 self
  7678. \f0\b0 \cf4 .screenShotImageView.image = needImage;\
  7679. \f2\b \cf8 self
  7680. \f0\b0 \cf4 .screenShotView.hidden =
  7681. \f2\b \cf8 NO
  7682. \f0\b0 \cf4 ;\
  7683. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 5\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
  7684. \f2\b \cf8 self
  7685. \f0\b0 \cf4 .screenShotView.hidden =
  7686. \f2\b \cf8 YES
  7687. \f0\b0 \cf4 ;\
  7688. \
  7689. \});\
  7690. \}
  7691. \f2\b \cf8 else
  7692. \f0\b0 \cf4 \{\
  7693. [
  7694. \f2\b \cf8 self
  7695. \f0\b0 \cf4 hideKeyboard:
  7696. \f2\b \cf8 YES
  7697. \f0\b0 \cf4 ];\
  7698. \}\
  7699. \}\
  7700. *stop =
  7701. \f2\b \cf8 YES
  7702. \f0\b0 \cf4 ;\
  7703. \}\
  7704. \}];\
  7705. *stop =
  7706. \f2\b \cf8 YES
  7707. \f0\b0 \cf4 ;\
  7708. \
  7709. \}\
  7710. \} failureBlock:^(NSError *error) \{\
  7711. \f2\b \cf8 if
  7712. \f0\b0 \cf4 (error) \{\
  7713. \
  7714. \}\
  7715. \}];\
  7716. \}\
  7717. \
  7718. \
  7719. \
  7720. \
  7721. \cf2 // if (self.screenShotView.hidden) \{\cf4 \
  7722. \cf2 // UIImage *image = [UIImage imageWithContentsOfFile:ScreenShotImage];\cf4 \
  7723. \cf2 // if (image) \{\cf4 \
  7724. \cf2 // self.screenShotImageView.image = image;\cf4 \
  7725. \cf2 // self.screenShotView.hidden = NO;\cf4 \
  7726. \cf2 // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\cf4 \
  7727. \cf2 // self.screenShotView.hidden = YES;\cf4 \
  7728. \cf2 // NSFileManager* fileManager=[NSFileManager defaultManager];\cf4 \
  7729. \cf2 // BOOL blDele= [fileManager removeItemAtPath:ScreenShotImage error:nil];\cf4 \
  7730. \cf2 // if (blDele) \{\cf4 \
  7731. \cf2 // NSLog(@"dele success");\cf4 \
  7732. \cf2 // \}else \{\cf4 \
  7733. \cf2 // NSLog(@"dele fail");\cf4 \
  7734. \cf2 // \}\cf4 \
  7735. \cf2 // \});\cf4 \
  7736. \cf2 // \}\cf4 \
  7737. \cf2 // \}\cf4 \
  7738. \}\
  7739. \f2\b \cf8 else
  7740. \f0\b0 \cf4 \{\
  7741. [
  7742. \f2\b \cf8 self
  7743. \f0\b0 \cf4 hideKeyboard:
  7744. \f2\b \cf8 YES
  7745. \f0\b0 \cf4 ];\
  7746. \}\
  7747. \}\
  7748. \cf2 //
  7749. \f1 \'b1\'e9\'c0\'fa\'cf\'fb\'cf\'a2\'a3\'ac\'cc\'ed\'bc\'d3\'ca\'b1\'bc\'e4
  7750. \f0 \cf4 \
  7751. - (
  7752. \f2\b \cf8 void
  7753. \f0\b0 \cf4 )\cf11 setIsShowTime\cf4 \{\
  7754. \f2\b \cf8 if
  7755. \f0\b0 \cf4 ([_array count]<=\cf7 0\cf4 )\
  7756. \f2\b \cf8 return
  7757. \f0\b0 \cf4 ;\
  7758. JXMessageObject *firstMsg=[_array objectAtIndex:\cf7 0\cf4 ];\
  7759. \f2\b \cf8 if
  7760. \f0\b0 \cf4 (!firstMsg.isShowTime) \{\
  7761. \
  7762. firstMsg.isShowTime =
  7763. \f2\b \cf8 YES
  7764. \f0\b0 \cf4 ;\
  7765. [firstMsg updateIsShowTime];\
  7766. firstMsg.chatMsgHeight = [NSString stringWithFormat:\cf6 @"0"\cf4 ];\
  7767. [firstMsg updateChatMsgHeight];\
  7768. \}\
  7769. \
  7770. \
  7771. \f2\b \cf8 for
  7772. \f0\b0 \cf4 (
  7773. \f2\b \cf8 int
  7774. \f0\b0 \cf4 i = \cf7 0\cf4 ; i < [_array count] -\cf7 1\cf4 ; i++) \{\
  7775. JXMessageObject *firstMsg=[_array objectAtIndex:i];\
  7776. JXMessageObject *secondMsg=[_array objectAtIndex:(i+\cf7 1\cf4 )];\
  7777. \
  7778. \f2\b \cf8 if
  7779. \f0\b0 \cf4 (([secondMsg.timeSend timeIntervalSince1970]-[firstMsg.timeSend timeIntervalSince1970]>\cf7 15\cf4 *\cf7 60\cf4 ))\{\
  7780. \f2\b \cf8 if
  7781. \f0\b0 \cf4 (!secondMsg.isShowTime) \{\
  7782. secondMsg.isShowTime =
  7783. \f2\b \cf8 YES
  7784. \f0\b0 \cf4 ;\
  7785. [secondMsg updateIsShowTime];\
  7786. secondMsg.chatMsgHeight = [NSString stringWithFormat:\cf6 @"0"\cf4 ];\
  7787. [secondMsg updateChatMsgHeight];\
  7788. \}\
  7789. \}
  7790. \f2\b \cf8 else
  7791. \f0\b0 \cf4 \{\
  7792. \f2\b \cf8 if
  7793. \f0\b0 \cf4 (secondMsg.isShowTime) \{\
  7794. secondMsg.isShowTime =
  7795. \f2\b \cf8 NO
  7796. \f0\b0 \cf4 ;\
  7797. [secondMsg updateIsShowTime];\
  7798. secondMsg.chatMsgHeight = [NSString stringWithFormat:\cf6 @"0"\cf4 ];\
  7799. [secondMsg updateChatMsgHeight];\
  7800. \}\
  7801. \}\
  7802. \}\
  7803. \}\
  7804. \
  7805. - (
  7806. \f2\b \cf8 void
  7807. \f0\b0 \cf4 )\cf11 tableView\cf4 :(UITableView *)tableView \cf11 touchesEnded\cf4 :(NSSet *)touches \cf11 withEvent\cf4 :(UIEvent *)event \{\
  7808. [
  7809. \f2\b \cf8 self
  7810. \f0\b0 \cf4 hideKeyboard:
  7811. \f2\b \cf8 NO
  7812. \f0\b0 \cf4 ];\
  7813. \}\
  7814. \
  7815. \cf2 //
  7816. \f1 \'d0\'c2\'c0\'b4\'b5\'c4\'cf\'fb\'cf\'a2\'ca\'c7\'b7\'f1\'d0\'e8\'d2\'aa\'d5\'b9\'ca\'be\'ca\'b1\'bc\'e4
  7817. \f0 \cf4 \
  7818. - (
  7819. \f2\b \cf8 void
  7820. \f0\b0 \cf4 )\cf11 setNewShowTime\cf4 :(JXMessageObject *)msg\{\
  7821. JXMessageObject *lastMsg=[_array lastObject];\
  7822. NSLog(\cf6 @"%f"\cf4 ,[msg.timeSend timeIntervalSince1970]-[lastMsg.timeSend timeIntervalSince1970]);\
  7823. \
  7824. \f2\b \cf8 if
  7825. \f0\b0 \cf4 (([msg.timeSend timeIntervalSince1970]-[lastMsg.timeSend timeIntervalSince1970]>\cf7 15\cf4 *\cf7 60\cf4 ))\{\
  7826. \f2\b \cf8 if
  7827. \f0\b0 \cf4 (!msg.isShowTime) \{\
  7828. msg.isShowTime =
  7829. \f2\b \cf8 YES
  7830. \f0\b0 \cf4 ;\
  7831. [msg updateIsShowTime];\
  7832. msg.chatMsgHeight = [NSString stringWithFormat:\cf6 @"0"\cf4 ];\
  7833. [msg updateChatMsgHeight];\
  7834. \}\
  7835. \}
  7836. \f2\b \cf8 else
  7837. \f0\b0 \cf4 \{\
  7838. \f2\b \cf8 if
  7839. \f0\b0 \cf4 (msg.isShowTime) \{\
  7840. msg.isShowTime =
  7841. \f2\b \cf8 NO
  7842. \f0\b0 \cf4 ;\
  7843. [msg updateIsShowTime];\
  7844. msg.chatMsgHeight = [NSString stringWithFormat:\cf6 @"0"\cf4 ];\
  7845. [msg updateChatMsgHeight];\
  7846. \}\
  7847. \}\
  7848. \}\
  7849. \
  7850. - (
  7851. \f2\b \cf8 void
  7852. \f0\b0 \cf4 )\cf11 viewDidLayoutSubviews\cf4 \{\
  7853. \
  7854. \f2\b \cf8 if
  7855. \f0\b0 \cf4 (!
  7856. \f2\b \cf8 self
  7857. \f0\b0 \cf4 .scrollBottom) \{\
  7858. \f2\b \cf8 if
  7859. \f0\b0 \cf4 (_table.contentSize.height > _table.bounds.size.height) \{\
  7860. NSLog(\cf6 @"tableScroll ----- 1"\cf4 );\
  7861. \f2\b \cf8 self
  7862. \f0\b0 \cf4 .isGotoLast =
  7863. \f2\b \cf8 NO
  7864. \f0\b0 \cf4 ;\
  7865. [_table setContentOffset:CGPointMake(\cf7 0\cf4 , _table.contentSize.height - _table.bounds.size.height) animated:
  7866. \f2\b \cf8 NO
  7867. \f0\b0 \cf4 ];\
  7868. \}\
  7869. \}\
  7870. \
  7871. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 1\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
  7872. \
  7873. \f2\b \cf8 self
  7874. \f0\b0 \cf4 .scrollBottom =
  7875. \f2\b \cf8 YES
  7876. \f0\b0 \cf4 ;\
  7877. \});\
  7878. \}\
  7879. \
  7880. \cf5 #pragma mark
  7881. \f2\b \cf16 ---------tableView
  7882. \f4 \'d0\'ad\'d2\'e9
  7883. \f2 ----------------
  7884. \f0\b0 \cf4 \
  7885. -(NSInteger)\cf11 numberOfSectionsInTableView\cf4 :(UITableView *)tableView\
  7886. \{\
  7887. \f2\b \cf8 return
  7888. \f0\b0 \cf4 \cf7 1\cf4 ;\
  7889. \}\
  7890. -(NSInteger)\cf11 tableView\cf4 :(UITableView *)tableView \cf11 numberOfRowsInSection\cf4 :(NSInteger)section\
  7891. \{\
  7892. \f2\b \cf8 return
  7893. \f0\b0 \cf4 _array.count;\
  7894. \}\
  7895. \
  7896. \cf2 //-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath\{\cf4 \
  7897. \cf2 // JXMessageObject *msg=[_array objectAtIndex:indexPath.row];\cf4 \
  7898. \cf2 //\cf4 \
  7899. \cf12 ///
  7900. \f3 \cf2 / bool isContent = NO;
  7901. \f0 \cf4 \
  7902. \cf12 ///
  7903. \f3 \cf2 / //
  7904. \f1 \'c5\'d0\'b6\'cf\'cf\'fb\'cf\'a2\'b3\'d8\'c0\'ef\'c3\'e6\'ca\'c7\'b7\'f1\'ba\'ac\'d3\'d0\'b4\'cb\'cf\'fb\'cf\'a2
  7905. \f0 \cf4 \
  7906. \cf12 ///
  7907. \f3 \cf2 / for (JXMessageObject * obj in g_xmpp.poolSendRead) \{
  7908. \f0 \cf4 \
  7909. \cf12 ///
  7910. \f3 \cf2 / //
  7911. \f1 \'ba\'ac\'d3\'d0\'a3\'ac\'d6\'b1\'bd\'d3\'cc\'f8\'b9\'fd
  7912. \f0 \cf4 \
  7913. \cf12 ///
  7914. \f3 \cf2 / if ([obj.content isEqualToString:msg.messageId]) \{
  7915. \f0 \cf4 \
  7916. \cf12 ///
  7917. \f3 \cf2 / isContent = YES;
  7918. \f0 \cf4 \
  7919. \cf12 ///
  7920. \f3 \cf2 / break;
  7921. \f0 \cf4 \
  7922. \cf12 ///
  7923. \f3 \cf2 / \}
  7924. \f0 \cf4 \
  7925. \cf12 ///
  7926. \f3 \cf2 / \}
  7927. \f0 \cf4 \
  7928. \cf2 //\}\cf4 \
  7929. \
  7930. -(UITableViewCell *)\cf11 tableView\cf4 :(UITableView *)tableView \cf11 cellForRowAtIndexPath\cf4 :(NSIndexPath *)indexPath\
  7931. \{\
  7932. \f2\b \cf8 if
  7933. \f0\b0 \cf4 (indexPath.row >= _array.count) \{\
  7934. \f2\b \cf8 return
  7935. \f0\b0 \cf4 [[JXBaseChatCell alloc] init];\
  7936. \}\
  7937. \
  7938. JXMessageObject *msg=[_array objectAtIndex:indexPath.row];\
  7939. msg.showRead = [
  7940. \f2\b \cf8 self
  7941. \f0\b0 \cf4 .chatPerson.showRead boolValue];\
  7942. \
  7943. \cf2 // NSLog(@"indexPath.row:%ld,%ld",indexPath.section,indexPath.row);\cf4 \
  7944. \
  7945. \f2\b \cf8 if
  7946. \f0\b0 \cf4 (
  7947. \f2\b \cf8 self
  7948. \f0\b0 \cf4 .roomJid)\{\
  7949. msg.isGroup =
  7950. \f2\b \cf8 YES
  7951. \f0\b0 \cf4 ;\
  7952. \cf2 // msg.roomJid = self.roomJid;\cf4 \
  7953. \}\
  7954. \
  7955. \cf2 //
  7956. \f1 \'c8\'e7\'b9\'fb\'ca\'c7\'d0\'c2\'c0\'b4\'b5\'c4\'ce\'b4\'b6\'c1\'cf\'fb\'cf\'a2\'a3\'ac\'bb\'d8\'d6\'b4\'cd\'a8\'d6\'aa
  7957. \f0 \cf4 \
  7958. \f2\b \cf8 if
  7959. \f0\b0 \cf4 ([msg.type intValue] != kWCMessageTypeVoice && [msg.type intValue] != kWCMessageTypeVideo && [msg.type intValue] != kWCMessageTypeFile && [msg.type intValue] != kWCMessageTypeLocation && [msg.type intValue] != kWCMessageTypeCard && [msg.type intValue] != kWCMessageTypeLink && [msg.type intValue] != kWCMessageTypeMergeRelay && [msg.type intValue] != kWCMessageTypeShare && [msg.type intValue] != kWCMessageTypeIsRead) \{\
  7960. memberData *member = [[memberData alloc] init];\
  7961. member.roomId = roomId;\
  7962. memberData *roleM = [member getCardNameById:MY_USER_ID];\
  7963. \cf2 //
  7964. \f1 \'d2\'fe\'c9\'ed\'c8\'cb\'b2\'bb\'b7\'a2\'bb\'d8\'d6\'b4\'a3\'a8\'d2\'d1\'b6\'c1\'c1\'d0\'b1\'ed\'b2\'bb\'cf\'d4\'ca\'be\'a3\'a9
  7965. \f0 \cf4 \
  7966. \f2\b \cf8 if
  7967. \f0\b0 \cf4 (![msg.isReadDel boolValue] && [roleM.role intValue] !=\cf7 4\cf4 ) \{\
  7968. [msg sendAlreadyReadMsg];\
  7969. \}\
  7970. \}\
  7971. \
  7972. \
  7973. \cf2 //
  7974. \f1 \'b7\'b5\'bb\'d8\'b6\'d4\'d3\'a6\'b5\'c4
  7975. \f0 Cell\cf4 \
  7976. JXBaseChatCell * cell = [
  7977. \f2\b \cf8 self
  7978. \f0\b0 \cf4 getCell:msg indexPath:indexPath];\
  7979. cell.selectionStyle = UITableViewCellSelectionStyleNone;\
  7980. cell.isSelectMore =
  7981. \f2\b \cf8 self
  7982. \f0\b0 \cf4 .isSelectMore;\
  7983. cell.room = _room;\
  7984. cell.isOpenIntegral = _isOpenIntegral;\
  7985. cell.groupLevelNameArray = _groupLevelNameArray;\
  7986. \cf2 // memberData *data = [self.room getMember:g_myself.userId];\cf4 \
  7987. \cf2 // BOOL flag = [data.role intValue] == 1 || [data.role intValue] == 2;\cf4 \
  7988. \cf2 // if (!flag && ![self.chatPerson.allowSpeakCourse boolValue]) \{\cf4 \
  7989. \cf2 // cell.isShowRecordCourse = NO;\cf4 \
  7990. \cf2 // \}else \{\cf4 \
  7991. \cf2 // cell.isShowRecordCourse = YES;\cf4 \
  7992. \cf2 // \}\cf4 \
  7993. \
  7994. \f2\b \cf8 if
  7995. \f0\b0 \cf4 ([chatPerson.userId rangeOfString:MY_USER_ID].location == NSNotFound) \{\
  7996. cell.isShowRecordCourse =
  7997. \f2\b \cf8 YES
  7998. \f0\b0 \cf4 ;\
  7999. \}
  8000. \f2\b \cf8 else
  8001. \f0\b0 \cf4 \{\
  8002. cell.isShowRecordCourse =
  8003. \f2\b \cf8 NO
  8004. \f0\b0 \cf4 ;\
  8005. \}\
  8006. \
  8007. cell.msg = msg;\
  8008. cell.isCourse =
  8009. \f2\b \cf8 self
  8010. \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ;\
  8011. cell.indexNum = (
  8012. \f2\b \cf8 int
  8013. \f0\b0 \cf4 )indexPath.row;\
  8014. cell.delegate =
  8015. \f2\b \cf8 self
  8016. \f0\b0 \cf4 ;\
  8017. cell.chatCellDelegate =
  8018. \f2\b \cf8 self
  8019. \f0\b0 \cf4 ;\
  8020. cell.checkBox.selected =
  8021. \f2\b \cf8 NO
  8022. \f0\b0 \cf4 ;\
  8023. \f2\b \cf8 for
  8024. \f0\b0 \cf4 (JXMessageObject *selMsg
  8025. \f2\b \cf8 in
  8026. \f0\b0 \cf4
  8027. \f2\b \cf8 self
  8028. \f0\b0 \cf4 .selectMoreArr) \{\
  8029. \f2\b \cf8 if
  8030. \f0\b0 \cf4 ([selMsg.messageId isEqualToString:msg.messageId]) \{\
  8031. cell.checkBox.selected =
  8032. \f2\b \cf8 YES
  8033. \f0\b0 \cf4 ;\
  8034. \f2\b \cf8 break
  8035. \f0\b0 \cf4 ;\
  8036. \}\
  8037. \}\
  8038. cell.readDele =
  8039. \f2\b \cf8 @selector
  8040. \f0\b0 \cf4 (readDeleWithUser:);\
  8041. \f2\b \cf8 if
  8042. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeShake) \{\
  8043. \f2\b \cf8 if
  8044. \f0\b0 \cf4 (![msg.fileName isEqualToString:\cf6 @"1"\cf4 ]) \{\
  8045. \f2\b \cf8 self
  8046. \f0\b0 \cf4 .shakeMsg = msg;\
  8047. \}\
  8048. \}\
  8049. \f2\b \cf8 if
  8050. \f0\b0 \cf4 (
  8051. \f2\b \cf8 self
  8052. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
  8053. cell.isShowHead = [
  8054. \f2\b \cf8 self
  8055. \f0\b0 \cf4 .chatPerson.allowSendCard boolValue] || _isAdmin;\
  8056. \
  8057. \f2\b \cf8 BOOL
  8058. \f0\b0 \cf4 isWithdraw =
  8059. \f2\b \cf8 NO
  8060. \f0\b0 \cf4 ;\
  8061. memberData *myData = [
  8062. \f2\b \cf8 self
  8063. \f0\b0 \cf4 .room getMember:g_myself.userId];\
  8064. \f2\b \cf8 if
  8065. \f0\b0 \cf4 ([myData.role intValue] == \cf7 1\cf4 ) \{\
  8066. isWithdraw =
  8067. \f2\b \cf8 YES
  8068. \f0\b0 \cf4 ;\
  8069. \}
  8070. \f2\b \cf8 else
  8071. \f0\b0 \cf4
  8072. \f2\b \cf8 if
  8073. \f0\b0 \cf4 ([myData.role intValue] == \cf7 2\cf4 ) \{\
  8074. memberData *msgData = [
  8075. \f2\b \cf8 self
  8076. \f0\b0 \cf4 .room getMember:msg.fromUserId];\
  8077. \f2\b \cf8 if
  8078. \f0\b0 \cf4 ([msgData.role intValue] == \cf7 1\cf4 || [msgData.role intValue] == \cf7 2\cf4 ) \{\
  8079. isWithdraw =
  8080. \f2\b \cf8 NO
  8081. \f0\b0 \cf4 ;\
  8082. \}
  8083. \f2\b \cf8 else
  8084. \f0\b0 \cf4 \{\
  8085. isWithdraw =
  8086. \f2\b \cf8 YES
  8087. \f0\b0 \cf4 ;\
  8088. \}\
  8089. \}\
  8090. \
  8091. cell.isWithdraw = msg.isMySend || isWithdraw;\
  8092. \}
  8093. \f2\b \cf8 else
  8094. \f0\b0 \cf4 \{\
  8095. cell.isShowHead =
  8096. \f2\b \cf8 YES
  8097. \f0\b0 \cf4 ;\
  8098. cell.isWithdraw = msg.isMySend;\
  8099. \}\
  8100. \cf2 // [cell setHeaderImage];\cf4 \
  8101. \cf2 // [cell setCellData];\cf4 \
  8102. \cf2 // [cell setBackgroundImage];\cf4 \
  8103. \cf2 // [cell isShowSendTime];\cf4 \
  8104. \
  8105. \f2\b \cf8 if
  8106. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeSuperDelete) \{\
  8107. cell.isSelectMore =
  8108. \f2\b \cf8 NO
  8109. \f0\b0 \cf4 ;\
  8110. cell.checkBox.hidden =
  8111. \f2\b \cf8 YES
  8112. \f0\b0 \cf4 ;\
  8113. cell.readView.hidden =
  8114. \f2\b \cf8 YES
  8115. \f0\b0 \cf4 ;\
  8116. \}
  8117. \f2\b \cf8 else
  8118. \f0\b0 \cf4 \{\
  8119. cell.isSelectMore =
  8120. \f2\b \cf8 self
  8121. \f0\b0 \cf4 .isSelectMore;\
  8122. [cell setHeaderImage];\
  8123. [cell setCellData];\
  8124. [cell setBackgroundImage];\
  8125. [cell isShowSendTime];\
  8126. \}\
  8127. \
  8128. \
  8129. \cf2 //
  8130. \f1 \'b6\'e0\'d1\'a1\'d7\'b4\'cc\'ac\'cf\'c2\'c8\'a1\'cf\'fb
  8131. \f0 cell
  8132. \f1 \'c4\'da\'bf\'d8\'bc\'fe\'b5\'c4\'b5\'e3\'bb\'f7\'ca\'c2\'bc\'fe
  8133. \f0 \cf4 \
  8134. cell.bubbleBg.userInteractionEnabled = !
  8135. \f2\b \cf8 self
  8136. \f0\b0 \cf4 .isSelectMore;\
  8137. \
  8138. \cf2 //
  8139. \f1 \'d7\'aa\'c8\'a6\'b5\'c8\'b4\'fd
  8140. \f0 \cf4 \
  8141. \f2\b \cf8 if
  8142. \f0\b0 \cf4 ([msg.isSend intValue] == transfer_status_ing) \{\
  8143. \
  8144. \f2\b \cf8 BOOL
  8145. \f0\b0 \cf4 flag =
  8146. \f2\b \cf8 NO
  8147. \f0\b0 \cf4 ;\
  8148. \f2\b \cf8 for
  8149. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < g_xmpp.poolSend.allKeys.count; i ++) \{\
  8150. NSString *msgId = g_xmpp.poolSend.allKeys[i];\
  8151. \f2\b \cf8 if
  8152. \f0\b0 \cf4 ([msgId isEqualToString:msg.messageId]) \{\
  8153. flag =
  8154. \f2\b \cf8 YES
  8155. \f0\b0 \cf4 ;\
  8156. \f2\b \cf8 break
  8157. \f0\b0 \cf4 ;\
  8158. \}\
  8159. \}\
  8160. \
  8161. \f2\b \cf8 if
  8162. \f0\b0 \cf4 (flag || msg.isShowWait) \{\
  8163. [cell drawIsSend];\
  8164. \}
  8165. \f2\b \cf8 else
  8166. \f0\b0 \cf4 \{\
  8167. [msg updateIsSend:transfer_status_no];\
  8168. cell.sendFailed.hidden =
  8169. \f2\b \cf8 NO
  8170. \f0\b0 \cf4 ;\
  8171. \}\
  8172. \}\
  8173. \
  8174. \f2\b \cf8 if
  8175. \f0\b0 \cf4 (indexPath.row == _array.count - \cf7 1\cf4 ) \{\
  8176. \cf2 //
  8177. \f1 \'b4\'c1\'d2\'bb\'b4\'c1
  8178. \f0 \cf4 \
  8179. \cf2 // if (self.shakeMsg) \{\cf4 \
  8180. \cf2 // int value = 0;\cf4 \
  8181. \cf2 // if (self.shakeMsg.isMySend) \{\cf4 \
  8182. \cf2 // value = -50;\cf4 \
  8183. \cf2 // \}else \{\cf4 \
  8184. \cf2 // value = 50;\cf4 \
  8185. \cf2 // \}\cf4 \
  8186. \cf2 //\cf4 \
  8187. \cf2 // self.shakeMsg = nil;\cf4 \
  8188. \cf2 // CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];///
  8189. \f1 \'ba\'e1\'cf\'f2\'d2\'c6\'b6\'af
  8190. \f0 \cf4 \
  8191. \cf2 //\cf4 \
  8192. \cf2 // animation.toValue = [NSNumber numberWithInt:value];\cf4 \
  8193. \cf2 //\cf4 \
  8194. \cf2 // animation.duration = .5;\cf4 \
  8195. \cf2 //\cf4 \
  8196. \cf2 // animation.removedOnCompletion = YES;//yes
  8197. \f1 \'b5\'c4\'bb\'b0\'a3\'ac\'d3\'d6\'b7\'b5\'bb\'d8\'d4\'ad\'ce\'bb\'d6\'c3\'c1\'cb\'a1\'a3
  8198. \f0 \cf4 \
  8199. \cf2 //\cf4 \
  8200. \cf2 // animation.repeatCount = 2;\cf4 \
  8201. \cf2 //\cf4 \
  8202. \cf2 // animation.fillMode = kCAFillModeForwards;\cf4 \
  8203. \cf2 //\cf4 \
  8204. \cf2 // //
  8205. \f1 \'cc\'ed\'bc\'d3\'d5\'f1\'b6\'af
  8206. \f0 \cf4 \
  8207. \cf2 // // AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);\cf4 \
  8208. \cf2 // AudioServicesPlaySystemSound(1521);\cf4 \
  8209. \cf2 // [_messageText.inputView.superview.layer addAnimation:animation forKey:nil];\cf4 \
  8210. \cf2 // [g_window.layer addAnimation:animation forKey:nil];\cf4 \
  8211. \cf2 //\cf4 \
  8212. \cf2 // \}\cf4 \
  8213. \
  8214. \}\
  8215. msg =
  8216. \f2\b \cf8 nil
  8217. \f0\b0 \cf4 ;\
  8218. \
  8219. NSLog(\cf6 @"lastIndex === %ld"\cf4 , indexPath.row);\
  8220. \f2\b \cf8 if
  8221. \f0\b0 \cf4 (
  8222. \f2\b \cf8 self
  8223. \f0\b0 \cf4 .isRefresh && _array.count > \cf7 1\cf4 ) \{\
  8224. [
  8225. \f2\b \cf8 self
  8226. \f0\b0 \cf4 doAutoScroll:indexPath];\
  8227. \}\
  8228. \
  8229. \f2\b \cf8 return
  8230. \f0\b0 \cf4 cell;\
  8231. \}\
  8232. -(CGFloat)\cf11 tableView\cf4 :(UITableView *)tableView \cf11 heightForRowAtIndexPath\cf4 :(NSIndexPath *)indexPath\
  8233. \{\
  8234. \f2\b \cf8 if
  8235. \f0\b0 \cf4 (indexPath.row >= _array.count) \{\
  8236. \f2\b \cf8 return
  8237. \f0\b0 \cf4 \cf7 0\cf4 ;\
  8238. \}\
  8239. JXMessageObject *msg=[_array objectAtIndex:indexPath.row];\
  8240. \f2\b \cf8 if
  8241. \f0\b0 \cf4 (
  8242. \f2\b \cf8 self
  8243. \f0\b0 \cf4 .roomJid)\
  8244. msg.isGroup =
  8245. \f2\b \cf8 YES
  8246. \f0\b0 \cf4 ;\
  8247. \
  8248. \f2\b \cf8 switch
  8249. \f0\b0 \cf4 ([msg.type intValue]) \{\
  8250. \f2\b \cf8 case
  8251. \f0\b0 \cf4 kWCMessageTypeText:\
  8252. \f2\b \cf8 return
  8253. \f0\b0 \cf4 [JXMessageCell getChatCellHeight:msg];\
  8254. \f2\b \cf8 break
  8255. \f0\b0 \cf4 ;\
  8256. \f2\b \cf8 case
  8257. \f0\b0 \cf4 kWCMessageTypeImage:\
  8258. \f2\b \cf8 return
  8259. \f0\b0 \cf4 [JXImageCell getChatCellHeight:msg];\
  8260. \f2\b \cf8 break
  8261. \f0\b0 \cf4 ;\
  8262. \f2\b \cf8 case
  8263. \f0\b0 \cf4 kWCMessageTypeCustomFace:\
  8264. \f2\b \cf8 return
  8265. \f0\b0 \cf4 [JXFaceCustomCell getChatCellHeight:msg];\
  8266. \f2\b \cf8 break
  8267. \f0\b0 \cf4 ;\
  8268. \f2\b \cf8 case
  8269. \f0\b0 \cf4 kWCMessageTypeEmoji:\
  8270. \f2\b \cf8 return
  8271. \f0\b0 \cf4 [JXEmojiCell getChatCellHeight:msg];\
  8272. \f2\b \cf8 break
  8273. \f0\b0 \cf4 ;\
  8274. \f2\b \cf8 case
  8275. \f0\b0 \cf4 kWCMessageTypeVoice:\
  8276. \f2\b \cf8 return
  8277. \f0\b0 \cf4 [JXAudioCell getChatCellHeight:msg];\
  8278. \f2\b \cf8 break
  8279. \f0\b0 \cf4 ;\
  8280. \f2\b \cf8 case
  8281. \f0\b0 \cf4 kWCMessageTypeLocation:\
  8282. \f2\b \cf8 return
  8283. \f0\b0 \cf4 [JXLocationCell getChatCellHeight:msg];\
  8284. \f2\b \cf8 break
  8285. \f0\b0 \cf4 ;\
  8286. \f2\b \cf8 case
  8287. \f0\b0 \cf4 kWCMessageTypeGif:\
  8288. \f2\b \cf8 return
  8289. \f0\b0 \cf4 [JXGifCell getChatCellHeight:msg];\
  8290. \f2\b \cf8 break
  8291. \f0\b0 \cf4 ;\
  8292. \f2\b \cf8 case
  8293. \f0\b0 \cf4 kWCMessageTypeVideo:\
  8294. \f2\b \cf8 return
  8295. \f0\b0 \cf4 [JXVideoCell getChatCellHeight:msg];\
  8296. \f2\b \cf8 break
  8297. \f0\b0 \cf4 ;\
  8298. \f2\b \cf8 case
  8299. \f0\b0 \cf4 kWCMessageTypeAudio:\
  8300. \f2\b \cf8 return
  8301. \f0\b0 \cf4 [JXVideoCell getChatCellHeight:msg];\
  8302. \f2\b \cf8 break
  8303. \f0\b0 \cf4 ;\
  8304. \f2\b \cf8 case
  8305. \f0\b0 \cf4 kWCMessageTypeCard:\
  8306. \f2\b \cf8 return
  8307. \f0\b0 \cf4 [JXCardCell getChatCellHeight:msg];\
  8308. \f2\b \cf8 break
  8309. \f0\b0 \cf4 ;\
  8310. \f2\b \cf8 case
  8311. \f0\b0 \cf4 kWCMessageTypeFile:\
  8312. \f2\b \cf8 return
  8313. \f0\b0 \cf4 [JXFileCell getChatCellHeight:msg];\
  8314. \f2\b \cf8 break
  8315. \f0\b0 \cf4 ;\
  8316. \f2\b \cf8 case
  8317. \f0\b0 \cf4 kWCMessageTypeRemind:\
  8318. \f2\b \cf8 return
  8319. \f0\b0 \cf4 [JXRemindCell getChatCellHeight:msg];\
  8320. \f2\b \cf8 break
  8321. \f0\b0 \cf4 ;\
  8322. \f2\b \cf8 case
  8323. \f0\b0 \cf4 kWCMessageTypeSuperDelete:\
  8324. \f2\b \cf8 return
  8325. \f0\b0 \cf4 \cf7 0\cf4 ;\
  8326. \f2\b \cf8 break
  8327. \f0\b0 \cf4 ;\
  8328. \f2\b \cf8 case
  8329. \f0\b0 \cf4 kWCMessageTypeRedPacket:\
  8330. \f2\b \cf8 return
  8331. \f0\b0 \cf4 [JXRedPacketCell getChatCellHeight:msg];\
  8332. \f2\b \cf8 break
  8333. \f0\b0 \cf4 ;\
  8334. \f2\b \cf8 case
  8335. \f0\b0 \cf4 kWCMessageTypeTransfer:\
  8336. \f2\b \cf8 return
  8337. \f0\b0 \cf4 [JXTransferCell getChatCellHeight:msg];\
  8338. \f2\b \cf8 break
  8339. \f0\b0 \cf4 ;\
  8340. \f2\b \cf8 case
  8341. \f0\b0 \cf4 kWCMessageTypeSystemImage1:\
  8342. \f2\b \cf8 return
  8343. \f0\b0 \cf4 [JXSystemImage1Cell getChatCellHeight:msg];\
  8344. \f2\b \cf8 break
  8345. \f0\b0 \cf4 ;\
  8346. \f2\b \cf8 case
  8347. \f0\b0 \cf4 kWCMessageTypeSystemImage2:\
  8348. \f2\b \cf8 return
  8349. \f0\b0 \cf4 [JXSystemImage2Cell getChatCellHeight:msg];\
  8350. \f2\b \cf8 break
  8351. \f0\b0 \cf4 ;\
  8352. \f2\b \cf8 case
  8353. \f0\b0 \cf4 kWCMessageTypeAudioMeetingInvite:\
  8354. \f2\b \cf8 case
  8355. \f0\b0 \cf4 kWCMessageTypeVideoMeetingInvite:\
  8356. \f2\b \cf8 case
  8357. \f0\b0 \cf4 kWCMessageTypeAudioChatCancel:\
  8358. \f2\b \cf8 case
  8359. \f0\b0 \cf4 kWCMessageTypeAudioChatEnd:\
  8360. \f2\b \cf8 case
  8361. \f0\b0 \cf4 kWCMessageTypeVideoChatCancel:\
  8362. \f2\b \cf8 case
  8363. \f0\b0 \cf4 kWCMessageTypeVideoChatEnd:\
  8364. \f2\b \cf8 case
  8365. \f0\b0 \cf4 kWCMessageTypeAVBusy:\
  8366. \f2\b \cf8 return
  8367. \f0\b0 \cf4 [JXAVCallCell getChatCellHeight:msg];\
  8368. \f2\b \cf8 break
  8369. \f0\b0 \cf4 ;\
  8370. \f2\b \cf8 case
  8371. \f0\b0 \cf4 kWCMessageTypeLink:\
  8372. \f2\b \cf8 return
  8373. \f0\b0 \cf4 [JXLinkCell getChatCellHeight:msg];\
  8374. \f2\b \cf8 break
  8375. \f0\b0 \cf4 ;\
  8376. \f2\b \cf8 case
  8377. \f0\b0 \cf4 kWCMessageTypeShake:\
  8378. \f2\b \cf8 if
  8379. \f0\b0 \cf4 (msg.content.length>\cf7 0\cf4 ) \{\
  8380. \f2\b \cf8 return
  8381. \f0\b0 \cf4 [JXNewShakeCell getChatCellHeight:msg];\
  8382. \}
  8383. \f2\b \cf8 else
  8384. \f0\b0 \cf4 \{\
  8385. \f2\b \cf8 return
  8386. \f0\b0 \cf4 [JXShakeCell getChatCellHeight:msg];\
  8387. \}\
  8388. \f2\b \cf8 break
  8389. \f0\b0 \cf4 ;\
  8390. \f2\b \cf8 case
  8391. \f0\b0 \cf4 kWCMessageTypeMergeRelay:\
  8392. \f2\b \cf8 return
  8393. \f0\b0 \cf4 [JXMergeRelayCell getChatCellHeight:msg];\
  8394. \f2\b \cf8 break
  8395. \f0\b0 \cf4 ;\
  8396. \f2\b \cf8 case
  8397. \f0\b0 \cf4 kWCMessageTypeShare:\
  8398. \f2\b \cf8 return
  8399. \f0\b0 \cf4 [JXShareCell getChatCellHeight:msg];\
  8400. \f2\b \cf8 break
  8401. \f0\b0 \cf4 ;\
  8402. \f2\b \cf8 case
  8403. \f0\b0 \cf4 kWCMessageTypeReply:\
  8404. \f2\b \cf8 return
  8405. \f0\b0 \cf4 [JXReplyCell getChatCellHeight:msg];\
  8406. \f2\b \cf8 break
  8407. \f0\b0 \cf4 ;\
  8408. \f2\b \cf8 default
  8409. \f0\b0 \cf4 :\
  8410. \f2\b \cf8 return
  8411. \f0\b0 \cf4 [JXBaseChatCell getChatCellHeight:msg];\
  8412. \f2\b \cf8 break
  8413. \f0\b0 \cf4 ;\
  8414. \}\
  8415. \}\
  8416. \
  8417. - (
  8418. \f2\b \cf8 void
  8419. \f0\b0 \cf4 )\cf11 tableView\cf4 :(UITableView *)tableView \cf11 didSelectRowAtIndexPath\cf4 :(NSIndexPath *)indexPath\
  8420. \{\
  8421. \
  8422. [
  8423. \f2\b \cf8 self
  8424. \f0\b0 \cf4 hideKeyboard:
  8425. \f2\b \cf8 NO
  8426. \f0\b0 \cf4 ];\
  8427. \f2\b \cf8 if
  8428. \f0\b0 \cf4 (
  8429. \f2\b \cf8 self
  8430. \f0\b0 \cf4 .isSelectMore) \{\
  8431. \cf2 //
  8432. \f1 \'bb\'f1\'c8\'a1\'b5\'da\'bc\'b8\'b8\'f6
  8433. \f0 Cell
  8434. \f1 \'b1\'bb\'b5\'e3\'bb\'f7
  8435. \f0 \cf4 \
  8436. \
  8437. _selCell = (JXBaseChatCell*)[_table cellForRowAtIndexPath:indexPath];\
  8438. _selCell.checkBox.selected = !_selCell.checkBox.selected;\
  8439. NSLog(\cf6 @"indexNum = %d, isSelect = %d"\cf4 ,_selCell.indexNum, _selCell.checkBox.selected);\
  8440. [
  8441. \f2\b \cf8 self
  8442. \f0\b0 \cf4 chatCell:_selCell checkBoxSelectIndexNum:_selCell.indexNum isSelect:_selCell.checkBox.selected];\
  8443. \}
  8444. \f2\b \cf8 else
  8445. \f0\b0 \cf4 \{\
  8446. \
  8447. \cf2 // [super tableView:tableView didSelectRowAtIndexPath:indexPath];\cf4 \
  8448. \}\
  8449. \}\
  8450. \
  8451. \
  8452. - (
  8453. \f2\b \cf8 void
  8454. \f0\b0 \cf4 )\cf11 scrollViewDidScrollToTop\cf4 :(UIScrollView *)scrollView \{\
  8455. \
  8456. \}\
  8457. \
  8458. - (
  8459. \f2\b \cf8 void
  8460. \f0\b0 \cf4 )\cf11 scrollViewDidScroll\cf4 :(UIScrollView *)scrollView \{\
  8461. \f2\b \cf8 if
  8462. \f0\b0 \cf4 (scrollView.contentOffset.y <= \cf7 0\cf4 ) \{\
  8463. \
  8464. \f2\b \cf8 self
  8465. \f0\b0 \cf4 .jumpNewMsgBtn.hidden =
  8466. \f2\b \cf8 YES
  8467. \f0\b0 \cf4 ;\
  8468. \}\
  8469. \
  8470. \f2\b \cf8 if
  8471. \f0\b0 \cf4 (scrollView.contentOffset.y <
  8472. \f2\b \cf8 self
  8473. \f0\b0 \cf4 .lastY) \{\
  8474. \f2\b \cf8 self
  8475. \f0\b0 \cf4 .isRefresh =
  8476. \f2\b \cf8 YES
  8477. \f0\b0 \cf4 ;\
  8478. \}
  8479. \f2\b \cf8 else
  8480. \f0\b0 \cf4 \{\
  8481. \f2\b \cf8 self
  8482. \f0\b0 \cf4 .isRefresh =
  8483. \f2\b \cf8 NO
  8484. \f0\b0 \cf4 ;\
  8485. \}\
  8486. \
  8487. \f2\b \cf8 self
  8488. \f0\b0 \cf4 .lastY = scrollView.contentOffset.y;\
  8489. \}\
  8490. \
  8491. - (
  8492. \f2\b \cf8 void
  8493. \f0\b0 \cf4 )\cf11 scrollViewWillBeginDragging\cf4 :(UIScrollView *)scrollView \{\
  8494. \
  8495. [
  8496. \f2\b \cf8 self
  8497. \f0\b0 \cf4 hideKeyboard:
  8498. \f2\b \cf8 NO
  8499. \f0\b0 \cf4 ];\
  8500. \}\
  8501. \
  8502. \cf5 #pragma mark
  8503. \f2\b \cf16 -----------------
  8504. \f4 \'bb\'f1\'c8\'a1\'b6\'d4\'d3\'a6\'b5\'c4
  8505. \f2 Cell-----------------
  8506. \f0\b0 \cf4 \
  8507. - (JXBaseChatCell *)\cf11 getCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8508. JXBaseChatCell * cell =
  8509. \f2\b \cf8 nil
  8510. \f0\b0 \cf4 ;\
  8511. \f2\b \cf8 switch
  8512. \f0\b0 \cf4 ([msg.type intValue]) \{\
  8513. \f2\b \cf8 case
  8514. \f0\b0 \cf4 kWCMessageTypeText:\
  8515. cell = [
  8516. \f2\b \cf8 self
  8517. \f0\b0 \cf4 creatMessageCell:msg indexPath:indexPath];\
  8518. \f2\b \cf8 break
  8519. \f0\b0 \cf4 ;\
  8520. \f2\b \cf8 case
  8521. \f0\b0 \cf4 kWCMessageTypeImage:\
  8522. cell = [
  8523. \f2\b \cf8 self
  8524. \f0\b0 \cf4 creatImageCell:msg indexPath:indexPath];\
  8525. \f2\b \cf8 break
  8526. \f0\b0 \cf4 ;\
  8527. \f2\b \cf8 case
  8528. \f0\b0 \cf4 kWCMessageTypeCustomFace:\
  8529. cell = [
  8530. \f2\b \cf8 self
  8531. \f0\b0 \cf4 creatFaceCustomCell:msg indexPath:indexPath];\
  8532. \f2\b \cf8 break
  8533. \f0\b0 \cf4 ;\
  8534. \f2\b \cf8 case
  8535. \f0\b0 \cf4 kWCMessageTypeEmoji:\
  8536. cell = [
  8537. \f2\b \cf8 self
  8538. \f0\b0 \cf4 creatEmojiCell:msg indexPath:indexPath];\
  8539. \f2\b \cf8 break
  8540. \f0\b0 \cf4 ;\
  8541. \f2\b \cf8 case
  8542. \f0\b0 \cf4 kWCMessageTypeVoice:\
  8543. cell = [
  8544. \f2\b \cf8 self
  8545. \f0\b0 \cf4 creatAudioCell:msg indexPath:indexPath];\
  8546. \f2\b \cf8 break
  8547. \f0\b0 \cf4 ;\
  8548. \f2\b \cf8 case
  8549. \f0\b0 \cf4 kWCMessageTypeLocation:\
  8550. cell = [
  8551. \f2\b \cf8 self
  8552. \f0\b0 \cf4 creatLocationCell:msg indexPath:indexPath];\
  8553. \f2\b \cf8 break
  8554. \f0\b0 \cf4 ;\
  8555. \f2\b \cf8 case
  8556. \f0\b0 \cf4 kWCMessageTypeGif:\
  8557. cell = [
  8558. \f2\b \cf8 self
  8559. \f0\b0 \cf4 creatGifCell:msg indexPath:indexPath];\
  8560. \f2\b \cf8 break
  8561. \f0\b0 \cf4 ;\
  8562. \f2\b \cf8 case
  8563. \f0\b0 \cf4 kWCMessageTypeVideo:\
  8564. cell = [
  8565. \f2\b \cf8 self
  8566. \f0\b0 \cf4 creatVideoCell:msg indexPath:indexPath];\
  8567. \f2\b \cf8 break
  8568. \f0\b0 \cf4 ;\
  8569. \f2\b \cf8 case
  8570. \f0\b0 \cf4 kWCMessageTypeAudio:\
  8571. cell = [
  8572. \f2\b \cf8 self
  8573. \f0\b0 \cf4 creatVideoCell:msg indexPath:indexPath];\
  8574. \f2\b \cf8 break
  8575. \f0\b0 \cf4 ;\
  8576. \f2\b \cf8 case
  8577. \f0\b0 \cf4 kWCMessageTypeCard:\
  8578. cell = [
  8579. \f2\b \cf8 self
  8580. \f0\b0 \cf4 creatCardCell:msg indexPath:indexPath];\
  8581. \f2\b \cf8 break
  8582. \f0\b0 \cf4 ;\
  8583. \f2\b \cf8 case
  8584. \f0\b0 \cf4 kWCMessageTypeFile:\
  8585. cell = [
  8586. \f2\b \cf8 self
  8587. \f0\b0 \cf4 creatFileCell:msg indexPath:indexPath];\
  8588. \f2\b \cf8 break
  8589. \f0\b0 \cf4 ;\
  8590. \f2\b \cf8 case
  8591. \f0\b0 \cf4 kWCMessageTypeRemind:\
  8592. cell = [
  8593. \f2\b \cf8 self
  8594. \f0\b0 \cf4 creatRemindCell:msg indexPath:indexPath];\
  8595. \f2\b \cf8 break
  8596. \f0\b0 \cf4 ;\
  8597. \f2\b \cf8 case
  8598. \f0\b0 \cf4 kWCMessageTypeSuperDelete:\
  8599. cell = [[JXBaseChatCell alloc] init];\
  8600. \f2\b \cf8 break
  8601. \f0\b0 \cf4 ;\
  8602. \f2\b \cf8 case
  8603. \f0\b0 \cf4 kWCMessageTypeRedPacket:\
  8604. cell = [
  8605. \f2\b \cf8 self
  8606. \f0\b0 \cf4 creatRedPacketCell:msg indexPath:indexPath];\
  8607. \f2\b \cf8 break
  8608. \f0\b0 \cf4 ;\
  8609. \f2\b \cf8 case
  8610. \f0\b0 \cf4 kWCMessageTypeTransfer:\
  8611. cell = [
  8612. \f2\b \cf8 self
  8613. \f0\b0 \cf4 createTransferCell:msg indexPath:indexPath];\
  8614. \f2\b \cf8 break
  8615. \f0\b0 \cf4 ;\
  8616. \f2\b \cf8 case
  8617. \f0\b0 \cf4 kWCMessageTypeSystemImage1:\
  8618. cell = [
  8619. \f2\b \cf8 self
  8620. \f0\b0 \cf4 creatSystemImage1Cell:msg indexPath:indexPath];\
  8621. \f2\b \cf8 break
  8622. \f0\b0 \cf4 ;\
  8623. \f2\b \cf8 case
  8624. \f0\b0 \cf4 kWCMessageTypeSystemImage2:\
  8625. cell = [
  8626. \f2\b \cf8 self
  8627. \f0\b0 \cf4 creatSystemImage2Cell:msg indexPath:indexPath];\
  8628. \f2\b \cf8 break
  8629. \f0\b0 \cf4 ;\
  8630. \f2\b \cf8 case
  8631. \f0\b0 \cf4 kWCMessageTypeAudioMeetingInvite:\
  8632. \f2\b \cf8 case
  8633. \f0\b0 \cf4 kWCMessageTypeVideoMeetingInvite:\
  8634. \f2\b \cf8 case
  8635. \f0\b0 \cf4 kWCMessageTypeAudioChatCancel:\
  8636. \f2\b \cf8 case
  8637. \f0\b0 \cf4 kWCMessageTypeAudioChatEnd:\
  8638. \f2\b \cf8 case
  8639. \f0\b0 \cf4 kWCMessageTypeVideoChatCancel:\
  8640. \f2\b \cf8 case
  8641. \f0\b0 \cf4 kWCMessageTypeVideoChatEnd:\
  8642. \f2\b \cf8 case
  8643. \f0\b0 \cf4 kWCMessageTypeAVBusy:\
  8644. cell = [
  8645. \f2\b \cf8 self
  8646. \f0\b0 \cf4 creatAVCallCell:msg indexPath:indexPath];\
  8647. \f2\b \cf8 break
  8648. \f0\b0 \cf4 ;\
  8649. \f2\b \cf8 case
  8650. \f0\b0 \cf4 kWCMessageTypeLink:\
  8651. cell = [
  8652. \f2\b \cf8 self
  8653. \f0\b0 \cf4 creatLinkCell:msg indexPath:indexPath];\
  8654. \f2\b \cf8 break
  8655. \f0\b0 \cf4 ;\
  8656. \f2\b \cf8 case
  8657. \f0\b0 \cf4 kWCMessageTypeShake:\
  8658. \f2\b \cf8 if
  8659. \f0\b0 \cf4 (msg.content.length>\cf7 0\cf4 ) \{\
  8660. cell = [
  8661. \f2\b \cf8 self
  8662. \f0\b0 \cf4 creatNewShakeCell:msg indexPath:indexPath];\
  8663. \}
  8664. \f2\b \cf8 else
  8665. \f0\b0 \cf4 \{\
  8666. cell = [
  8667. \f2\b \cf8 self
  8668. \f0\b0 \cf4 creatShakeCell:msg indexPath:indexPath];\
  8669. \}\
  8670. \f2\b \cf8 break
  8671. \f0\b0 \cf4 ;\
  8672. \f2\b \cf8 case
  8673. \f0\b0 \cf4 kWCMessageTypeMergeRelay:\
  8674. cell = [
  8675. \f2\b \cf8 self
  8676. \f0\b0 \cf4 creatMergeRelayCell:msg indexPath:indexPath];\
  8677. \f2\b \cf8 break
  8678. \f0\b0 \cf4 ;\
  8679. \f2\b \cf8 case
  8680. \f0\b0 \cf4 kWCMessageTypeShare:\
  8681. cell = [
  8682. \f2\b \cf8 self
  8683. \f0\b0 \cf4 createShareCell:msg indexPath:indexPath];\
  8684. \f2\b \cf8 break
  8685. \f0\b0 \cf4 ;\
  8686. \f2\b \cf8 case
  8687. \f0\b0 \cf4 kWCMessageTypeReply:\
  8688. cell = [
  8689. \f2\b \cf8 self
  8690. \f0\b0 \cf4 createReplyCell:msg indexPath:indexPath];\
  8691. \f2\b \cf8 break
  8692. \f0\b0 \cf4 ;\
  8693. \f2\b \cf8 default
  8694. \f0\b0 \cf4 :\
  8695. cell = [[JXBaseChatCell alloc] init];\
  8696. \f2\b \cf8 break
  8697. \f0\b0 \cf4 ;\
  8698. \}\
  8699. \f2\b \cf8 return
  8700. \f0\b0 \cf4 cell;\
  8701. \}\
  8702. \
  8703. \cf5 #pragma mark
  8704. \f2\b \cf16 -----------------------
  8705. \f4 \'b4\'b4\'bd\'a8\'b6\'d4\'d3\'a6\'b5\'c4
  8706. \f2 Cell---------------------
  8707. \f0\b0 \cf4 \
  8708. \cf2 //
  8709. \f1 \'ce\'c4\'b1\'be
  8710. \f0 \cf4 \
  8711. - (JXBaseChatCell *)\cf11 creatMessageCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8712. NSString * identifier = \cf6 @"JXMessageCell"\cf4 ;\
  8713. \f2\b \cf8 if
  8714. \f0\b0 \cf4 ([msg.isReadDel boolValue]) \{\
  8715. identifier = [NSString stringWithFormat:\cf6 @"JXMessageCell_%ld"\cf4 ,indexPath.row];\
  8716. \}\
  8717. JXMessageCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8718. \f2\b \cf8 if
  8719. \f0\b0 \cf4 (!cell) \{\
  8720. cell = [[JXMessageCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8721. \
  8722. \}\
  8723. cell.block = ^(JXMessageObject *msg) \{\
  8724. \
  8725. _strURLGoback=\cf6 @""\cf4 ;\
  8726. \f2\b \cf8 if
  8727. \f0\b0 \cf4 ([msg.content containsString:\cf6 @"===jixinJXBigRellV"\cf4 ]) \{ \cf2 //
  8728. \f1 \'d7\'aa\'c5\'cc
  8729. \f0 \cf4 \
  8730. \
  8731. JXBigReelVc *vc = [JXBigReelVc
  8732. \f2\b \cf8 new
  8733. \f0\b0 \cf4 ];\
  8734. [g_navigation pushViewController:vc animated:
  8735. \f2\b \cf8 YES
  8736. \f0\b0 \cf4 ];\
  8737. \
  8738. \}
  8739. \f2\b \cf8 else
  8740. \f0\b0 \cf4
  8741. \f2\b \cf8 if
  8742. \f0\b0 \cf4 ([msg.content containsString:\cf6 @"===jixinJXLuckRescueFundVc"\cf4 ]) \{\
  8743. \
  8744. JXLuckRescueFundVc *vc = [JXLuckRescueFundVc
  8745. \f2\b \cf8 new
  8746. \f0\b0 \cf4 ];\
  8747. [g_navigation pushViewController:vc animated:
  8748. \f2\b \cf8 YES
  8749. \f0\b0 \cf4 ];\
  8750. \
  8751. \}
  8752. \f2\b \cf8 else
  8753. \f0\b0 \cf4
  8754. \f2\b \cf8 if
  8755. \f0\b0 \cf4 ([msg.content containsString:\cf6 @"===jixinJXGoldMangVc"\cf4 ]) \{\
  8756. \
  8757. JXGoldMangVc *vc = [JXGoldMangVc
  8758. \f2\b \cf8 new
  8759. \f0\b0 \cf4 ];\
  8760. [g_navigation pushViewController:vc animated:
  8761. \f2\b \cf8 YES
  8762. \f0\b0 \cf4 ];\
  8763. \
  8764. \}
  8765. \f2\b \cf8 else
  8766. \f0\b0 \cf4
  8767. \f2\b \cf8 if
  8768. \f0\b0 \cf4 ([msg.content containsString:\cf6 @"===jixinJXBigRellV"\cf4 ]) \{\
  8769. \
  8770. JXApplyViewController *vc = [JXApplyViewController
  8771. \f2\b \cf8 new
  8772. \f0\b0 \cf4 ];\
  8773. [g_navigation pushViewController:vc animated:
  8774. \f2\b \cf8 YES
  8775. \f0\b0 \cf4 ];\
  8776. \
  8777. \}\
  8778. \
  8779. \};\
  8780. \f2\b \cf8 return
  8781. \f0\b0 \cf4 cell;\
  8782. \}\
  8783. \cf2 //
  8784. \f1 \'cd\'bc\'c6\'ac
  8785. \f0 \cf4 \
  8786. - (JXBaseChatCell *)\cf11 creatImageCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8787. NSString * identifier = \cf6 @"JXImageCell"\cf4 ;\
  8788. JXImageCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8789. \f2\b \cf8 if
  8790. \f0\b0 \cf4 (!cell) \{\
  8791. cell = [[JXImageCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8792. \cf2 // cell.chatImage.delegate = self;\cf4 \
  8793. \cf2 // cell.chatImage.didTouch = @selector(onCellImage:);\cf4 \
  8794. \}\
  8795. \f2\b \cf8 return
  8796. \f0\b0 \cf4 cell;\
  8797. \}\
  8798. \
  8799. \cf2 //
  8800. \f1 \'d7\'d4\'b6\'a8\'d2\'e5\'b1\'ed\'c7\'e9
  8801. \f0 \cf4 \
  8802. - (JXBaseChatCell *)\cf11 creatFaceCustomCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8803. NSString * identifier = \cf6 @"JXFaceCustomCell"\cf4 ;\
  8804. JXFaceCustomCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8805. \f2\b \cf8 if
  8806. \f0\b0 \cf4 (!cell) \{\
  8807. cell = [[JXFaceCustomCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8808. \cf2 // cell.chatImage.delegate = self;\cf4 \
  8809. \cf2 // cell.chatImage.didTouch = @selector(onCellImage:);\cf4 \
  8810. \}\
  8811. \f2\b \cf8 return
  8812. \f0\b0 \cf4 cell;\
  8813. \}\
  8814. \
  8815. \cf2 //
  8816. \f1 \'b1\'ed\'c7\'e9\'b0\'fc
  8817. \f0 \cf4 \
  8818. - (JXBaseChatCell *)\cf11 creatEmojiCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8819. NSString * identifier = \cf6 @"JXEmojiCell"\cf4 ;\
  8820. JXEmojiCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8821. \f2\b \cf8 if
  8822. \f0\b0 \cf4 (!cell) \{\
  8823. cell = [[JXEmojiCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8824. \cf2 // cell.chatImage.delegate = self;\cf4 \
  8825. \cf2 // cell.chatImage.didTouch = @selector(onCellImage:);\cf4 \
  8826. \}\
  8827. \f2\b \cf8 return
  8828. \f0\b0 \cf4 cell;\
  8829. \}\
  8830. \
  8831. \cf2 //
  8832. \f1 \'ca\'d3\'c6\'b5
  8833. \f0 \cf4 \
  8834. - (JXBaseChatCell *)\cf11 creatVideoCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8835. NSString * identifier = \cf6 @"JXVideoCell"\cf4 ;\
  8836. JXVideoCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8837. \f2\b \cf8 if
  8838. \f0\b0 \cf4 (!cell) \{\
  8839. cell = [[JXVideoCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8840. \}\
  8841. cell.videoDelegate =
  8842. \f2\b \cf8 self
  8843. \f0\b0 \cf4 ;\
  8844. cell.indexTag = indexPath.row;\
  8845. \
  8846. \f2\b \cf8 return
  8847. \f0\b0 \cf4 cell;\
  8848. \}\
  8849. \cf2 //
  8850. \f1 \'d2\'f4\'c6\'b5
  8851. \f0 \cf4 \
  8852. - (JXBaseChatCell *)\cf11 creatAudioCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8853. NSString * identifier = \cf6 @"JXAudioCell"\cf4 ;\
  8854. JXAudioCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8855. \f2\b \cf8 if
  8856. \f0\b0 \cf4 (!cell) \{\
  8857. cell = [[JXAudioCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8858. \}\
  8859. cell.indexNum = (
  8860. \f2\b \cf8 int
  8861. \f0\b0 \cf4 )indexPath.row;\
  8862. \f2\b \cf8 return
  8863. \f0\b0 \cf4 cell;\
  8864. \}\
  8865. \cf2 //
  8866. \f1 \'ce\'c4\'bc\'fe
  8867. \f0 \cf4 \
  8868. - (JXBaseChatCell *)\cf11 creatFileCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8869. NSString * identifier = \cf6 @"JXFileCell"\cf4 ;\
  8870. JXFileCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8871. \f2\b \cf8 if
  8872. \f0\b0 \cf4 (!cell) \{\
  8873. cell = [[JXFileCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8874. \}\
  8875. \f2\b \cf8 return
  8876. \f0\b0 \cf4 cell;\
  8877. \}\
  8878. \cf2 //
  8879. \f1 \'ce\'bb\'d6\'c3
  8880. \f0 \cf4 \
  8881. - (JXBaseChatCell *)\cf11 creatLocationCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8882. NSString * identifier = \cf6 @"JXLocationCell"\cf4 ;\
  8883. JXLocationCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8884. \f2\b \cf8 if
  8885. \f0\b0 \cf4 (!cell) \{\
  8886. cell = [[JXLocationCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8887. \}\
  8888. \f2\b \cf8 return
  8889. \f0\b0 \cf4 cell;\
  8890. \}\
  8891. \cf2 //
  8892. \f1 \'c3\'fb\'c6\'ac
  8893. \f0 \cf4 \
  8894. - (JXBaseChatCell *)\cf11 creatCardCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8895. NSString * identifier = \cf6 @"JXCardCell"\cf4 ;\
  8896. JXCardCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8897. \f2\b \cf8 if
  8898. \f0\b0 \cf4 (!cell) \{\
  8899. cell = [[JXCardCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8900. \}\
  8901. \f2\b \cf8 return
  8902. \f0\b0 \cf4 cell;\
  8903. \}\
  8904. \cf2 //
  8905. \f1 \'ba\'ec\'b0\'fc
  8906. \f0 \cf4 \
  8907. - (JXBaseChatCell *)\cf11 creatRedPacketCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8908. NSString * identifier = \cf6 @"JXRedPacketCell"\cf4 ;\
  8909. JXRedPacketCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8910. \f2\b \cf8 if
  8911. \f0\b0 \cf4 (!cell) \{\
  8912. cell = [[JXRedPacketCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8913. \}\
  8914. \f2\b \cf8 return
  8915. \f0\b0 \cf4 cell;\
  8916. \}\
  8917. \cf2 //
  8918. \f1 \'b6\'af\'bb\'ad
  8919. \f0 \cf4 \
  8920. - (JXBaseChatCell *)\cf11 creatGifCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8921. NSString * identifier = \cf6 @"JXGifCell"\cf4 ;\
  8922. JXGifCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8923. \f2\b \cf8 if
  8924. \f0\b0 \cf4 (!cell) \{\
  8925. cell = [[JXGifCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8926. \}\
  8927. \f2\b \cf8 return
  8928. \f0\b0 \cf4 cell;\
  8929. \}\
  8930. \cf2 //
  8931. \f1 \'cf\'b5\'cd\'b3\'cc\'e1\'d0\'d1
  8932. \f0 \cf4 \
  8933. - (JXBaseChatCell *)\cf11 creatRemindCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8934. NSString * identifier = \cf6 @"JXRemindCell"\cf4 ;\
  8935. JXRemindCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8936. \f2\b \cf8 if
  8937. \f0\b0 \cf4 (!cell) \{\
  8938. cell = [[JXRemindCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8939. \}\
  8940. \f2\b \cf8 return
  8941. \f0\b0 \cf4 cell;\
  8942. \}\
  8943. \
  8944. \cf2 //
  8945. \f1 \'b5\'a5\'cc\'f5\'cd\'bc\'ce\'c4
  8946. \f0 \cf4 \
  8947. - (JXBaseChatCell *)\cf11 creatSystemImage1Cell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8948. NSString * identifier = \cf6 @"JXSystemImage1Cell"\cf4 ;\
  8949. JXSystemImage1Cell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8950. \f2\b \cf8 if
  8951. \f0\b0 \cf4 (!cell) \{\
  8952. cell = [[JXSystemImage1Cell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8953. \}\
  8954. \f2\b \cf8 return
  8955. \f0\b0 \cf4 cell;\
  8956. \}\
  8957. \
  8958. \cf2 //
  8959. \f1 \'b6\'e0\'cc\'f5\'cd\'bc\'ce\'c4
  8960. \f0 \cf4 \
  8961. - (JXBaseChatCell *)\cf11 creatSystemImage2Cell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8962. NSString * identifier = \cf6 @"JXSystemImage2Cell"\cf4 ;\
  8963. JXSystemImage2Cell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8964. \f2\b \cf8 if
  8965. \f0\b0 \cf4 (!cell) \{\
  8966. cell = [[JXSystemImage2Cell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8967. \}\
  8968. \f2\b \cf8 return
  8969. \f0\b0 \cf4 cell;\
  8970. \}\
  8971. \
  8972. \cf2 //
  8973. \f1 \'d2\'f4\'ca\'d3\'c6\'b5\'cd\'a8\'bb\'b0
  8974. \f0 \cf4 \
  8975. - (JXBaseChatCell *)\cf11 creatAVCallCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8976. NSString * identifier = \cf6 @"JXAVCallCell"\cf4 ;\
  8977. JXAVCallCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8978. \f2\b \cf8 if
  8979. \f0\b0 \cf4 (!cell) \{\
  8980. cell = [[JXAVCallCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8981. \}\
  8982. \f2\b \cf8 return
  8983. \f0\b0 \cf4 cell;\
  8984. \}\
  8985. \
  8986. \cf2 //
  8987. \f1 \'c1\'b4\'bd\'d3
  8988. \f0 \cf4 \
  8989. - (JXBaseChatCell *)\cf11 creatLinkCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  8990. NSString * identifier = \cf6 @"JXLinkCell"\cf4 ;\
  8991. JXLinkCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  8992. \f2\b \cf8 if
  8993. \f0\b0 \cf4 (!cell) \{\
  8994. cell = [[JXLinkCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  8995. \}\
  8996. \f2\b \cf8 return
  8997. \f0\b0 \cf4 cell;\
  8998. \}\
  8999. \
  9000. \cf2 //
  9001. \f1 \'b4\'c1\'d2\'bb\'b4\'c1
  9002. \f0 \cf4 \
  9003. - (JXBaseChatCell *)\cf11 creatShakeCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  9004. NSString * identifier = \cf6 @"JXShakeCell"\cf4 ;\
  9005. JXShakeCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  9006. \f2\b \cf8 if
  9007. \f0\b0 \cf4 (!cell) \{\
  9008. cell = [[JXShakeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  9009. \}\
  9010. \f2\b \cf8 return
  9011. \f0\b0 \cf4 cell;\
  9012. \}\
  9013. \
  9014. \cf2 //
  9015. \f1 \'b4\'c1\'d2\'bb\'b4\'c1\'d0\'c2
  9016. \f0 \cf4 \
  9017. - (JXBaseChatCell *)\cf11 creatNewShakeCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  9018. NSString * identifier = \cf6 @"JXNewShakeCell"\cf4 ;\
  9019. JXNewShakeCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  9020. \f2\b \cf8 if
  9021. \f0\b0 \cf4 (!cell) \{\
  9022. cell = [[JXNewShakeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  9023. \}\
  9024. \f2\b \cf8 return
  9025. \f0\b0 \cf4 cell;\
  9026. \}\
  9027. \
  9028. \cf2 //
  9029. \f1 \'ba\'cf\'b2\'a2\'d7\'aa\'b7\'a2\'cf\'fb\'cf\'a2
  9030. \f0 \cf4 \
  9031. - (JXBaseChatCell *)\cf11 creatMergeRelayCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
  9032. NSString * identifier = \cf6 @"JXMergeRelayCell"\cf4 ;\
  9033. JXMergeRelayCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  9034. \f2\b \cf8 if
  9035. \f0\b0 \cf4 (!cell) \{\
  9036. cell = [[JXMergeRelayCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  9037. \}\
  9038. \f2\b \cf8 return
  9039. \f0\b0 \cf4 cell;\
  9040. \}\
  9041. \cf2 //
  9042. \f1 \'b7\'d6\'cf\'ed
  9043. \f0 \cf4 \
  9044. - (JXBaseChatCell *)\cf11 createShareCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath \{\
  9045. NSString * identifier = \cf6 @"JXShareCell"\cf4 ;\
  9046. JXShareCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  9047. \f2\b \cf8 if
  9048. \f0\b0 \cf4 (!cell) \{\
  9049. cell = [[JXShareCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  9050. \}\
  9051. \f2\b \cf8 return
  9052. \f0\b0 \cf4 cell;\
  9053. \}\
  9054. \cf2 //
  9055. \f1 \'d7\'aa\'d5\'cb
  9056. \f0 \cf4 \
  9057. - (JXBaseChatCell *)\cf11 createTransferCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath \{\
  9058. NSString * identifier = \cf6 @"JXTransferCell"\cf4 ;\
  9059. JXTransferCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  9060. \f2\b \cf8 if
  9061. \f0\b0 \cf4 (!cell) \{\
  9062. cell = [[JXTransferCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  9063. \}\
  9064. \f2\b \cf8 return
  9065. \f0\b0 \cf4 cell;\
  9066. \}\
  9067. \cf2 //
  9068. \f1 \'bb\'d8\'b8\'b4
  9069. \f0 \cf4 \
  9070. - (JXBaseChatCell *)\cf11 createReplyCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath \{\
  9071. NSString * identifier = \cf6 @"JXReplyCell"\cf4 ;\
  9072. JXReplyCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
  9073. \f2\b \cf8 if
  9074. \f0\b0 \cf4 (!cell) \{\
  9075. cell = [[JXReplyCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
  9076. \}\
  9077. \f2\b \cf8 return
  9078. \f0\b0 \cf4 cell;\
  9079. \}\
  9080. \
  9081. \cf2 //
  9082. \f1 \'cf\'d4\'ca\'be\'c8\'ab\'c6\'c1\'ca\'d3\'c6\'b5\'b2\'a5\'b7\'c5
  9083. \f0 \cf4 \
  9084. - (
  9085. \f2\b \cf8 void
  9086. \f0\b0 \cf4 )\cf11 showVideoPlayerWithTag\cf4 :(NSInteger)tag \{\
  9087. [
  9088. \f2\b \cf8 self
  9089. \f0\b0 \cf4 hideKeyboard:
  9090. \f2\b \cf8 NO
  9091. \f0\b0 \cf4 ];\
  9092. \f2\b \cf8 self
  9093. \f0\b0 \cf4 .indexNum = (
  9094. \f2\b \cf8 int
  9095. \f0\b0 \cf4 )tag;\
  9096. \
  9097. _player= [JXVideoPlayer alloc];\
  9098. _player.type = JXVideoTypeChat;\
  9099. _player.isShowHide =
  9100. \f2\b \cf8 YES
  9101. \f0\b0 \cf4 ; \cf2 //
  9102. \f1 \'b2\'a5\'b7\'c5\'d6\'d0\'b5\'e3\'bb\'f7\'b2\'a5\'b7\'c5\'c6\'f7\'b1\'e3\'cf\'fa\'bb\'d9\'b2\'a5\'b7\'c5\'c6\'f7
  9103. \f0 \cf4 \
  9104. _player.isStartFullScreenPlay =
  9105. \f2\b \cf8 YES
  9106. \f0\b0 \cf4 ; \cf2 //
  9107. \f1 \'c8\'ab\'c6\'c1\'b2\'a5\'b7\'c5
  9108. \f0 \cf4 \
  9109. _player.didVideoPlayEnd =
  9110. \f2\b \cf8 @selector
  9111. \f0\b0 \cf4 (didVideoPlayEnd);\
  9112. _player.delegate =
  9113. \f2\b \cf8 self
  9114. \f0\b0 \cf4 ;\
  9115. JXMessageObject *msg = [_array objectAtIndex:tag];\
  9116. \f2\b \cf8 if
  9117. \f0\b0 \cf4 (msg.isMySend && isFileExist(msg.fileName))\
  9118. _player.videoFile = msg.fileName;\
  9119. \f2\b \cf8 else
  9120. \f0\b0 \cf4 \
  9121. _player.videoFile = msg.content;\
  9122. _player.isReadDel = [msg.isReadDel boolValue];\
  9123. _player = [_player initWithParent:
  9124. \f2\b \cf8 self
  9125. \f0\b0 \cf4 .view];\
  9126. \
  9127. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 .2f\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
  9128. [_player
  9129. \f2\b \cf8 switch
  9130. \f0\b0 \cf4 ];\
  9131. \});\
  9132. \}\
  9133. \
  9134. \
  9135. \cf2 //
  9136. \f1 \'cf\'fa\'bb\'d9\'b2\'a5\'b7\'c5\'c6\'f7
  9137. \f0 \cf4 \
  9138. - (
  9139. \f2\b \cf8 void
  9140. \f0\b0 \cf4 )\cf11 didVideoPlayEnd\cf4 \{\
  9141. \cf2 // [[UIApplication sharedApplication] setStatusBarHidden:NO];\cf4 \
  9142. JXVideoCell *cell = [
  9143. \f2\b \cf8 self
  9144. \f0\b0 \cf4 .tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:
  9145. \f2\b \cf8 self
  9146. \f0\b0 \cf4 .indexNum inSection:\cf7 0\cf4 ]];\
  9147. \f2\b \cf8 if
  9148. \f0\b0 \cf4 (!cell.msg.isMySend) \{\
  9149. [cell deleteMsg];\
  9150. \}\
  9151. \}\
  9152. \
  9153. \
  9154. -(
  9155. \f2\b \cf8 void
  9156. \f0\b0 \cf4 )\cf11 showOneMsg\cf4 :(JXMessageObject*)msg\{\
  9157. \f2\b \cf8 for
  9158. \f0\b0 \cf4 (
  9159. \f2\b \cf8 int
  9160. \f0\b0 \cf4 i=\cf7 0\cf4 ;i<[_array count];i++)\{\
  9161. JXMessageObject* p = (JXMessageObject*)[_array objectAtIndex:i];\
  9162. \f2\b \cf8 if
  9163. \f0\b0 \cf4 ([p.messageId isEqualToString:msg.messageId])\
  9164. \f2\b \cf8 return
  9165. \f0\b0 \cf4 ;\
  9166. p =
  9167. \f2\b \cf8 nil
  9168. \f0\b0 \cf4 ;\
  9169. \}\
  9170. \cf2 //
  9171. \f1 \'c5\'d0\'b6\'cf\'ca\'c7\'b7\'f1\'d5\'b9\'ca\'be\'ca\'b1\'bc\'e4
  9172. \f0 \cf4 \
  9173. [
  9174. \f2\b \cf8 self
  9175. \f0\b0 \cf4 setNewShowTime:msg];\
  9176. CGFloat height = \cf7 0\cf4 ;\
  9177. \f2\b \cf8 if
  9178. \f0\b0 \cf4 (_array.count > \cf7 0\cf4 ) \{\
  9179. height = [
  9180. \f2\b \cf8 self
  9181. \f0\b0 \cf4 tableView:_table heightForRowAtIndexPath:[NSIndexPath indexPathForRow:_array.count - \cf7 1\cf4 inSection:\cf7 0\cf4 ]];\
  9182. \}\
  9183. \
  9184. \f2\b \cf8 BOOL
  9185. \f0\b0 \cf4 flag =
  9186. \f2\b \cf8 NO
  9187. \f0\b0 \cf4 ;\
  9188. \f2\b \cf8 if
  9189. \f0\b0 \cf4 (fabs(_table.contentOffset.y + _table.frame.size.height - _table.contentSize.height) < height) \{\
  9190. flag =
  9191. \f2\b \cf8 YES
  9192. \f0\b0 \cf4 ;\
  9193. \}\
  9194. msg.isShowWait =
  9195. \f2\b \cf8 YES
  9196. \f0\b0 \cf4 ;\
  9197. [_array addObject:msg];\
  9198. \cf2 // NSLog(@"_array:%d",msg.retainCount);\cf4 \
  9199. \f2\b \cf8 if
  9200. \f0\b0 \cf4 (
  9201. \f2\b \cf8 self
  9202. \f0\b0 \cf4 .isGroupMessages) \{\
  9203. \f2\b \cf8 return
  9204. \f0\b0 \cf4 ;\
  9205. \}\
  9206. \f2\b \cf8 if
  9207. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeRedPacket) \{\
  9208. \f2\b \cf8 if
  9209. \f0\b0 \cf4 (![_orderRedPacketArray containsObject:msg]) \{\
  9210. [_orderRedPacketArray addObject:msg];\
  9211. \}\
  9212. \}\
  9213. \
  9214. \f2\b \cf8 if
  9215. \f0\b0 \cf4 (_isRefreshing) \{\
  9216. \f2\b \cf8 return
  9217. \f0\b0 \cf4 ;\
  9218. \}\
  9219. \f2\b \cf8 @try
  9220. \f0\b0 \cf4 \{\
  9221. [_table insertRow:(
  9222. \f2\b \cf8 int
  9223. \f0\b0 \cf4 )[_array count]-\cf7 1\cf4 section:\cf7 0\cf4 ];\
  9224. \}
  9225. \f2\b \cf8 @catch
  9226. \f0\b0 \cf4 (NSException *exception) \{\
  9227. \
  9228. \}\
  9229. \
  9230. \f2\b \cf8 if
  9231. \f0\b0 \cf4 ((flag || msg.isMySend) && !
  9232. \f2\b \cf8 self
  9233. \f0\b0 \cf4 .isSyncMsg) \{\
  9234. \cf2 // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\cf4 \
  9235. [_table gotoLastRow:
  9236. \f2\b \cf8 NO
  9237. \f0\b0 \cf4 ];\
  9238. \cf2 // \});\cf4 \
  9239. \}\
  9240. \
  9241. \}\
  9242. \
  9243. \cf2 //
  9244. \f1 \'c9\'cf\'b4\'ab\'cd\'ea\'b3\'c9\'ba\'f3\'a3\'ac\'b7\'a2\'cf\'fb\'cf\'a2
  9245. \f0 \cf4 \
  9246. -(
  9247. \f2\b \cf8 void
  9248. \f0\b0 \cf4 )\cf11 doSendAfterUpload\cf4 :(NSDictionary*)dict\{\
  9249. \
  9250. NSString* msgId = [dict objectForKey:\cf6 @"oUrl"\cf4 ];\
  9251. msgId = [[msgId lastPathComponent] stringByDeletingPathExtension];\
  9252. NSString* oFileName = [dict objectForKey:\cf6 @"oFileName"\cf4 ];\
  9253. \
  9254. \cf2 // NSString *userId = self.userIds[self.groupMessagesIndex];\cf4 \
  9255. \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
  9256. \
  9257. JXMessageObject* p=
  9258. \f2\b \cf8 nil
  9259. \f0\b0 \cf4 ;\
  9260. \f2\b \cf8 int
  9261. \f0\b0 \cf4 found=-\cf7 1\cf4 ;\
  9262. \f2\b \cf8 for
  9263. \f0\b0 \cf4 (
  9264. \f2\b \cf8 int
  9265. \f0\b0 \cf4 i=(
  9266. \f2\b \cf8 int
  9267. \f0\b0 \cf4 )[_array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
  9268. p = [_array objectAtIndex:i];\
  9269. \f2\b \cf8 if
  9270. \f0\b0 \cf4 ([p.type intValue]==kWCMessageTypeLocation)\
  9271. \f2\b \cf8 if
  9272. \f0\b0 \cf4 ([[p.fileName lastPathComponent] isEqualToString:[oFileName lastPathComponent]])\{\
  9273. found = i;\
  9274. \f2\b \cf8 break
  9275. \f0\b0 \cf4 ;\
  9276. \}\
  9277. \f2\b \cf8 if
  9278. \f0\b0 \cf4 ([p.type intValue]==kWCMessageTypeFile && ![p.isUpload boolValue])\
  9279. \f2\b \cf8 if
  9280. \f0\b0 \cf4 ([[p.fileName lastPathComponent] isEqualToString:[oFileName lastPathComponent]])\{\
  9281. found = i;\
  9282. \f2\b \cf8 break
  9283. \f0\b0 \cf4 ;\
  9284. \}\
  9285. \f2\b \cf8 if
  9286. \f0\b0 \cf4 (p.content.length > \cf7 0\cf4 ) \{\
  9287. \f2\b \cf8 if
  9288. \f0\b0 \cf4 ([oFileName rangeOfString:p.content].location != NSNotFound) \{\
  9289. found = i;\
  9290. \f2\b \cf8 break
  9291. \f0\b0 \cf4 ;\
  9292. \}\
  9293. \}\
  9294. \cf2 // if([p.content isEqualToString:msgId])\{\cf4 \
  9295. \cf2 // found = i;\cf4 \
  9296. \cf2 // break;\cf4 \
  9297. \cf2 // \}\cf4 \
  9298. p =
  9299. \f2\b \cf8 nil
  9300. \f0\b0 \cf4 ;\
  9301. \}\
  9302. \f2\b \cf8 if
  9303. \f0\b0 \cf4 (found>=\cf7 0\cf4 )\{\cf2 //
  9304. \f1 \'d5\'d2\'b5\'bd\'cf\'fb\'cf\'a2\'cc\'e5
  9305. \f0 \cf4 \
  9306. \f2\b \cf8 if
  9307. \f0\b0 \cf4 ([[dict objectForKey:\cf6 @"status"\cf4 ] intValue] != \cf7 1\cf4 )\{\
  9308. NSLog(\cf6 @"doUploadFaire"\cf4 );\
  9309. [p updateIsSend:transfer_status_no];\
  9310. JXBaseChatCell* cell = [
  9311. \f2\b \cf8 self
  9312. \f0\b0 \cf4 getCell:found];\
  9313. [cell drawIsSend];\
  9314. cell =
  9315. \f2\b \cf8 nil
  9316. \f0\b0 \cf4 ;\
  9317. \f2\b \cf8 return
  9318. \f0\b0 \cf4 ;\
  9319. \}\
  9320. NSLog(\cf6 @"doSendAfterUpload"\cf4 );\
  9321. p.content = [dict objectForKey:\cf6 @"oUrl"\cf4 ];\
  9322. \cf2 // if (self.isGroupMessages) \{\cf4 \
  9323. \cf2 // p.toUserId = userId;\cf4 \
  9324. \cf2 // \}\cf4 \
  9325. [p updateIsUpload:
  9326. \f2\b \cf8 YES
  9327. \f0\b0 \cf4 ];\
  9328. \
  9329. \f2\b \cf8 if
  9330. \f0\b0 \cf4 (_useInfoTempChat==\cf7 11\cf4 ) \{\
  9331. \
  9332. p.tempChat = \cf7 11\cf4 ;\
  9333. \}
  9334. \f2\b \cf8 else
  9335. \f0\b0 \cf4 \
  9336. \{\
  9337. \
  9338. p.tempChat = \cf7 1\cf4 ;\
  9339. \}\
  9340. \
  9341. \cf2 // [g_xmpp sendMessage:p roomName:self.roomJid];//
  9342. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  9343. \f0 \cf4 \
  9344. \f2\b \cf8 if
  9345. \f0\b0 \cf4 (
  9346. \f2\b \cf8 self
  9347. \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
  9348. \f2\b \cf8 for
  9349. \f0\b0 \cf4 (NSString *userId
  9350. \f2\b \cf8 in
  9351. \f0\b0 \cf4
  9352. \f2\b \cf8 self
  9353. \f0\b0 \cf4 .userIds) \{\
  9354. \f2\b \cf8 if
  9355. \f0\b0 \cf4 (userId.length>\cf7 10\cf4 ) \{\
  9356. [g_xmpp sendMessage:p roomName:userId];\
  9357. \}
  9358. \f2\b \cf8 else
  9359. \f0\b0 \cf4 \{\
  9360. [g_xmpp sendMessage:p roomName:userId];\
  9361. \}\
  9362. \}\
  9363. \}
  9364. \f2\b \cf8 else
  9365. \f0\b0 \cf4 \{\
  9366. [g_xmpp sendMessage:p roomName:
  9367. \f2\b \cf8 self
  9368. \f0\b0 \cf4 .roomJid];\cf2 //
  9369. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  9370. \f0 \cf4 \
  9371. \}\
  9372. \cf2 // [self.tableView reloadData];\cf4 \
  9373. \}\
  9374. \
  9375. p =
  9376. \f2\b \cf8 nil
  9377. \f0\b0 \cf4 ;\
  9378. \f2\b \cf8 if
  9379. \f0\b0 \cf4 (
  9380. \f2\b \cf8 self
  9381. \f0\b0 \cf4 .isGroupMessages) \{\
  9382. \
  9383. \f2\b \cf8 self
  9384. \f0\b0 \cf4 .groupMessagesIndex ++;\
  9385. \f2\b \cf8 if
  9386. \f0\b0 \cf4 (
  9387. \f2\b \cf8 self
  9388. \f0\b0 \cf4 .userIds &&
  9389. \f2\b \cf8 self
  9390. \f0\b0 \cf4 .groupMessagesIndex >=
  9391. \f2\b \cf8 self
  9392. \f0\b0 \cf4 .userIds.count) \{\
  9393. \
  9394. \f2\b \cf8 self
  9395. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  9396. [JXMyTools showTipView:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
  9397. \
  9398. \}\
  9399. \}\
  9400. \}\
  9401. \
  9402. \cf2 //
  9403. \f1 \'c9\'cf\'b4\'ab\'cd\'ea\'b3\'c9\'ba\'f3\'a3\'ac\'b7\'a2\'cf\'fb\'cf\'a2
  9404. \f0 \cf4 \
  9405. -(
  9406. \f2\b \cf8 void
  9407. \f0\b0 \cf4 )\cf11 doUploadError\cf4 :(JXConnection*)downloader\{\
  9408. NSString* msgId = downloader.userData;\
  9409. msgId = [[msgId lastPathComponent] stringByDeletingPathExtension];\
  9410. \
  9411. \f2\b \cf8 for
  9412. \f0\b0 \cf4 (
  9413. \f2\b \cf8 int
  9414. \f0\b0 \cf4 i=(
  9415. \f2\b \cf8 int
  9416. \f0\b0 \cf4 )[_array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
  9417. JXMessageObject* p = [_array objectAtIndex:i];\
  9418. \f2\b \cf8 if
  9419. \f0\b0 \cf4 ([p.content isEqualToString:msgId])\{\
  9420. [p updateIsSend:transfer_status_no];\
  9421. [[
  9422. \f2\b \cf8 self
  9423. \f0\b0 \cf4 getCell:i] drawIsSend];\
  9424. \f2\b \cf8 return
  9425. \f0\b0 \cf4 ;\
  9426. \}\
  9427. p =
  9428. \f2\b \cf8 nil
  9429. \f0\b0 \cf4 ;\
  9430. \}\
  9431. \}\
  9432. \
  9433. -(
  9434. \f2\b \cf8 void
  9435. \f0\b0 \cf4 )\cf11 onSendTimeout\cf4 :(NSNotification *)notifacation\cf2 //
  9436. \f1 \'b3\'ac\'ca\'b1\'ce\'b4\'ca\'d5\'b5\'bd\'bb\'d8\'d6\'b4
  9437. \f0 \cf4 \
  9438. \{\
  9439. JXMessageObject *msg = (JXMessageObject *)notifacation.object;\
  9440. \f2\b \cf8 if
  9441. \f0\b0 \cf4 (msg==
  9442. \f2\b \cf8 nil
  9443. \f0\b0 \cf4 )\
  9444. \f2\b \cf8 return
  9445. \f0\b0 \cf4 ;\
  9446. \
  9447. \f2\b \cf8 if
  9448. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeWithdraw) \{\
  9449. [_wait stop];\
  9450. \cf2 // [g_App showAlert:Localized(@"JX_WithdrawFailed")];\cf4 \
  9451. [JXMyTools showTipView:Localized(\cf6 @"JX_WithdrawFailed"\cf4 )];\
  9452. \f2\b \cf8 return
  9453. \f0\b0 \cf4 ;\
  9454. \}\
  9455. \
  9456. \f2\b \cf8 for
  9457. \f0\b0 \cf4 (
  9458. \f2\b \cf8 int
  9459. \f0\b0 \cf4 i=(
  9460. \f2\b \cf8 int
  9461. \f0\b0 \cf4 )[_array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
  9462. JXMessageObject* p = [_array objectAtIndex:i];\
  9463. \f2\b \cf8 if
  9464. \f0\b0 \cf4 (p == msg)\{\
  9465. \cf2 // NSLog(@"receive:onSendTimeout");\cf4 \
  9466. [[
  9467. \f2\b \cf8 self
  9468. \f0\b0 \cf4 getCell:i] drawIsSend];\
  9469. \f2\b \cf8 break
  9470. \f0\b0 \cf4 ;\
  9471. \}\
  9472. p =
  9473. \f2\b \cf8 nil
  9474. \f0\b0 \cf4 ;\
  9475. \}\
  9476. \}\
  9477. \
  9478. \
  9479. -(
  9480. \f2\b \cf8 void
  9481. \f0\b0 \cf4 )\cf11 onReceiveFile\cf4 :(NSNotification *)notifacation\cf2 //
  9482. \f1 \'ca\'d5\'b5\'bd\'cf\'c2\'d4\'d8\'d7\'b4\'cc\'ac
  9483. \f0 \cf4 \
  9484. \{\
  9485. JXMessageObject *msg = (JXMessageObject *)notifacation.object;\
  9486. \f2\b \cf8 if
  9487. \f0\b0 \cf4 (msg==
  9488. \f2\b \cf8 nil
  9489. \f0\b0 \cf4 )\
  9490. \f2\b \cf8 return
  9491. \f0\b0 \cf4 ;\
  9492. \
  9493. \f2\b \cf8 for
  9494. \f0\b0 \cf4 (
  9495. \f2\b \cf8 int
  9496. \f0\b0 \cf4 i=(
  9497. \f2\b \cf8 int
  9498. \f0\b0 \cf4 )[_array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
  9499. JXMessageObject* p = [_array objectAtIndex:i];\
  9500. \f2\b \cf8 if
  9501. \f0\b0 \cf4 (p == msg)\{\
  9502. \cf2 // NSLog(@"onReceiveFile");\cf4 \
  9503. [[
  9504. \f2\b \cf8 self
  9505. \f0\b0 \cf4 getCell:i] drawIsReceive];\
  9506. \f2\b \cf8 break
  9507. \f0\b0 \cf4 ;\
  9508. \}\
  9509. p =
  9510. \f2\b \cf8 nil
  9511. \f0\b0 \cf4 ;\
  9512. \}\
  9513. \}\
  9514. \
  9515. -(
  9516. \f2\b \cf8 void
  9517. \f0\b0 \cf4 )\cf11 showMsg\cf4 :(NSNotification *)notifacation\{\
  9518. JXMessageObject *msg = (JXMessageObject *)notifacation.object;\
  9519. \f2\b \cf8 if
  9520. \f0\b0 \cf4 (msg==
  9521. \f2\b \cf8 nil
  9522. \f0\b0 \cf4 )\
  9523. \f2\b \cf8 return
  9524. \f0\b0 \cf4 ;\
  9525. \f2\b \cf8 if
  9526. \f0\b0 \cf4 ([[msg getTableName] isEqualToString:chatPerson.userId] && msg.isMySend)\
  9527. [
  9528. \f2\b \cf8 self
  9529. \f0\b0 \cf4 showOneMsg:msg];\
  9530. \}\
  9531. \
  9532. \cf5 #pragma mark
  9533. \f4\b \cf16 \'bd\'d3\'ca\'dc\'d0\'c2\'cf\'fb\'cf\'a2\'b9\'e3\'b2\'a5
  9534. \f0\b0 \cf4 \
  9535. -(
  9536. \f2\b \cf8 void
  9537. \f0\b0 \cf4 )\cf11 newMsgCome\cf4 :(NSNotification *)notifacation\{\
  9538. \
  9539. \
  9540. JXMessageObject *msg = (JXMessageObject *)notifacation.object;\
  9541. \f2\b \cf8 if
  9542. \f0\b0 \cf4 (msg==
  9543. \f2\b \cf8 nil
  9544. \f0\b0 \cf4 )\
  9545. \f2\b \cf8 return
  9546. \f0\b0 \cf4 ;\
  9547. \
  9548. \cf2 //
  9549. \f1 \'b8\'fc\'d0\'c2
  9550. \f0 title
  9551. \f1 \'d4\'da\'cf\'df\'d7\'b4\'cc\'ac
  9552. \f0 \cf4 \
  9553. \f2\b \cf8 if
  9554. \f0\b0 \cf4 (!
  9555. \f2\b \cf8 self
  9556. \f0\b0 \cf4 .roomJid && !
  9557. \f2\b \cf8 self
  9558. \f0\b0 \cf4 .onlinestate && ![msg.fromUserId isEqualToString:MY_USER_ID]) \{\
  9559. \f2\b \cf8 self
  9560. \f0\b0 \cf4 .onlinestate =
  9561. \f2\b \cf8 YES
  9562. \f0\b0 \cf4 ;\
  9563. \f2\b \cf8 if
  9564. \f0\b0 \cf4 (
  9565. \f2\b \cf8 self
  9566. \f0\b0 \cf4 .isGroupMessages) \{\
  9567. \f2\b \cf8 self
  9568. \f0\b0 \cf4 .title = Localized(\cf6 @"JX_GroupHair"\cf4 );\
  9569. \
  9570. [
  9571. \f2\b \cf8 self
  9572. \f0\b0 \cf4 setAudioIconFrame];\
  9573. \}
  9574. \f2\b \cf8 else
  9575. \f0\b0 \cf4 \{\
  9576. \f2\b \cf8 if
  9577. \f0\b0 \cf4 (
  9578. \f2\b \cf8 self
  9579. \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
  9580. \
  9581. \}
  9582. \f2\b \cf8 else
  9583. \f0\b0 \cf4 \{\
  9584. \
  9585. \f2\b \cf8 if
  9586. \f0\b0 \cf4 ([chatPerson.userId intValue]<\cf7 10100\cf4 && [chatPerson.userId intValue]>=\cf7 10000\cf4 ) \{\
  9587. \f2\b \cf8 self
  9588. \f0\b0 \cf4 .title = chatPerson.userNickname;\
  9589. [
  9590. \f2\b \cf8 self
  9591. \f0\b0 \cf4 setAudioIconFrame];\
  9592. \}
  9593. \f2\b \cf8 else
  9594. \f0\b0 \cf4 \{\
  9595. \cf2 // NSString *str = self.onlinestate ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
  9596. \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.remarkName.length > 0 ? chatPerson.remarkName : chatPerson.userNickname,str];\cf4 \
  9597. [
  9598. \f2\b \cf8 self
  9599. \f0\b0 \cf4 setChatTitle:chatPerson.remarkName.length > \cf7 0\cf4 ? chatPerson.remarkName : chatPerson.userNickname];\
  9600. \}\
  9601. \}\
  9602. \}\
  9603. \}\
  9604. \
  9605. \cf5 #ifdef Live_Version\cf4 \
  9606. \f2\b \cf8 if
  9607. \f0\b0 \cf4 ([[JXLiveJidManager shareArray] contains:msg.toUserId] || [[JXLiveJidManager shareArray] contains:msg.fromUserId])\
  9608. \f2\b \cf8 return
  9609. \f0\b0 \cf4 ;\
  9610. \cf5 #endif\cf4 \
  9611. \
  9612. \f2\b \cf8 if
  9613. \f0\b0 \cf4 ([msg.type intValue] == XMPP_TYPE_NOBLACK) \{\
  9614. \f2\b \cf8 if
  9615. \f0\b0 \cf4 ([msg.fromUserId isEqualToString:
  9616. \f2\b \cf8 self
  9617. \f0\b0 \cf4 .chatPerson.userId]) \{\
  9618. \f2\b \cf8 self
  9619. \f0\b0 \cf4 .isBeenBlack = \cf7 0\cf4 ;\
  9620. \}\
  9621. \}\
  9622. \
  9623. \f2\b \cf8 if
  9624. \f0\b0 \cf4 (!msg.isVisible)\
  9625. \f2\b \cf8 return
  9626. \f0\b0 \cf4 ;\
  9627. \
  9628. \f2\b \cf8 if
  9629. \f0\b0 \cf4 (
  9630. \f2\b \cf8 self
  9631. \f0\b0 \cf4 .roomJid || msg.isGroup) \{\cf2 //
  9632. \f1 \'ca\'c7\'b7\'bf\'bc\'e4
  9633. \f0 \cf4 \
  9634. \f2\b \cf8 if
  9635. \f0\b0 \cf4 (msg.isRepeat) \{\
  9636. \f2\b \cf8 return
  9637. \f0\b0 \cf4 ;\
  9638. \}\
  9639. \f2\b \cf8 if
  9640. \f0\b0 \cf4 ([msg.toUserId isEqualToString:chatPerson.userId]||[msg.toId isEqualToString:
  9641. \f2\b \cf8 self
  9642. \f0\b0 \cf4 .roomJid]) \{\cf2 //
  9643. \f1 \'b5\'da\'d2\'bb\'b8\'f6\'c5\'d0\'b6\'cf\'ca\'b1\'b4\'d3
  9644. \f0 MsgView
  9645. \f1 \'bd\'f8\'c8\'eb\'a3\'ac\'b5\'da\'b6\'fe\'b8\'f6\'b4\'d3
  9646. \f0 GroupView
  9647. \f1 \'bd\'f8\'c8\'eb
  9648. \f0 \cf4 \
  9649. [
  9650. \f2\b \cf8 self
  9651. \f0\b0 \cf4 showOneMsg:msg];\
  9652. \}
  9653. \f2\b \cf8 else
  9654. \f0\b0 \cf4 \{\
  9655. \f2\b \cf8 if
  9656. \f0\b0 \cf4 ([msg.fromId isEqualToString:chatPerson.userId]||[msg.fromId isEqualToString:
  9657. \f2\b \cf8 self
  9658. \f0\b0 \cf4 .roomJid])\cf2 //
  9659. \f1 \'b5\'da\'d2\'bb\'b8\'f6\'c5\'d0\'b6\'cf\'ca\'b1\'b4\'d3
  9660. \f0 MsgView
  9661. \f1 \'bd\'f8\'c8\'eb\'a3\'ac\'b5\'da\'b6\'fe\'b8\'f6\'b4\'d3
  9662. \f0 GroupView
  9663. \f1 \'bd\'f8\'c8\'eb
  9664. \f0 \cf4 \
  9665. [
  9666. \f2\b \cf8 self
  9667. \f0\b0 \cf4 showOneMsg:msg];\
  9668. \}\
  9669. \
  9670. \f2\b \cf8 if
  9671. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeSuperDelete) \{\
  9672. JXMessageObject *newMsg;\
  9673. NSInteger index = \cf7 0\cf4 ;\
  9674. \f2\b \cf8 for
  9675. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _array.count; i ++) \{\
  9676. JXMessageObject *withDrawMsg = _array[i];\
  9677. \f2\b \cf8 if
  9678. \f0\b0 \cf4 ([msg.content isEqualToString:withDrawMsg.messageId]) \{\
  9679. newMsg = withDrawMsg;\
  9680. index = i;\
  9681. \f2\b \cf8 break
  9682. \f0\b0 \cf4 ;\
  9683. \}\
  9684. \}\
  9685. \f2\b \cf8 if
  9686. \f0\b0 \cf4 (!newMsg) \{\
  9687. \f2\b \cf8 return
  9688. \f0\b0 \cf4 ;\
  9689. \}\
  9690. newMsg.isShowTime =
  9691. \f2\b \cf8 NO
  9692. \f0\b0 \cf4 ;\
  9693. newMsg.type = [NSNumber numberWithInt:kWCMessageTypeSuperDelete];\
  9694. \cf2 // newMsg.content = Localized(@"JX_AlreadyWithdraw");\cf4 \
  9695. newMsg.content = \cf6 @""\cf4 ;\
  9696. NSString* s;\
  9697. \f2\b \cf8 if
  9698. \f0\b0 \cf4 ([
  9699. \f2\b \cf8 self
  9700. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
  9701. s =
  9702. \f2\b \cf8 self
  9703. \f0\b0 \cf4 .roomJid;\
  9704. \f2\b \cf8 else
  9705. \f0\b0 \cf4 \
  9706. s = chatPerson.userId;\
  9707. newMsg.fromUserId = MY_USER_ID;\
  9708. newMsg.toUserId = s;\
  9709. \f2\b \cf8 if
  9710. \f0\b0 \cf4 (
  9711. \f2\b \cf8 self
  9712. \f0\b0 \cf4 .withdrawIndex == _array.count - \cf7 1\cf4 ) \{\
  9713. \f2\b \cf8 self
  9714. \f0\b0 \cf4 .lastMsg.content = newMsg.content;\
  9715. \}\
  9716. [newMsg updateLastSend:UpdateLastSendType_None];\
  9717. [newMsg update];\
  9718. [newMsg notifyNewMsg];\
  9719. [_wait stop];\
  9720. [_table reloadRow:(
  9721. \f2\b \cf8 int
  9722. \f0\b0 \cf4 )index section:\cf7 0\cf4 ];\
  9723. \f2\b \cf8 return
  9724. \f0\b0 \cf4 ;\
  9725. \}\
  9726. \
  9727. \}
  9728. \f2\b \cf8 else
  9729. \f0\b0 \cf4 \{\
  9730. \f2\b \cf8 if
  9731. \f0\b0 \cf4 ([msg.type integerValue] == kWCMessageTypeRemind && !msg.isShowRemind) \{\
  9732. \f2\b \cf8 return
  9733. \f0\b0 \cf4 ;\
  9734. \}\
  9735. \f2\b \cf8 if
  9736. \f0\b0 \cf4 ([msg.fromUserId isEqualToString:MY_USER_ID] && [msg.type intValue] == kWCMessageTypeWithdraw) \{\
  9737. \
  9738. JXMessageObject *newMsg;\
  9739. NSInteger index = \cf7 0\cf4 ;\
  9740. \f2\b \cf8 for
  9741. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _array.count; i ++) \{\
  9742. JXMessageObject *withDrawMsg = _array[i];\
  9743. \f2\b \cf8 if
  9744. \f0\b0 \cf4 ([msg.content isEqualToString:withDrawMsg.messageId]) \{\
  9745. newMsg = withDrawMsg;\
  9746. index = i;\
  9747. \f2\b \cf8 break
  9748. \f0\b0 \cf4 ;\
  9749. \}\
  9750. \}\
  9751. \f2\b \cf8 if
  9752. \f0\b0 \cf4 (!newMsg) \{\
  9753. \f2\b \cf8 return
  9754. \f0\b0 \cf4 ;\
  9755. \}\
  9756. newMsg.isShowTime =
  9757. \f2\b \cf8 NO
  9758. \f0\b0 \cf4 ;\
  9759. newMsg.type = [NSNumber numberWithInt:kWCMessageTypeRemind];\
  9760. newMsg.content = Localized(\cf6 @"JX_AlreadyWithdraw"\cf4 );\
  9761. NSString* s;\
  9762. \f2\b \cf8 if
  9763. \f0\b0 \cf4 ([
  9764. \f2\b \cf8 self
  9765. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
  9766. s =
  9767. \f2\b \cf8 self
  9768. \f0\b0 \cf4 .roomJid;\
  9769. \f2\b \cf8 else
  9770. \f0\b0 \cf4 \
  9771. s = chatPerson.userId;\
  9772. newMsg.fromUserId = MY_USER_ID;\
  9773. newMsg.toUserId = s;\
  9774. \f2\b \cf8 if
  9775. \f0\b0 \cf4 (
  9776. \f2\b \cf8 self
  9777. \f0\b0 \cf4 .withdrawIndex == _array.count - \cf7 1\cf4 ) \{\
  9778. \f2\b \cf8 self
  9779. \f0\b0 \cf4 .lastMsg.content = newMsg.content;\
  9780. \}\
  9781. [newMsg updateLastSend:UpdateLastSendType_None];\
  9782. [newMsg update];\
  9783. [newMsg notifyNewMsg];\
  9784. [_wait stop];\
  9785. [_table reloadRow:(
  9786. \f2\b \cf8 int
  9787. \f0\b0 \cf4 )index section:\cf7 0\cf4 ];\
  9788. \f2\b \cf8 return
  9789. \f0\b0 \cf4 ;\
  9790. \}\
  9791. \
  9792. \f2\b \cf8 if
  9793. \f0\b0 \cf4 ([msg.fromUserId isEqualToString:chatPerson.userId] || ([msg.fromUserId isEqualToString:MY_USER_ID] && [msg.toUserId isEqualToString:chatPerson.userId]))\
  9794. [
  9795. \f2\b \cf8 self
  9796. \f0\b0 \cf4 showOneMsg:msg];\
  9797. \}\
  9798. msg =
  9799. \f2\b \cf8 nil
  9800. \f0\b0 \cf4 ;\
  9801. \}\
  9802. \
  9803. -(
  9804. \f2\b \cf8 void
  9805. \f0\b0 \cf4 )\cf11 newReceipt\cf4 :(NSNotification *)notifacation\{\cf2 //
  9806. \f1 \'d0\'c2\'bb\'d8\'d6\'b4
  9807. \f0 \cf4 \
  9808. \cf2 // NSLog(@"newReceipt");\cf4 \
  9809. JXMessageObject *msg = (JXMessageObject *)notifacation.object;\
  9810. \f2\b \cf8 if
  9811. \f0\b0 \cf4 (msg ==
  9812. \f2\b \cf8 nil
  9813. \f0\b0 \cf4 )\
  9814. \f2\b \cf8 return
  9815. \f0\b0 \cf4 ;\
  9816. \f2\b \cf8 if
  9817. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeWithdraw) \{\
  9818. JXMessageObject *msg1 = _array[
  9819. \f2\b \cf8 self
  9820. \f0\b0 \cf4 .withdrawIndex];\
  9821. msg1.isShowTime =
  9822. \f2\b \cf8 NO
  9823. \f0\b0 \cf4 ;\
  9824. msg1.type = [NSNumber numberWithInt:kWCMessageTypeRemind];\
  9825. msg1.content = Localized(\cf6 @"JX_AlreadyWithdraw"\cf4 );\
  9826. NSString* s;\
  9827. \f2\b \cf8 if
  9828. \f0\b0 \cf4 ([
  9829. \f2\b \cf8 self
  9830. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
  9831. s =
  9832. \f2\b \cf8 self
  9833. \f0\b0 \cf4 .roomJid;\
  9834. \f2\b \cf8 else
  9835. \f0\b0 \cf4 \
  9836. s = chatPerson.userId;\
  9837. msg1.fromUserId = MY_USER_ID;\
  9838. msg1.toUserId = s;\
  9839. \f2\b \cf8 if
  9840. \f0\b0 \cf4 (
  9841. \f2\b \cf8 self
  9842. \f0\b0 \cf4 .withdrawIndex == _array.count - \cf7 1\cf4 ) \{\
  9843. \f2\b \cf8 self
  9844. \f0\b0 \cf4 .lastMsg.content = msg1.content;\
  9845. \}\
  9846. [msg1 updateLastSend:UpdateLastSendType_None];\
  9847. [msg1 update];\
  9848. [msg1 notifyNewMsg];\
  9849. [_wait stop];\
  9850. [_table reloadRow:(
  9851. \f2\b \cf8 int
  9852. \f0\b0 \cf4 )
  9853. \f2\b \cf8 self
  9854. \f0\b0 \cf4 .withdrawIndex section:\cf7 0\cf4 ];\
  9855. \f2\b \cf8 return
  9856. \f0\b0 \cf4 ;\
  9857. \}\
  9858. \
  9859. \f2\b \cf8 if
  9860. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeSuperDelete) \{\
  9861. JXMessageObject *msg1 = _array[
  9862. \f2\b \cf8 self
  9863. \f0\b0 \cf4 .withdrawIndex];\
  9864. msg1.isShowTime =
  9865. \f2\b \cf8 NO
  9866. \f0\b0 \cf4 ;\
  9867. msg1.type = [NSNumber numberWithInt:kWCMessageTypeNone];\
  9868. msg1.content = \cf6 @"
  9869. \f1 \'c4\'e3\'c9\'be\'b3\'fd\'c1\'cb\'d2\'bb\'cc\'f5\'cf\'fb\'cf\'a2
  9870. \f0 "\cf4 ;\
  9871. NSString* s;\
  9872. \f2\b \cf8 if
  9873. \f0\b0 \cf4 ([
  9874. \f2\b \cf8 self
  9875. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
  9876. s =
  9877. \f2\b \cf8 self
  9878. \f0\b0 \cf4 .roomJid;\
  9879. \f2\b \cf8 else
  9880. \f0\b0 \cf4 \
  9881. s = chatPerson.userId;\
  9882. msg1.fromUserId = MY_USER_ID;\
  9883. msg1.toUserId = s;\
  9884. \f2\b \cf8 if
  9885. \f0\b0 \cf4 (
  9886. \f2\b \cf8 self
  9887. \f0\b0 \cf4 .withdrawIndex == _array.count - \cf7 1\cf4 ) \{\
  9888. \f2\b \cf8 self
  9889. \f0\b0 \cf4 .lastMsg.content = msg1.content;\
  9890. \}\
  9891. [msg1 updateLastSend:UpdateLastSendType_None];\
  9892. [msg1 update];\
  9893. [msg1 notifyNewMsg];\
  9894. [_wait stop];\
  9895. [_table reloadRow:(
  9896. \f2\b \cf8 int
  9897. \f0\b0 \cf4 )
  9898. \f2\b \cf8 self
  9899. \f0\b0 \cf4 .withdrawIndex section:\cf7 0\cf4 ];\
  9900. \f2\b \cf8 return
  9901. \f0\b0 \cf4 ;\
  9902. \}\
  9903. \
  9904. \f2\b \cf8 if
  9905. \f0\b0 \cf4 ([chatPerson.userId rangeOfString: msg.fromUserId].location != NSNotFound || [chatPerson.userId rangeOfString: msg.toUserId].location != NSNotFound || [msg.toUserId isEqualToString:
  9906. \f2\b \cf8 self
  9907. \f0\b0 \cf4 .roomJid] )\{\
  9908. \f2\b \cf8 for
  9909. \f0\b0 \cf4 (
  9910. \f2\b \cf8 int
  9911. \f0\b0 \cf4 i=(
  9912. \f2\b \cf8 int
  9913. \f0\b0 \cf4 )[_array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
  9914. JXMessageObject* p = [_array objectAtIndex:i];\
  9915. \f2\b \cf8 if
  9916. \f0\b0 \cf4 ([p.messageId isEqualToString:msg.messageId])\{\
  9917. \
  9918. JXBaseChatCell* cell = [
  9919. \f2\b \cf8 self
  9920. \f0\b0 \cf4 getCell:i];\
  9921. \f2\b \cf8 if
  9922. \f0\b0 \cf4 (p != msg) \{\
  9923. cell.msg = msg;\
  9924. \}\
  9925. \f2\b \cf8 if
  9926. \f0\b0 \cf4 (cell)\
  9927. [cell drawIsSend];\
  9928. \f2\b \cf8 break
  9929. \f0\b0 \cf4 ;\
  9930. \}\
  9931. p =
  9932. \f2\b \cf8 nil
  9933. \f0\b0 \cf4 ;\
  9934. \}\
  9935. \}\
  9936. \}\
  9937. \
  9938. \cf5 #pragma mark
  9939. \f2\b \cf16 sharemore
  9940. \f4 \'b0\'b4\'c5\'a5\'d7\'e9\'d0\'ad\'d2\'e9
  9941. \f0\b0 \cf4 \
  9942. \cf2 //
  9943. \f1 \'d5\'d5\'c6\'ac\'d1\'a1\'d4\'f1\'c6\'f7
  9944. \f0 \cf4 \
  9945. -(
  9946. \f2\b \cf8 void
  9947. \f0\b0 \cf4 )\cf11 pickPhoto\cf4 \
  9948. \{\
  9949. [
  9950. \f2\b \cf8 self
  9951. \f0\b0 \cf4 hideKeyboard:
  9952. \f2\b \cf8 YES
  9953. \f0\b0 \cf4 ];\
  9954. \f2\b \cf8 if
  9955. \f0\b0 \cf4 ([
  9956. \f2\b \cf8 self
  9957. \f0\b0 \cf4 showDisableSay])\
  9958. \f2\b \cf8 return
  9959. \f0\b0 \cf4 ;\
  9960. \f2\b \cf8 if
  9961. \f0\b0 \cf4 ([
  9962. \f2\b \cf8 self
  9963. \f0\b0 \cf4 sendMsgCheck])\{\
  9964. \f2\b \cf8 return
  9965. \f0\b0 \cf4 ;\
  9966. \}\
  9967. RITLPhotosViewController *photoController = RITLPhotosViewController.photosViewController;\
  9968. photoController.configuration.maxCount = \cf7 9\cf4 ;\cf2 //
  9969. \f1 \'d7\'ee\'b4\'f3\'b5\'c4\'d1\'a1\'d4\'f1\'ca\'fd\'c4\'bf
  9970. \f0 \cf4 \
  9971. photoController.configuration.containVideo =
  9972. \f2\b \cf8 YES
  9973. \f0\b0 \cf4 ;\cf2 //
  9974. \f1 \'d1\'a1\'d4\'f1\'c0\'e0\'d0\'cd\'a3\'ac\'c4\'bf\'c7\'b0\'d6\'bb\'d1\'a1\'d4\'f1\'cd\'bc\'c6\'ac\'b2\'bb\'d1\'a1\'d4\'f1\'ca\'d3\'c6\'b5
  9975. \f0 \cf4 \
  9976. \
  9977. photoController.photo_delegate =
  9978. \f2\b \cf8 self
  9979. \f0\b0 \cf4 ;\
  9980. photoController.thumbnailSize = CGSizeMake(\cf7 320\cf4 , \cf7 320\cf4 );\cf2 //
  9981. \f1 \'cb\'f5\'c2\'d4\'cd\'bc\'b5\'c4\'b3\'df\'b4\'e7
  9982. \f0 \cf4 \
  9983. \cf2 // photoController.defaultIdentifers = self.saveAssetIds;//
  9984. \f1 \'bc\'c7\'c2\'bc\'d2\'d1\'be\'ad\'d1\'a1\'d4\'f1\'b9\'fd\'b5\'c4\'d7\'ca\'d4\'b4
  9985. \f0 \cf4 \
  9986. \
  9987. [
  9988. \f2\b \cf8 self
  9989. \f0\b0 \cf4 presentViewController:photoController animated:
  9990. \f2\b \cf8 true
  9991. \f0\b0 \cf4 completion:^\{\}];\
  9992. \
  9993. \cf2 // UIImagePickerController *imgPicker=[[UIImagePickerController alloc]init];\cf4 \
  9994. \cf2 // [imgPicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];\cf4 \
  9995. \cf2 // [imgPicker setDelegate:self];\cf4 \
  9996. \cf2 // [imgPicker setAllowsEditing:NO];\cf4 \
  9997. \cf12 ///
  9998. \f3 \cf2 / [g_App.window addSubview:imgPicker.view];
  9999. \f0 \cf4 \
  10000. \cf2 //\cf4 \
  10001. \cf2 // [self presentViewController:imgPicker animated:YES completion:^\{\}];\cf4 \
  10002. \}\
  10003. \
  10004. - (
  10005. \f2\b \cf8 void
  10006. \f0\b0 \cf4 )\cf11 sendPhotos\cf4 :(NSArray <
  10007. \f2\b \cf8 id
  10008. \f0\b0 \cf4 > *)datas \cf11 withOriginal\cf4 :(
  10009. \f2\b \cf8 BOOL
  10010. \f0\b0 \cf4 )isOriginal\{\
  10011. \f2\b \cf8 if
  10012. \f0\b0 \cf4 (_isGroupSendCancel) \{\
  10013. \f2\b \cf8 return
  10014. \f0\b0 \cf4 ;\
  10015. \}\
  10016. NSString *userId =
  10017. \f2\b \cf8 self
  10018. \f0\b0 \cf4 .userIds[
  10019. \f2\b \cf8 self
  10020. \f0\b0 \cf4 .groupMessagesIndex];\
  10021. NSString *name = \cf6 @"jpg"\cf4 ;\
  10022. \f2\b \cf8 for
  10023. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < datas.count; i ++) \{\
  10024. UIImage *chosedImage = datas[i];\
  10025. \f2\b \cf8 int
  10026. \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
  10027. \f2\b \cf8 int
  10028. \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
  10029. NSString *file = [FileInfo getUUIDFileName:name];\
  10030. [g_server saveImageToFile:chosedImage file:file isOriginal:isOriginal];\
  10031. [
  10032. \f2\b \cf8 self
  10033. \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:userId];\
  10034. \}\
  10035. \f2\b \cf8 self
  10036. \f0\b0 \cf4 .groupMessagesIndex ++;\
  10037. \f2\b \cf8 if
  10038. \f0\b0 \cf4 (
  10039. \f2\b \cf8 self
  10040. \f0\b0 \cf4 .groupMessagesIndex <
  10041. \f2\b \cf8 self
  10042. \f0\b0 \cf4 .userIds.count) \{\
  10043. \f2\b \cf8 if
  10044. \f0\b0 \cf4 (
  10045. \f2\b \cf8 self
  10046. \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
  10047. \f2\b \cf8 return
  10048. \f0\b0 \cf4 ;\
  10049. \}
  10050. \f2\b \cf8 else
  10051. \f0\b0 \cf4 \{\
  10052. [
  10053. \f2\b \cf8 self
  10054. \f0\b0 \cf4 sendPhotos:datas withOriginal:isOriginal];\
  10055. \}\
  10056. \}
  10057. \f2\b \cf8 else
  10058. \f0\b0 \cf4
  10059. \f2\b \cf8 if
  10060. \f0\b0 \cf4 (
  10061. \f2\b \cf8 self
  10062. \f0\b0 \cf4 .userIds)\{\
  10063. \f2\b \cf8 self
  10064. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  10065. \f2\b \cf8 return
  10066. \f0\b0 \cf4 ;\
  10067. \}\
  10068. \f2\b \cf8 return
  10069. \f0\b0 \cf4 ;\
  10070. \
  10071. \}\
  10072. \
  10073. - (
  10074. \f2\b \cf8 void
  10075. \f0\b0 \cf4 )\cf11 photosViewController\cf4 :(UIViewController *)viewController \cf11 assets\cf4 :(NSArray <PHAsset *> *)assets \{\
  10076. \f2\b \cf8 self
  10077. \f0\b0 \cf4 .imgDataArr = assets;\
  10078. \
  10079. \}\
  10080. \
  10081. \cf5 #pragma mark
  10082. \f2\b \cf16 -
  10083. \f4 \'b7\'a2\'cb\'cd\'cd\'bc\'c6\'ac
  10084. \f0\b0 \cf4 \
  10085. - (
  10086. \f2\b \cf8 void
  10087. \f0\b0 \cf4 )\cf11 photosViewController\cf4 :(UIViewController *)viewController \cf11 datas\cf4 :(NSArray <
  10088. \f2\b \cf8 id
  10089. \f0\b0 \cf4 > *)datas; \{\
  10090. \f2\b \cf8 if
  10091. \f0\b0 \cf4 (
  10092. \f2\b \cf8 self
  10093. \f0\b0 \cf4 .isGroupMessages) \{\
  10094. \f2\b \cf8 return
  10095. \f0\b0 \cf4 ;\
  10096. \cf2 // if (datas.count == 0) \{\cf4 \
  10097. \cf2 // return;\cf4 \
  10098. \cf2 // \}\cf4 \
  10099. \}
  10100. \f2\b \cf8 else
  10101. \f0\b0 \cf4 \{\
  10102. \f2\b \cf8 for
  10103. \f0\b0 \cf4 (
  10104. \f2\b \cf8 int
  10105. \f0\b0 \cf4 i = \cf7 0\cf4 ; i < datas.count; i++) \{\
  10106. \f2\b \cf8 BOOL
  10107. \f0\b0 \cf4 isGif = [datas[i] isKindOfClass:[NSData
  10108. \f2\b \cf8 class
  10109. \f0\b0 \cf4 ]];\
  10110. \
  10111. \f2\b \cf8 if
  10112. \f0\b0 \cf4 (isGif) \{\
  10113. \cf2 // GIF\cf4 \
  10114. NSString *file = [FileInfo getUUIDFileName:\cf6 @"gif"\cf4 ];\
  10115. [g_server saveDataToFile:datas[i] file:file];\
  10116. [
  10117. \f2\b \cf8 self
  10118. \f0\b0 \cf4 sendImage:file withWidth:\cf7 0\cf4 andHeight:\cf7 0\cf4 userId:
  10119. \f2\b \cf8 nil
  10120. \f0\b0 \cf4 ];\
  10121. \
  10122. \}
  10123. \f2\b \cf8 else
  10124. \f0\b0 \cf4 \{\
  10125. \cf2 //
  10126. \f1 \'c6\'d5\'cd\'a8\'cd\'bc\'c6\'ac
  10127. \f0 \cf4 \
  10128. UIImage *chosedImage = datas[i];\
  10129. \cf2 //
  10130. \f1 \'bb\'f1\'c8\'a1
  10131. \f0 image
  10132. \f1 \'b5\'c4\'b3\'a4\'bf\'ed
  10133. \f0 \cf4 \
  10134. \f2\b \cf8 int
  10135. \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
  10136. \f2\b \cf8 int
  10137. \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
  10138. NSString *name = \cf6 @"jpg"\cf4 ;\
  10139. NSString *file = [FileInfo getUUIDFileName:name];\
  10140. [g_server saveImageToFile:chosedImage file:file isOriginal:
  10141. \f2\b \cf8 YES
  10142. \f0\b0 \cf4 ];\
  10143. [
  10144. \f2\b \cf8 self
  10145. \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:
  10146. \f2\b \cf8 nil
  10147. \f0\b0 \cf4 ];\
  10148. \}\
  10149. \}\
  10150. \}\
  10151. \}\
  10152. \
  10153. \cf5 #pragma mark
  10154. \f2\b \cf16 -
  10155. \f4 \'b7\'a2\'cb\'cd\'ca\'d3\'c6\'b5
  10156. \f0\b0 \cf4 \
  10157. - (
  10158. \f2\b \cf8 void
  10159. \f0\b0 \cf4 )\cf11 photosViewController\cf4 :(UIViewController *)viewController \cf11 media\cf4 :(JXMediaObject *)media \{\
  10160. \f2\b \cf8 if
  10161. \f0\b0 \cf4 (
  10162. \f2\b \cf8 self
  10163. \f0\b0 \cf4 .isGroupMessages) \{\
  10164. \f2\b \cf8 return
  10165. \f0\b0 \cf4 ;\
  10166. \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
  10167. \cf2 // NSString *userId = self.userIds[i];\cf4 \
  10168. \cf2 //\cf4 \
  10169. \cf2 // [self sendMedia:media userId:userId];\cf4 \
  10170. \cf12 ///
  10171. \f3 \cf2 / [g_server uploadFile:media.fileName validTime:self.chatPerson.chatRecordTimeOut messageId:self.curMessageId toView:self];
  10172. \f0 \cf4 \
  10173. \cf2 // \}\cf4 \
  10174. \}
  10175. \f2\b \cf8 else
  10176. \f0\b0 \cf4 \{\
  10177. [
  10178. \f2\b \cf8 self
  10179. \f0\b0 \cf4 sendMedia:media userId:
  10180. \f2\b \cf8 nil
  10181. \f0\b0 \cf4 ];\
  10182. \cf2 // [g_server uploadFile:media.fileName validTime:self.chatPerson.chatRecordTimeOut messageId:self.curMessageId toView:self];\cf4 \
  10183. \}\
  10184. \}\
  10185. \
  10186. - (
  10187. \f2\b \cf8 void
  10188. \f0\b0 \cf4 )\cf11 photosViewController\cf4 :(UIViewController *)viewController \cf11 imageAndVideos\cf4 :(NSDictionary *)imageAndVideosDic\{\
  10189. \f2\b \cf8 if
  10190. \f0\b0 \cf4 (!
  10191. \f2\b \cf8 self
  10192. \f0\b0 \cf4 .isGroupMessages) \{\
  10193. \f2\b \cf8 return
  10194. \f0\b0 \cf4 ;\
  10195. \}\
  10196. NSArray *imageArr = [imageAndVideosDic objectForKey:\cf6 @"images"\cf4 ];\
  10197. NSArray *mediaArr = [imageAndVideosDic objectForKey:\cf6 @"videos"\cf4 ];\
  10198. NSInteger num = imageArr.count + mediaArr.count;\
  10199. [
  10200. \f2\b \cf8 self
  10201. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:num withType:groupsend_msgType_imagesAndVideos];\
  10202. \f2\b \cf8 self
  10203. \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithArray:imageArr];\
  10204. [
  10205. \f2\b \cf8 self
  10206. \f0\b0 \cf4 .groupUploadObjArray addObjectsFromArray:mediaArr];\
  10207. _onceSendNum = \cf7 20\cf4 ;\
  10208. \f2\b \cf8 if
  10209. \f0\b0 \cf4 (imageArr.count + mediaArr.count > \cf7 1\cf4 ) \{\
  10210. _onceSendNum = \cf7 1\cf4 ;\
  10211. \}\
  10212. \f2\b \cf8 if
  10213. \f0\b0 \cf4 (mediaArr.count > \cf7 0\cf4 ) \{\
  10214. _onceSendNum = \cf7 1\cf4 ;\
  10215. \}\
  10216. \f2\b \cf8 self
  10217. \f0\b0 \cf4 .imgsAndVideosDic = imageAndVideosDic;\
  10218. [
  10219. \f2\b \cf8 self
  10220. \f0\b0 \cf4 sendImagesAndVideos:imageAndVideosDic];\
  10221. \}\
  10222. \
  10223. - (
  10224. \f2\b \cf8 void
  10225. \f0\b0 \cf4 )\cf11 sendMedias\cf4 :(NSArray *)mediaArray \cf11 isSave\cf4 :(
  10226. \f2\b \cf8 BOOL
  10227. \f0\b0 \cf4 )isSave\{\
  10228. \f2\b \cf8 if
  10229. \f0\b0 \cf4 (_isGroupSendCancel) \{\
  10230. \f2\b \cf8 return
  10231. \f0\b0 \cf4 ;\
  10232. \}\
  10233. NSString *userId =
  10234. \f2\b \cf8 self
  10235. \f0\b0 \cf4 .userIds[
  10236. \f2\b \cf8 self
  10237. \f0\b0 \cf4 .groupMessagesIndex];\
  10238. JXMediaObject *media = mediaArray.lastObject;\
  10239. [
  10240. \f2\b \cf8 self
  10241. \f0\b0 \cf4 sendMedia:media userId:userId];\
  10242. \f2\b \cf8 if
  10243. \f0\b0 \cf4 (isSave) \{\
  10244. [
  10245. \f2\b \cf8 self
  10246. \f0\b0 \cf4 saveVideo:media.fileName];\
  10247. \}\
  10248. \f2\b \cf8 self
  10249. \f0\b0 \cf4 .groupMessagesIndex ++;\
  10250. \f2\b \cf8 if
  10251. \f0\b0 \cf4 (
  10252. \f2\b \cf8 self
  10253. \f0\b0 \cf4 .groupMessagesIndex <
  10254. \f2\b \cf8 self
  10255. \f0\b0 \cf4 .userIds.count) \{\
  10256. \f2\b \cf8 if
  10257. \f0\b0 \cf4 (
  10258. \f2\b \cf8 self
  10259. \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
  10260. \f2\b \cf8 return
  10261. \f0\b0 \cf4 ;\
  10262. \}
  10263. \f2\b \cf8 else
  10264. \f0\b0 \cf4 \{\
  10265. [
  10266. \f2\b \cf8 self
  10267. \f0\b0 \cf4 sendMedias:mediaArray isSave:isSave];\
  10268. \}\
  10269. \}
  10270. \f2\b \cf8 else
  10271. \f0\b0 \cf4
  10272. \f2\b \cf8 if
  10273. \f0\b0 \cf4 (
  10274. \f2\b \cf8 self
  10275. \f0\b0 \cf4 .userIds)\{\
  10276. \f2\b \cf8 self
  10277. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  10278. \f2\b \cf8 return
  10279. \f0\b0 \cf4 ;\
  10280. \}\
  10281. \}\
  10282. \
  10283. - (
  10284. \f2\b \cf8 void
  10285. \f0\b0 \cf4 )\cf11 sendImagesAndVideos\cf4 :(NSDictionary *)imageAndVideosDic\{\
  10286. \f2\b \cf8 if
  10287. \f0\b0 \cf4 (_isGroupSendCancel) \{\
  10288. \f2\b \cf8 return
  10289. \f0\b0 \cf4 ;\
  10290. \}\
  10291. NSString *userId =
  10292. \f2\b \cf8 self
  10293. \f0\b0 \cf4 .userIds[
  10294. \f2\b \cf8 self
  10295. \f0\b0 \cf4 .groupMessagesIndex];\
  10296. NSArray *imageArr = [imageAndVideosDic objectForKey:\cf6 @"images"\cf4 ];\
  10297. NSArray *mediaArr = [imageAndVideosDic objectForKey:\cf6 @"videos"\cf4 ];\
  10298. \f2\b \cf8 if
  10299. \f0\b0 \cf4 (imageArr.count > \cf7 0\cf4 ) \{\
  10300. NSString *name = \cf6 @"jpg"\cf4 ;\
  10301. \f2\b \cf8 for
  10302. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < imageArr.count; i++) \{\
  10303. \f2\b \cf8 BOOL
  10304. \f0\b0 \cf4 isGif = [imageArr[i] isKindOfClass:[NSData
  10305. \f2\b \cf8 class
  10306. \f0\b0 \cf4 ]];\
  10307. \f2\b \cf8 if
  10308. \f0\b0 \cf4 (isGif) \{\
  10309. NSString *file = [FileInfo getUUIDFileName:\cf6 @"gif"\cf4 ];\
  10310. [g_server saveDataToFile:imageArr[i] file:file];\
  10311. [
  10312. \f2\b \cf8 self
  10313. \f0\b0 \cf4 sendImage:file withWidth:\cf7 0\cf4 andHeight:\cf7 0\cf4 userId:
  10314. \f2\b \cf8 nil
  10315. \f0\b0 \cf4 ];\
  10316. \}
  10317. \f2\b \cf8 else
  10318. \f0\b0 \cf4 \{\
  10319. UIImage *chosedImage = imageArr[i];\
  10320. \f2\b \cf8 int
  10321. \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
  10322. \f2\b \cf8 int
  10323. \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
  10324. NSString *file = [FileInfo getUUIDFileName:name];\
  10325. [g_server saveImageToFile:chosedImage file:file isOriginal:
  10326. \f2\b \cf8 YES
  10327. \f0\b0 \cf4 ];\
  10328. [
  10329. \f2\b \cf8 self
  10330. \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:userId];\
  10331. \}\
  10332. \}\
  10333. \}\
  10334. \f2\b \cf8 if
  10335. \f0\b0 \cf4 (mediaArr.count > \cf7 0\cf4 ) \{\
  10336. \f2\b \cf8 for
  10337. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < mediaArr.count; i++) \{\
  10338. JXMediaObject *media = mediaArr[i];\
  10339. [
  10340. \f2\b \cf8 self
  10341. \f0\b0 \cf4 sendMedia:media userId:userId];\
  10342. \}\
  10343. \}\
  10344. \f2\b \cf8 self
  10345. \f0\b0 \cf4 .groupMessagesIndex ++;\
  10346. \f2\b \cf8 if
  10347. \f0\b0 \cf4 (
  10348. \f2\b \cf8 self
  10349. \f0\b0 \cf4 .groupMessagesIndex <
  10350. \f2\b \cf8 self
  10351. \f0\b0 \cf4 .userIds.count) \{\
  10352. \f2\b \cf8 if
  10353. \f0\b0 \cf4 (_onceSendNum == \cf7 1\cf4 ||
  10354. \f2\b \cf8 self
  10355. \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
  10356. \f2\b \cf8 return
  10357. \f0\b0 \cf4 ;\
  10358. \}
  10359. \f2\b \cf8 else
  10360. \f0\b0 \cf4 \{\
  10361. [
  10362. \f2\b \cf8 self
  10363. \f0\b0 \cf4 sendImagesAndVideos:imageAndVideosDic];\
  10364. \}\
  10365. \}
  10366. \f2\b \cf8 else
  10367. \f0\b0 \cf4
  10368. \f2\b \cf8 if
  10369. \f0\b0 \cf4 (
  10370. \f2\b \cf8 self
  10371. \f0\b0 \cf4 .userIds)\{\
  10372. \f2\b \cf8 self
  10373. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  10374. \f2\b \cf8 return
  10375. \f0\b0 \cf4 ;\
  10376. \}\
  10377. \}\
  10378. \
  10379. -(
  10380. \f2\b \cf8 void
  10381. \f0\b0 \cf4 )\cf11 onCamera\cf4 \{\
  10382. [
  10383. \f2\b \cf8 self
  10384. \f0\b0 \cf4 hideKeyboard:
  10385. \f2\b \cf8 YES
  10386. \f0\b0 \cf4 ];\
  10387. \
  10388. \f2\b \cf8 if
  10389. \f0\b0 \cf4 (![
  10390. \f2\b \cf8 self
  10391. \f0\b0 \cf4 checkCameraLimits]) \{\
  10392. \f2\b \cf8 return
  10393. \f0\b0 \cf4 ;\
  10394. \}\
  10395. \f2\b \cf8 if
  10396. \f0\b0 \cf4 ([
  10397. \f2\b \cf8 self
  10398. \f0\b0 \cf4 showDisableSay])\
  10399. \f2\b \cf8 return
  10400. \f0\b0 \cf4 ;\
  10401. \f2\b \cf8 if
  10402. \f0\b0 \cf4 ([
  10403. \f2\b \cf8 self
  10404. \f0\b0 \cf4 sendMsgCheck])\{\
  10405. \f2\b \cf8 return
  10406. \f0\b0 \cf4 ;\
  10407. \}\
  10408. \
  10409. JXCameraVC *vc = [[JXCameraVC alloc] init];\
  10410. vc.cameraDelegate =
  10411. \f2\b \cf8 self
  10412. \f0\b0 \cf4 ;\
  10413. [
  10414. \f2\b \cf8 self
  10415. \f0\b0 \cf4 presentViewController:vc animated:
  10416. \f2\b \cf8 YES
  10417. \f0\b0 \cf4 completion:
  10418. \f2\b \cf8 nil
  10419. \f0\b0 \cf4 ];\
  10420. \
  10421. \cf2 // UIImagePickerController *imgPicker=[[UIImagePickerController alloc]init];\cf4 \
  10422. \cf2 // [imgPicker setSourceType:UIImagePickerControllerSourceTypeCamera];\cf4 \
  10423. \cf2 // [imgPicker setDelegate:self];\cf4 \
  10424. \cf2 // [imgPicker setAllowsEditing:NO];\cf4 \
  10425. \cf2 // // [g_App.window addSubview:imgPicker.view];\cf4 \
  10426. \cf2 //\cf4 \
  10427. \cf2 // [self presentViewController:imgPicker animated:YES completion:^\{\}];\cf4 \
  10428. \
  10429. \}\
  10430. \
  10431. \cf2 //
  10432. \f1 \'b4\'c1\'d2\'bb\'b4\'c1\'b6\'af\'bb\'ad
  10433. \f0 \cf4 \
  10434. - (
  10435. \f2\b \cf8 void
  10436. \f0\b0 \cf4 )\cf11 onShake\cf4 \{\
  10437. XLsn0wInputBox *inputBox = [[XLsn0wInputBox alloc] init];\
  10438. NSString *name = chatPerson.remarkName.length > \cf7 0\cf4 ? chatPerson.remarkName : chatPerson.userNickname;\
  10439. \f2\b \cf8 if
  10440. \f0\b0 \cf4 (
  10441. \f2\b \cf8 self
  10442. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
  10443. inputBox.title.text = [NSString stringWithFormat:\cf6 @"
  10444. \f1 \'c4\'fa\'c8\'b7\'b6\'a8\'d2\'aa\'b4\'c1\'c8\'ba\'c4\'da\'cb\'f9\'d3\'d0\'c8\'cb\'c2\'f0
  10445. \f0 ?"\cf4 ];\
  10446. \}
  10447. \f2\b \cf8 else
  10448. \f0\b0 \cf4 \{\
  10449. inputBox.title.text = [NSString stringWithFormat:\cf6 @"
  10450. \f1 \'c4\'fa\'d2\'aa\'b4\'c1
  10451. \f0 %@
  10452. \f1 \'c9\'cf\'cf\'df\'c2\'f0
  10453. \f0 ?"\cf4 ,name];\
  10454. \}\
  10455. inputBox.placeholder = \cf6 @"
  10456. \f1 \'cc\'ee\'d0\'b4
  10457. \f0 \\"
  10458. \f1 \'d5\'f0
  10459. \f0 \\"
  10460. \f1 \'c4\'da\'c8\'dd\'bb\'f2\'b5\'e3\'bb\'f7
  10461. \f0 \\"
  10462. \f1 \'c8\'b7\'b6\'a8
  10463. \f0 \\"
  10464. \f1 \'d6\'b1\'bd\'d3\'d5\'f0
  10465. \f0 "\cf4 ;\
  10466. [inputBox confirmBtnClickBlock:^(NSString *inputString) \{\
  10467. [
  10468. \f2\b \cf8 self
  10469. \f0\b0 \cf4 showShakeMessage:inputString];\
  10470. \}];\
  10471. [inputBox show];\
  10472. \}\
  10473. \cf2 //
  10474. \f1 \'c1\'c4\'cc\'ec\'b4\'c1\'d2\'bb\'b4\'c1
  10475. \f0 \cf4 \
  10476. - (
  10477. \f2\b \cf8 void
  10478. \f0\b0 \cf4 )\cf11 showShakeMessage\cf4 :(NSString *)message \{\
  10479. \f2\b \cf8 if
  10480. \f0\b0 \cf4 ([
  10481. \f2\b \cf8 self
  10482. \f0\b0 \cf4 showDisableSay])\
  10483. \f2\b \cf8 return
  10484. \f0\b0 \cf4 ;\
  10485. \f2\b \cf8 if
  10486. \f0\b0 \cf4 ([
  10487. \f2\b \cf8 self
  10488. \f0\b0 \cf4 sendMsgCheck])\{\
  10489. \f2\b \cf8 return
  10490. \f0\b0 \cf4 ;\
  10491. \}\
  10492. \
  10493. \f2\b \cf8 if
  10494. \f0\b0 \cf4 (
  10495. \f2\b \cf8 self
  10496. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
  10497. \cf2 // [JXMyTools showTipView:@"
  10498. \f1 \'c8\'ba\'d7\'e9\'d4\'dd\'b2\'bb\'d6\'a7\'b3\'d6\'b8\'c3\'b9\'a6\'c4\'dc\'a3\'a1
  10499. \f0 "];\cf4 \
  10500. \cf2 // return;\cf4 \
  10501. \
  10502. \}\
  10503. \f2\b \cf8 if
  10504. \f0\b0 \cf4 (
  10505. \f2\b \cf8 self
  10506. \f0\b0 \cf4 .isGroupMessages) \{\
  10507. \f2\b \cf8 if
  10508. \f0\b0 \cf4 (_isGroupSendCancel) \{\
  10509. \f2\b \cf8 return
  10510. \f0\b0 \cf4 ;\
  10511. \}\
  10512. \f2\b \cf8 if
  10513. \f0\b0 \cf4 (
  10514. \f2\b \cf8 self
  10515. \f0\b0 \cf4 .groupMessagesIndex == \cf7 0\cf4 ) \{\
  10516. [
  10517. \f2\b \cf8 self
  10518. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_shake];\
  10519. _onceSendNum = \cf7 20\cf4 ;\
  10520. \}\
  10521. \}\
  10522. \
  10523. NSString *userId =
  10524. \f2\b \cf8 self
  10525. \f0\b0 \cf4 .userIds[
  10526. \f2\b \cf8 self
  10527. \f0\b0 \cf4 .groupMessagesIndex];\
  10528. \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
  10529. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  10530. msg.timeSend = [NSDate date];\
  10531. msg.fromUserId = MY_USER_ID;\
  10532. \f2\b \cf8 if
  10533. \f0\b0 \cf4 ([
  10534. \f2\b \cf8 self
  10535. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  10536. msg.toUserId =
  10537. \f2\b \cf8 self
  10538. \f0\b0 \cf4 .roomJid;\
  10539. msg.isGroup =
  10540. \f2\b \cf8 YES
  10541. \f0\b0 \cf4 ;\
  10542. msg.fromUserName = _userNickName;\
  10543. \}\
  10544. \f2\b \cf8 else
  10545. \f0\b0 \cf4 \{\
  10546. \f2\b \cf8 if
  10547. \f0\b0 \cf4 (
  10548. \f2\b \cf8 self
  10549. \f0\b0 \cf4 .isGroupMessages) \{\
  10550. msg.toUserId = userId;\
  10551. msg.isGroupSend =
  10552. \f2\b \cf8 YES
  10553. \f0\b0 \cf4 ;\
  10554. \f2\b \cf8 if
  10555. \f0\b0 \cf4 ((
  10556. \f2\b \cf8 self
  10557. \f0\b0 \cf4 .groupMessagesIndex + \cf7 1\cf4 ) % _onceSendNum == \cf7 0\cf4 ) \{\
  10558. msg.isLastGroupSend =
  10559. \f2\b \cf8 YES
  10560. \f0\b0 \cf4 ;\
  10561. \}\
  10562. \}
  10563. \f2\b \cf8 else
  10564. \f0\b0 \cf4 \{\
  10565. msg.toUserId = chatPerson.userId;\
  10566. \}\
  10567. msg.isGroup =
  10568. \f2\b \cf8 NO
  10569. \f0\b0 \cf4 ;\
  10570. \}\
  10571. msg.content = message;\
  10572. msg.type = [NSNumber numberWithInt:kWCMessageTypeShake];\
  10573. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  10574. msg.isRead = [NSNumber numberWithBool:
  10575. \f2\b \cf8 NO
  10576. \f0\b0 \cf4 ];\
  10577. msg.isReadDel = [NSNumber numberWithInt:
  10578. \f2\b \cf8 NO
  10579. \f0\b0 \cf4 ];\
  10580. \f2\b \cf8 if
  10581. \f0\b0 \cf4 (_useInfoTempChat==\cf7 11\cf4 ) \{\
  10582. \
  10583. msg.tempChat = \cf7 11\cf4 ;\
  10584. \}
  10585. \f2\b \cf8 else
  10586. \f0\b0 \cf4 \
  10587. \{\
  10588. \
  10589. msg.tempChat = \cf7 1\cf4 ;\
  10590. \}\
  10591. \cf2 //
  10592. \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
  10593. \f0 \cf4 \
  10594. [msg insert:
  10595. \f2\b \cf8 self
  10596. \f0\b0 \cf4 .roomJid];\
  10597. [g_xmpp sendMessage:msg roomName:
  10598. \f2\b \cf8 self
  10599. \f0\b0 \cf4 .roomJid];\cf2 //
  10600. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  10601. \f0 \cf4 \
  10602. \
  10603. \f2\b \cf8 if
  10604. \f0\b0 \cf4 (
  10605. \f2\b \cf8 self
  10606. \f0\b0 \cf4 .isGroupMessages) \{\
  10607. _groupSendType = groupsend_msgType_shake;\
  10608. \f2\b \cf8 self
  10609. \f0\b0 \cf4 .groupMessagesIndex ++;\
  10610. \f2\b \cf8 if
  10611. \f0\b0 \cf4 (msg.isLastGroupSend) \{\
  10612. \f2\b \cf8 return
  10613. \f0\b0 \cf4 ;\
  10614. \}\
  10615. \f2\b \cf8 if
  10616. \f0\b0 \cf4 (
  10617. \f2\b \cf8 self
  10618. \f0\b0 \cf4 .groupMessagesIndex <
  10619. \f2\b \cf8 self
  10620. \f0\b0 \cf4 .userIds.count) \{\
  10621. [
  10622. \f2\b \cf8 self
  10623. \f0\b0 \cf4 onShake];\
  10624. \}
  10625. \f2\b \cf8 else
  10626. \f0\b0 \cf4
  10627. \f2\b \cf8 if
  10628. \f0\b0 \cf4 (
  10629. \f2\b \cf8 self
  10630. \f0\b0 \cf4 .userIds)\{\
  10631. \f2\b \cf8 self
  10632. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  10633. \f2\b \cf8 return
  10634. \f0\b0 \cf4 ;\
  10635. \}\
  10636. \f2\b \cf8 return
  10637. \f0\b0 \cf4 ;\
  10638. \}\
  10639. [
  10640. \f2\b \cf8 self
  10641. \f0\b0 \cf4 showOneMsg:msg];\
  10642. \}\
  10643. \
  10644. \cf2 //
  10645. \f1 \'b7\'a2\'cb\'cd\'ca\'d5\'b2\'d8
  10646. \f0 \cf4 \
  10647. - (
  10648. \f2\b \cf8 void
  10649. \f0\b0 \cf4 )\cf11 onCollection\cf4 \{\
  10650. \f2\b \cf8 if
  10651. \f0\b0 \cf4 ([
  10652. \f2\b \cf8 self
  10653. \f0\b0 \cf4 showDisableSay])\
  10654. \f2\b \cf8 return
  10655. \f0\b0 \cf4 ;\
  10656. \f2\b \cf8 if
  10657. \f0\b0 \cf4 ([
  10658. \f2\b \cf8 self
  10659. \f0\b0 \cf4 sendMsgCheck])\{\
  10660. \f2\b \cf8 return
  10661. \f0\b0 \cf4 ;\
  10662. \}\
  10663. WeiboViewControlle * collection = [[WeiboViewControlle alloc] initCollection];\
  10664. collection.delegate =
  10665. \f2\b \cf8 self
  10666. \f0\b0 \cf4 ;\
  10667. collection.isSend =
  10668. \f2\b \cf8 YES
  10669. \f0\b0 \cf4 ;\
  10670. [g_navigation pushViewController:collection animated:
  10671. \f2\b \cf8 YES
  10672. \f0\b0 \cf4 ];\
  10673. \}\
  10674. \
  10675. \cf2 //
  10676. \f1 \'b7\'a2\'cb\'cd\'ca\'d6\'bb\'fa\'c1\'aa\'cf\'b5\'c8\'cb
  10677. \f0 \cf4 \
  10678. - (
  10679. \f2\b \cf8 void
  10680. \f0\b0 \cf4 )\cf11 onAddressBook\cf4 \{\
  10681. JXSelectAddressBookVC *vc = [[JXSelectAddressBookVC alloc] init];\
  10682. vc.delegate =
  10683. \f2\b \cf8 self
  10684. \f0\b0 \cf4 ;\
  10685. [g_navigation pushViewController:vc animated:
  10686. \f2\b \cf8 YES
  10687. \f0\b0 \cf4 ];\
  10688. \}\
  10689. \
  10690. \cf2 //
  10691. \f1 \'c8\'ba\'d6\'fa\'ca\'d6
  10692. \f0 \cf4 \
  10693. - (
  10694. \f2\b \cf8 void
  10695. \f0\b0 \cf4 )\cf11 onGroupHelper\cf4 \{\
  10696. [g_server queryGroupHelper:
  10697. \f2\b \cf8 self
  10698. \f0\b0 \cf4 .roomId toView:
  10699. \f2\b \cf8 self
  10700. \f0\b0 \cf4 ];\
  10701. \}\
  10702. \
  10703. \cf2 //
  10704. \f1 \'cc\'f8\'d7\'aa\'c8\'ba\'d6\'fa\'ca\'d6\'c1\'d0\'b1\'ed
  10705. \f0 \cf4 \
  10706. - (
  10707. \f2\b \cf8 void
  10708. \f0\b0 \cf4 )\cf11 onGroupHelperList\cf4 \{\
  10709. JXGroupHelperListVC *vc = [[JXGroupHelperListVC alloc] init];\
  10710. vc.roomJid =
  10711. \f2\b \cf8 self
  10712. \f0\b0 \cf4 .roomJid;\
  10713. vc.roomId =
  10714. \f2\b \cf8 self
  10715. \f0\b0 \cf4 .roomId;\
  10716. [g_navigation pushViewController:vc animated:
  10717. \f2\b \cf8 YES
  10718. \f0\b0 \cf4 ];\
  10719. \}\
  10720. \
  10721. - (
  10722. \f2\b \cf8 void
  10723. \f0\b0 \cf4 )\cf11 selectAddressBookVC\cf4 :(JXSelectAddressBookVC *)selectVC \cf11 doneAction\cf4 :(NSArray *)array \{\
  10724. \
  10725. NSString *userId =
  10726. \f2\b \cf8 self
  10727. \f0\b0 \cf4 .userIds[
  10728. \f2\b \cf8 self
  10729. \f0\b0 \cf4 .groupMessagesIndex];\
  10730. \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
  10731. \f2\b \cf8 if
  10732. \f0\b0 \cf4 (
  10733. \f2\b \cf8 self
  10734. \f0\b0 \cf4 .isGroupMessages) \{\
  10735. \f2\b \cf8 if
  10736. \f0\b0 \cf4 (_isGroupSendCancel) \{\
  10737. \f2\b \cf8 return
  10738. \f0\b0 \cf4 ;\
  10739. \}\
  10740. \f2\b \cf8 if
  10741. \f0\b0 \cf4 (
  10742. \f2\b \cf8 self
  10743. \f0\b0 \cf4 .groupMessagesIndex == \cf7 0\cf4 ) \{\
  10744. [
  10745. \f2\b \cf8 self
  10746. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:array.count withType:groupsend_msgType_addressbook];\
  10747. _onceSendNum = \cf7 20\cf4 ;\
  10748. \f2\b \cf8 self
  10749. \f0\b0 \cf4 .groupSendMsgArray = [NSMutableArray arrayWithArray:array];\
  10750. \f2\b \cf8 self
  10751. \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:selectVC];\
  10752. \}\
  10753. \}\
  10754. \
  10755. \f2\b \cf8 BOOL
  10756. \f0\b0 \cf4 isLastGroupSend =
  10757. \f2\b \cf8 NO
  10758. \f0\b0 \cf4 ;\
  10759. \f2\b \cf8 for
  10760. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ;i < array.count;i++)\{\
  10761. JXAddressBook *address = array[i];\
  10762. \
  10763. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  10764. msg.timeSend = [NSDate date];\
  10765. msg.fromUserId = MY_USER_ID;\
  10766. \f2\b \cf8 if
  10767. \f0\b0 \cf4 ([
  10768. \f2\b \cf8 self
  10769. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  10770. msg.toUserId =
  10771. \f2\b \cf8 self
  10772. \f0\b0 \cf4 .roomJid;\
  10773. msg.isGroup =
  10774. \f2\b \cf8 YES
  10775. \f0\b0 \cf4 ;\
  10776. msg.fromUserName = _userNickName;\
  10777. \}\
  10778. \f2\b \cf8 else
  10779. \f0\b0 \cf4 \{\
  10780. \f2\b \cf8 if
  10781. \f0\b0 \cf4 (
  10782. \f2\b \cf8 self
  10783. \f0\b0 \cf4 .isGroupMessages) \{\
  10784. msg.toUserId = userId;\
  10785. msg.isGroupSend =
  10786. \f2\b \cf8 YES
  10787. \f0\b0 \cf4 ;\
  10788. \f2\b \cf8 if
  10789. \f0\b0 \cf4 ((
  10790. \f2\b \cf8 self
  10791. \f0\b0 \cf4 .groupMessagesIndex + \cf7 1\cf4 ) % _onceSendNum == \cf7 0\cf4 ) \{\
  10792. \f2\b \cf8 if
  10793. \f0\b0 \cf4 (i == array.count - \cf7 1\cf4 ) \{\
  10794. msg.isLastGroupSend =
  10795. \f2\b \cf8 YES
  10796. \f0\b0 \cf4 ;\
  10797. isLastGroupSend =
  10798. \f2\b \cf8 YES
  10799. \f0\b0 \cf4 ;\
  10800. \}\
  10801. \}\
  10802. \}
  10803. \f2\b \cf8 else
  10804. \f0\b0 \cf4 \{\
  10805. msg.toUserId = chatPerson.userId;\
  10806. \}\
  10807. msg.isGroup =
  10808. \f2\b \cf8 NO
  10809. \f0\b0 \cf4 ;\
  10810. \}\
  10811. msg.content = [NSString stringWithFormat:\cf6 @"%@\\n%@"\cf4 , address.addressBookName, address.toTelephone];\
  10812. msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
  10813. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  10814. msg.isRead = [NSNumber numberWithBool:
  10815. \f2\b \cf8 NO
  10816. \f0\b0 \cf4 ];\
  10817. msg.isReadDel = [NSNumber numberWithInt:
  10818. \f2\b \cf8 NO
  10819. \f0\b0 \cf4 ];\
  10820. \
  10821. [msg insert:
  10822. \f2\b \cf8 self
  10823. \f0\b0 \cf4 .roomJid];\
  10824. \
  10825. \f2\b \cf8 if
  10826. \f0\b0 \cf4 (_useInfoTempChat==\cf7 11\cf4 ) \{\
  10827. \
  10828. msg.tempChat = \cf7 11\cf4 ;\
  10829. \}
  10830. \f2\b \cf8 else
  10831. \f0\b0 \cf4 \
  10832. \{\
  10833. \
  10834. msg.tempChat = \cf7 1\cf4 ;\
  10835. \}\
  10836. [g_xmpp sendMessage:msg roomName:
  10837. \f2\b \cf8 self
  10838. \f0\b0 \cf4 .roomJid];\cf2 //
  10839. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  10840. \f0 \cf4 \
  10841. [
  10842. \f2\b \cf8 self
  10843. \f0\b0 \cf4 showOneMsg:msg];\
  10844. \}\
  10845. \
  10846. \f2\b \cf8 if
  10847. \f0\b0 \cf4 (
  10848. \f2\b \cf8 self
  10849. \f0\b0 \cf4 .isGroupMessages) \{\
  10850. _groupSendType = groupsend_msgType_addressbook;\
  10851. \f2\b \cf8 self
  10852. \f0\b0 \cf4 .groupMessagesIndex ++;\
  10853. \f2\b \cf8 if
  10854. \f0\b0 \cf4 (isLastGroupSend) \{\
  10855. \f2\b \cf8 return
  10856. \f0\b0 \cf4 ;\
  10857. \}\
  10858. \f2\b \cf8 if
  10859. \f0\b0 \cf4 (
  10860. \f2\b \cf8 self
  10861. \f0\b0 \cf4 .groupMessagesIndex <
  10862. \f2\b \cf8 self
  10863. \f0\b0 \cf4 .userIds.count) \{\
  10864. [
  10865. \f2\b \cf8 self
  10866. \f0\b0 \cf4 selectAddressBookVC:selectVC doneAction:array];\
  10867. \}
  10868. \f2\b \cf8 else
  10869. \f0\b0 \cf4
  10870. \f2\b \cf8 if
  10871. \f0\b0 \cf4 (
  10872. \f2\b \cf8 self
  10873. \f0\b0 \cf4 .userIds)\{\
  10874. \f2\b \cf8 self
  10875. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  10876. \f2\b \cf8 return
  10877. \f0\b0 \cf4 ;\
  10878. \}\
  10879. \f2\b \cf8 return
  10880. \f0\b0 \cf4 ;\
  10881. \}\
  10882. \}\
  10883. \
  10884. - (
  10885. \f2\b \cf8 void
  10886. \f0\b0 \cf4 ) \cf11 weiboVC\cf4 :(WeiboViewControlle *)weiboVC \cf11 didSelectWithData\cf4 :(WeiboData *)data \{\
  10887. \f2\b \cf8 if
  10888. \f0\b0 \cf4 (data.type == \cf7 1\cf4 ) \{\
  10889. \
  10890. NSString *userId =
  10891. \f2\b \cf8 self
  10892. \f0\b0 \cf4 .userIds[
  10893. \f2\b \cf8 self
  10894. \f0\b0 \cf4 .groupMessagesIndex];\
  10895. \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
  10896. \f2\b \cf8 if
  10897. \f0\b0 \cf4 (
  10898. \f2\b \cf8 self
  10899. \f0\b0 \cf4 .isGroupMessages) \{\
  10900. \f2\b \cf8 if
  10901. \f0\b0 \cf4 (_isGroupSendCancel) \{\
  10902. \f2\b \cf8 return
  10903. \f0\b0 \cf4 ;\
  10904. \}\
  10905. \f2\b \cf8 if
  10906. \f0\b0 \cf4 (
  10907. \f2\b \cf8 self
  10908. \f0\b0 \cf4 .groupMessagesIndex == \cf7 0\cf4 ) \{\
  10909. [
  10910. \f2\b \cf8 self
  10911. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_collect];\
  10912. \f2\b \cf8 self
  10913. \f0\b0 \cf4 .groupSendMsgArray = [NSMutableArray arrayWithObject:data];\
  10914. _onceSendNum = \cf7 20\cf4 ;\
  10915. \}\
  10916. \}\
  10917. \
  10918. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  10919. msg.timeSend = [NSDate date];\
  10920. msg.fromUserId = MY_USER_ID;\
  10921. \f2\b \cf8 if
  10922. \f0\b0 \cf4 ([
  10923. \f2\b \cf8 self
  10924. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  10925. msg.toUserId =
  10926. \f2\b \cf8 self
  10927. \f0\b0 \cf4 .roomJid;\
  10928. msg.isGroup =
  10929. \f2\b \cf8 YES
  10930. \f0\b0 \cf4 ;\
  10931. msg.fromUserName = _userNickName;\
  10932. \}\
  10933. \f2\b \cf8 else
  10934. \f0\b0 \cf4 \{\
  10935. \f2\b \cf8 if
  10936. \f0\b0 \cf4 (
  10937. \f2\b \cf8 self
  10938. \f0\b0 \cf4 .isGroupMessages) \{\
  10939. msg.toUserId = userId;\
  10940. msg.isGroupSend =
  10941. \f2\b \cf8 YES
  10942. \f0\b0 \cf4 ;\
  10943. \f2\b \cf8 if
  10944. \f0\b0 \cf4 (
  10945. \f2\b \cf8 self
  10946. \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
  10947. msg.isLastGroupSend =
  10948. \f2\b \cf8 YES
  10949. \f0\b0 \cf4 ;\
  10950. \}\
  10951. \}
  10952. \f2\b \cf8 else
  10953. \f0\b0 \cf4 \{\
  10954. msg.toUserId = chatPerson.userId;\
  10955. \}\
  10956. msg.isGroup =
  10957. \f2\b \cf8 NO
  10958. \f0\b0 \cf4 ;\
  10959. \}\
  10960. msg.content = data.content;\
  10961. msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
  10962. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  10963. msg.isRead = [NSNumber numberWithBool:
  10964. \f2\b \cf8 NO
  10965. \f0\b0 \cf4 ];\
  10966. msg.isReadDel = [NSNumber numberWithInt:
  10967. \f2\b \cf8 self
  10968. \f0\b0 \cf4 .isReadDelete];\
  10969. \
  10970. \cf2 //
  10971. \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
  10972. \f0 \cf4 \
  10973. [msg insert:
  10974. \f2\b \cf8 self
  10975. \f0\b0 \cf4 .roomJid];\
  10976. \
  10977. \f2\b \cf8 if
  10978. \f0\b0 \cf4 (_useInfoTempChat==\cf7 11\cf4 ) \{\
  10979. \
  10980. msg.tempChat = \cf7 11\cf4 ;\
  10981. \}
  10982. \f2\b \cf8 else
  10983. \f0\b0 \cf4 \
  10984. \{\
  10985. \
  10986. msg.tempChat = \cf7 1\cf4 ;\
  10987. \}\
  10988. \
  10989. [g_xmpp sendMessage:msg roomName:
  10990. \f2\b \cf8 self
  10991. \f0\b0 \cf4 .roomJid];\cf2 //
  10992. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  10993. \f0 \cf4 \
  10994. \
  10995. \f2\b \cf8 if
  10996. \f0\b0 \cf4 (
  10997. \f2\b \cf8 self
  10998. \f0\b0 \cf4 .isGroupMessages) \{\
  10999. \f2\b \cf8 self
  11000. \f0\b0 \cf4 .groupMessagesIndex ++;\
  11001. \f2\b \cf8 if
  11002. \f0\b0 \cf4 (msg.isLastGroupSend) \{\
  11003. \f2\b \cf8 return
  11004. \f0\b0 \cf4 ;\
  11005. \}\
  11006. \f2\b \cf8 if
  11007. \f0\b0 \cf4 (
  11008. \f2\b \cf8 self
  11009. \f0\b0 \cf4 .groupMessagesIndex <
  11010. \f2\b \cf8 self
  11011. \f0\b0 \cf4 .userIds.count) \{\
  11012. [
  11013. \f2\b \cf8 self
  11014. \f0\b0 \cf4 weiboVC:weiboVC didSelectWithData:data];\
  11015. \}
  11016. \f2\b \cf8 else
  11017. \f0\b0 \cf4
  11018. \f2\b \cf8 if
  11019. \f0\b0 \cf4 (
  11020. \f2\b \cf8 self
  11021. \f0\b0 \cf4 .userIds)\{\
  11022. \f2\b \cf8 self
  11023. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  11024. \f2\b \cf8 return
  11025. \f0\b0 \cf4 ;\
  11026. \}\
  11027. \f2\b \cf8 return
  11028. \f0\b0 \cf4 ;\
  11029. \}\
  11030. [
  11031. \f2\b \cf8 self
  11032. \f0\b0 \cf4 showOneMsg:msg];\
  11033. \}
  11034. \f2\b \cf8 else
  11035. \f0\b0 \cf4 \{\
  11036. NSString *url;\
  11037. NSMutableArray *imgArr = [NSMutableArray array];\
  11038. \f2\b \cf8 switch
  11039. \f0\b0 \cf4 (data.type) \{\
  11040. \f2\b \cf8 case
  11041. \f0\b0 \cf4 \cf7 2\cf4 :\{\
  11042. \f2\b \cf8 for
  11043. \f0\b0 \cf4 (ObjUrlData *dict
  11044. \f2\b \cf8 in
  11045. \f0\b0 \cf4 data.larges) \{\
  11046. NSString *imgUrl = dict.url;\
  11047. [imgArr addObject:imgUrl];\
  11048. \}\
  11049. \cf2 // url = ((ObjUrlData *)data.larges.firstObject).url;\cf4 \
  11050. \}\
  11051. \f2\b \cf8 break
  11052. \f0\b0 \cf4 ;\
  11053. \f2\b \cf8 case
  11054. \f0\b0 \cf4 \cf7 3\cf4 :\
  11055. url = ((ObjUrlData *)data.audios.firstObject).url;\
  11056. \f2\b \cf8 break
  11057. \f0\b0 \cf4 ;\
  11058. \f2\b \cf8 case
  11059. \f0\b0 \cf4 \cf7 4\cf4 :\
  11060. url = ((ObjUrlData *)data.videos.firstObject).url;\
  11061. \f2\b \cf8 break
  11062. \f0\b0 \cf4 ;\
  11063. \f2\b \cf8 case
  11064. \f0\b0 \cf4 \cf7 5\cf4 :\
  11065. url = ((ObjUrlData *)data.files.firstObject).url;\
  11066. \f2\b \cf8 break
  11067. \f0\b0 \cf4 ;\
  11068. \
  11069. \f2\b \cf8 default
  11070. \f0\b0 \cf4 :\
  11071. \f2\b \cf8 break
  11072. \f0\b0 \cf4 ;\
  11073. \}\
  11074. _collectionData = data;\
  11075. \
  11076. \f2\b \cf8 if
  11077. \f0\b0 \cf4 (
  11078. \f2\b \cf8 self
  11079. \f0\b0 \cf4 .isGroupMessages) \{\
  11080. \f2\b \cf8 if
  11081. \f0\b0 \cf4 (_isGroupSendCancel) \{\
  11082. \f2\b \cf8 return
  11083. \f0\b0 \cf4 ;\
  11084. \}\
  11085. NSInteger i = \cf7 0\cf4 ;\
  11086. NSMutableArray *allArray = [NSMutableArray array];\
  11087. \f2\b \cf8 if
  11088. \f0\b0 \cf4 (data.content && data.content.length > \cf7 0\cf4 ) \{\
  11089. i = i + \cf7 1\cf4 ;\
  11090. [allArray addObject:data.content];\
  11091. \}\
  11092. \f2\b \cf8 if
  11093. \f0\b0 \cf4 (imgArr.count > \cf7 0\cf4 ) \{\
  11094. i = i + imgArr.count;\
  11095. [allArray addObjectsFromArray:imgArr];\
  11096. \}
  11097. \f2\b \cf8 else
  11098. \f0\b0 \cf4 \{\
  11099. i = i + \cf7 1\cf4 ;\
  11100. \}\
  11101. [
  11102. \f2\b \cf8 self
  11103. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:i withType:groupsend_msgType_collect];\
  11104. _onceSendNum = \cf7 20\cf4 ;\
  11105. \f2\b \cf8 if
  11106. \f0\b0 \cf4 (imgArr.count > \cf7 0\cf4 ) \{\
  11107. \f2\b \cf8 self
  11108. \f0\b0 \cf4 .groupSendMsgArray = allArray;\
  11109. [
  11110. \f2\b \cf8 self
  11111. \f0\b0 \cf4 collectionMsgSendAll:allArray];\
  11112. \}
  11113. \f2\b \cf8 else
  11114. \f0\b0 \cf4 \{\
  11115. \
  11116. [g_server uploadCopyFileServlet:url validTime:g_config.fileValidTime toView:
  11117. \f2\b \cf8 self
  11118. \f0\b0 \cf4 ];\
  11119. \}\
  11120. \}
  11121. \f2\b \cf8 else
  11122. \f0\b0 \cf4 \{\
  11123. \
  11124. \cf2 //
  11125. \f1 \'c8\'e7\'b9\'fb\'ca\'d5\'b2\'d8\'b5\'c4\'ce\'c4\'bc\'fe\'d3\'d0\'ce\'c4\'b1\'be\'a3\'ac\'cf\'c8\'b7\'a2\'cb\'cd\'ce\'c4\'b1\'be\'cf\'fb\'cf\'a2
  11126. \f0 \cf4 \
  11127. \f2\b \cf8 if
  11128. \f0\b0 \cf4 (data.content && data.content.length > \cf7 0\cf4 ) \{\
  11129. [
  11130. \f2\b \cf8 self
  11131. \f0\b0 \cf4 collectionMsgSend:data.content isFile:
  11132. \f2\b \cf8 NO
  11133. \f0\b0 \cf4 ];\
  11134. \}\
  11135. \
  11136. \f2\b \cf8 if
  11137. \f0\b0 \cf4 (imgArr.count > \cf7 0\cf4 ) \{\
  11138. \f2\b \cf8 for
  11139. \f0\b0 \cf4 (
  11140. \f2\b \cf8 int
  11141. \f0\b0 \cf4 i = \cf7 0\cf4 ; i < imgArr.count; i++ ) \{\
  11142. [
  11143. \f2\b \cf8 self
  11144. \f0\b0 \cf4 collectionMsgSend:imgArr[i] isFile:
  11145. \f2\b \cf8 YES
  11146. \f0\b0 \cf4 ];\
  11147. \}\
  11148. \}
  11149. \f2\b \cf8 else
  11150. \f0\b0 \cf4 \{\
  11151. [g_server uploadCopyFileServlet:url validTime:g_config.fileValidTime toView:
  11152. \f2\b \cf8 self
  11153. \f0\b0 \cf4 ];\
  11154. \}\
  11155. \}\
  11156. \}\
  11157. \
  11158. \}\
  11159. \
  11160. - (
  11161. \f2\b \cf8 void
  11162. \f0\b0 \cf4 )\cf11 collectionMsgSendAll\cf4 :(NSArray *)allArray\{\
  11163. \f2\b \cf8 if
  11164. \f0\b0 \cf4 (_isGroupSendCancel) \{\
  11165. \f2\b \cf8 return
  11166. \f0\b0 \cf4 ;\
  11167. \}\
  11168. NSString *userId =
  11169. \f2\b \cf8 self
  11170. \f0\b0 \cf4 .userIds[
  11171. \f2\b \cf8 self
  11172. \f0\b0 \cf4 .groupMessagesIndex];\
  11173. \f2\b \cf8 for
  11174. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < allArray.count; i++) \{\
  11175. NSString *content = allArray[i];\
  11176. \f2\b \cf8 if
  11177. \f0\b0 \cf4 (i == \cf7 0\cf4 && _collectionData.content && _collectionData.content.length > \cf7 0\cf4 ) \{\
  11178. [
  11179. \f2\b \cf8 self
  11180. \f0\b0 \cf4 collectionMsgSendOne:content withUserId:userId isText:
  11181. \f2\b \cf8 YES
  11182. \f0\b0 \cf4 isLast:
  11183. \f2\b \cf8 NO
  11184. \f0\b0 \cf4 ];\
  11185. \}
  11186. \f2\b \cf8 else
  11187. \f0\b0 \cf4 \{\
  11188. \f2\b \cf8 if
  11189. \f0\b0 \cf4 ((
  11190. \f2\b \cf8 self
  11191. \f0\b0 \cf4 .groupMessagesIndex+\cf7 1\cf4 ) % _onceSendNum == \cf7 0\cf4 && i == allArray.count - \cf7 1\cf4 ) \{\
  11192. [
  11193. \f2\b \cf8 self
  11194. \f0\b0 \cf4 collectionMsgSendOne:content withUserId:userId isText:
  11195. \f2\b \cf8 NO
  11196. \f0\b0 \cf4 isLast:
  11197. \f2\b \cf8 YES
  11198. \f0\b0 \cf4 ];\
  11199. \}
  11200. \f2\b \cf8 else
  11201. \f0\b0 \cf4 \{\
  11202. [
  11203. \f2\b \cf8 self
  11204. \f0\b0 \cf4 collectionMsgSendOne:content withUserId:userId isText:
  11205. \f2\b \cf8 NO
  11206. \f0\b0 \cf4 isLast:
  11207. \f2\b \cf8 NO
  11208. \f0\b0 \cf4 ];\
  11209. \}\
  11210. \}\
  11211. \}\
  11212. \f2\b \cf8 self
  11213. \f0\b0 \cf4 .groupMessagesIndex ++;\
  11214. \f2\b \cf8 if
  11215. \f0\b0 \cf4 (
  11216. \f2\b \cf8 self
  11217. \f0\b0 \cf4 .groupMessagesIndex <
  11218. \f2\b \cf8 self
  11219. \f0\b0 \cf4 .userIds.count) \{\
  11220. \f2\b \cf8 if
  11221. \f0\b0 \cf4 (
  11222. \f2\b \cf8 self
  11223. \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
  11224. \f2\b \cf8 return
  11225. \f0\b0 \cf4 ;\
  11226. \}
  11227. \f2\b \cf8 else
  11228. \f0\b0 \cf4 \{\
  11229. [
  11230. \f2\b \cf8 self
  11231. \f0\b0 \cf4 collectionMsgSendAll:allArray];\
  11232. \}\
  11233. \}
  11234. \f2\b \cf8 else
  11235. \f0\b0 \cf4
  11236. \f2\b \cf8 if
  11237. \f0\b0 \cf4 (
  11238. \f2\b \cf8 self
  11239. \f0\b0 \cf4 .userIds)\{\
  11240. \f2\b \cf8 self
  11241. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  11242. \f2\b \cf8 return
  11243. \f0\b0 \cf4 ;\
  11244. \}\
  11245. \f2\b \cf8 return
  11246. \f0\b0 \cf4 ;\
  11247. \}\
  11248. \
  11249. - (
  11250. \f2\b \cf8 void
  11251. \f0\b0 \cf4 )\cf11 collectionMsgSendOne\cf4 :(NSString *)content \cf11 withUserId\cf4 :(NSString *)userId \cf11 isText\cf4 :(
  11252. \f2\b \cf8 BOOL
  11253. \f0\b0 \cf4 )isText \cf11 isLast\cf4 :(
  11254. \f2\b \cf8 BOOL
  11255. \f0\b0 \cf4 )isLast\{\
  11256. \
  11257. JXMessageObject *msg = [[JXMessageObject alloc]init];\
  11258. msg.timeSend = [NSDate date];\
  11259. msg.fromUserId = MY_USER_ID;\
  11260. msg.toUserId = userId;\
  11261. msg.isGroupSend =
  11262. \f2\b \cf8 YES
  11263. \f0\b0 \cf4 ;\
  11264. msg.isLastGroupSend = isLast;\
  11265. msg.isGroup =
  11266. \f2\b \cf8 NO
  11267. \f0\b0 \cf4 ;\
  11268. msg.content = content;\
  11269. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  11270. msg.isRead = [NSNumber numberWithBool:
  11271. \f2\b \cf8 NO
  11272. \f0\b0 \cf4 ];\
  11273. msg.isReadDel = [NSNumber numberWithInt:
  11274. \f2\b \cf8 self
  11275. \f0\b0 \cf4 .isReadDelete];\
  11276. \f2\b \cf8 if
  11277. \f0\b0 \cf4 (isText) \{\
  11278. msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
  11279. \}
  11280. \f2\b \cf8 else
  11281. \f0\b0 \cf4 \{\
  11282. \f2\b \cf8 switch
  11283. \f0\b0 \cf4 (_collectionData.type) \{\
  11284. \f2\b \cf8 case
  11285. \f0\b0 \cf4 \cf7 2\cf4 :\
  11286. msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\
  11287. \f2\b \cf8 break
  11288. \f0\b0 \cf4 ;\
  11289. \f2\b \cf8 case
  11290. \f0\b0 \cf4 \cf7 3\cf4 :\{\
  11291. msg.type = [NSNumber numberWithInt:kWCMessageTypeVoice];\
  11292. ObjUrlData *obj = _collectionData.audios.firstObject;\
  11293. msg.timeLen = obj.timeLen;\
  11294. \}\
  11295. \f2\b \cf8 break
  11296. \f0\b0 \cf4 ;\
  11297. \f2\b \cf8 case
  11298. \f0\b0 \cf4 \cf7 4\cf4 :\
  11299. msg.type = [NSNumber numberWithInt:kWCMessageTypeVideo];\
  11300. \f2\b \cf8 break
  11301. \f0\b0 \cf4 ;\
  11302. \f2\b \cf8 case
  11303. \f0\b0 \cf4 \cf7 5\cf4 :\{\
  11304. msg.fileName = ((ObjUrlData *)_collectionData.files.firstObject).name;\
  11305. msg.type = [NSNumber numberWithInt:kWCMessageTypeFile];\
  11306. \}\
  11307. \f2\b \cf8 break
  11308. \f0\b0 \cf4 ;\
  11309. \
  11310. \f2\b \cf8 default
  11311. \f0\b0 \cf4 :\
  11312. \f2\b \cf8 break
  11313. \f0\b0 \cf4 ;\
  11314. \}\
  11315. \}\
  11316. \
  11317. \cf2 //
  11318. \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
  11319. \f0 \cf4 \
  11320. [msg insert:
  11321. \f2\b \cf8 self
  11322. \f0\b0 \cf4 .roomJid];\
  11323. \
  11324. \f2\b \cf8 if
  11325. \f0\b0 \cf4 (_useInfoTempChat==\cf7 11\cf4 ) \{\
  11326. \
  11327. msg.tempChat = \cf7 11\cf4 ;\
  11328. \}
  11329. \f2\b \cf8 else
  11330. \f0\b0 \cf4 \
  11331. \{\
  11332. \
  11333. msg.tempChat = \cf7 1\cf4 ;\
  11334. \}\
  11335. [g_xmpp sendMessage:msg roomName:
  11336. \f2\b \cf8 self
  11337. \f0\b0 \cf4 .roomJid];\cf2 //
  11338. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  11339. \f0 \cf4 \
  11340. \}\
  11341. \
  11342. - (
  11343. \f2\b \cf8 void
  11344. \f0\b0 \cf4 )\cf11 cameraVC\cf4 :(JXCameraVC *)vc \cf11 didFinishWithImage\cf4 :(UIImage *)image \{\
  11345. [
  11346. \f2\b \cf8 self
  11347. \f0\b0 \cf4 hideKeyboard:
  11348. \f2\b \cf8 YES
  11349. \f0\b0 \cf4 ];\
  11350. \cf2 //
  11351. \f1 \'bb\'f1\'c8\'a1
  11352. \f0 image
  11353. \f1 \'b5\'c4\'b3\'a4\'bf\'ed
  11354. \f0 \cf4 \
  11355. \f2\b \cf8 int
  11356. \f0\b0 \cf4 imageWidth = image.size.width;\
  11357. \f2\b \cf8 int
  11358. \f0\b0 \cf4 imageHeight = image.size.height;\
  11359. \
  11360. \f2\b \cf8 self
  11361. \f0\b0 \cf4 .view.frame = CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT);\
  11362. NSString *name = \cf6 @"jpg"\cf4 ;\
  11363. \f2\b \cf8 if
  11364. \f0\b0 \cf4 (
  11365. \f2\b \cf8 self
  11366. \f0\b0 \cf4 .isGroupMessages) \{\
  11367. \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
  11368. \cf2 // NSString *userId = self.userIds[i];\cf4 \
  11369. \cf2 //\cf4 \
  11370. \cf2 // NSString *file = [FileInfo getUUIDFileName:name];\cf4 \
  11371. \cf2 // [g_server saveImageToFile:image file:file isOriginal:NO];\cf4 \
  11372. \cf2 // [self sendImage:file withWidth:imageWidth andHeight:imageHeight userId:userId];\cf4 \
  11373. \cf12 ///
  11374. \f3 \cf2 / [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];
  11375. \f0 \cf4 \
  11376. \cf2 // \}\cf4 \
  11377. [
  11378. \f2\b \cf8 self
  11379. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_image];\
  11380. \f2\b \cf8 self
  11381. \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:image];\
  11382. _onceSendNum = \cf7 10\cf4 ;\
  11383. _isOriginal =
  11384. \f2\b \cf8 NO
  11385. \f0\b0 \cf4 ;\
  11386. [
  11387. \f2\b \cf8 self
  11388. \f0\b0 \cf4 sendPhotos:
  11389. \f2\b \cf8 self
  11390. \f0\b0 \cf4 .groupUploadObjArray withOriginal:
  11391. \f2\b \cf8 NO
  11392. \f0\b0 \cf4 ];\
  11393. \}
  11394. \f2\b \cf8 else
  11395. \f0\b0 \cf4 \{\
  11396. NSString *file = [FileInfo getUUIDFileName:name];\
  11397. [g_server saveImageToFile:image file:file isOriginal:
  11398. \f2\b \cf8 NO
  11399. \f0\b0 \cf4 ];\
  11400. [
  11401. \f2\b \cf8 self
  11402. \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:
  11403. \f2\b \cf8 nil
  11404. \f0\b0 \cf4 ];\
  11405. \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
  11406. \}\
  11407. \
  11408. \cf2 // NSString* file = [FileInfo getUUIDFileName:name];\cf4 \
  11409. \cf2 //\cf4 \
  11410. \cf2 // [g_server saveImageToFile:image file:file isOriginal:NO];\cf4 \
  11411. \cf12 ///
  11412. \f3 \cf2 / [self sendImage:file withWidth:imageWidth andHeight:imageHeight];
  11413. \f0 \cf4 \
  11414. \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut toView:self];\cf4 \
  11415. \}\
  11416. \
  11417. \cf5 #pragma mark
  11418. \f2\b \cf16 ----------
  11419. \f4 \'cd\'bc\'c6\'ac\'d1\'a1\'d4\'f1\'cd\'ea\'b3\'c9
  11420. \f2 -------------
  11421. \f0\b0 \cf4 \
  11422. \cf2 //UIImagePickerController
  11423. \f1 \'b4\'fa\'c0\'ed\'b7\'bd\'b7\'a8
  11424. \f0 \cf4 \
  11425. -(
  11426. \f2\b \cf8 void
  11427. \f0\b0 \cf4 )\cf11 imagePickerController\cf4 :(UIImagePickerController *)picker \cf11 didFinishPickingMediaWithInfo\cf4 :(NSDictionary *)info\
  11428. \{\
  11429. UIImage * chosedImage=[info objectForKey:\cf6 @"UIImagePickerControllerOriginalImage"\cf4 ];\
  11430. \cf2 //
  11431. \f1 \'bb\'f1\'c8\'a1
  11432. \f0 image
  11433. \f1 \'b5\'c4\'b3\'a4\'bf\'ed
  11434. \f0 \cf4 \
  11435. \f2\b \cf8 int
  11436. \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
  11437. \f2\b \cf8 int
  11438. \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
  11439. [
  11440. \f2\b \cf8 self
  11441. \f0\b0 \cf4 dismissViewControllerAnimated:
  11442. \f2\b \cf8 NO
  11443. \f0\b0 \cf4 completion:^\{\
  11444. \f2\b \cf8 self
  11445. \f0\b0 \cf4 .view.frame = CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT);\
  11446. [
  11447. \f2\b \cf8 self
  11448. \f0\b0 \cf4 hideKeyboard:
  11449. \f2\b \cf8 YES
  11450. \f0\b0 \cf4 ];\
  11451. \
  11452. \
  11453. NSURL *url = [info objectForKey:\cf6 @"UIImagePickerControllerReferenceURL"\cf4 ];\
  11454. NSString *urlStr = [url absoluteString];\
  11455. NSString *name = [urlStr substringFromIndex:urlStr.length - \cf7 3\cf4 ];\
  11456. name = [name lowercaseString];\
  11457. \
  11458. NSString* file = [FileInfo getUUIDFileName:name];\
  11459. \
  11460. \
  11461. \f2\b \cf8 if
  11462. \f0\b0 \cf4 ([name isEqualToString:\cf6 @"gif"\cf4 ]) \{ \cf2 // gif
  11463. \f1 \'b2\'bb\'c4\'dc\'b0\'b4\'d5\'d5
  11464. \f0 image
  11465. \f1 \'c8\'a1
  11466. \f0 data
  11467. \f1 \'b4\'e6\'b4\'a2
  11468. \f0 \cf4 \
  11469. ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init];\
  11470. \
  11471. \f2\b \cf8 void
  11472. \f0\b0 \cf4 (^ALAssetsLibraryAssetForURLResultBlock)(ALAsset *) = ^(ALAsset *asset) \{\
  11473. \
  11474. \f2\b \cf8 if
  11475. \f0\b0 \cf4 (asset !=
  11476. \f2\b \cf8 nil
  11477. \f0\b0 \cf4 ) \{\
  11478. \
  11479. ALAssetRepresentation *rep = [asset defaultRepresentation];\
  11480. Byte *imageBuffer = (Byte*)malloc(rep.size);\
  11481. NSUInteger bufferSize = [rep getBytes:imageBuffer fromOffset:\cf7 0.0\cf4 length:rep.size error:
  11482. \f2\b \cf8 nil
  11483. \f0\b0 \cf4 ];\
  11484. NSData *imageData = [NSData dataWithBytesNoCopy:imageBuffer length:bufferSize freeWhenDone:
  11485. \f2\b \cf8 YES
  11486. \f0\b0 \cf4 ];\
  11487. \
  11488. \f2\b \cf8 if
  11489. \f0\b0 \cf4 (
  11490. \f2\b \cf8 self
  11491. \f0\b0 \cf4 .isGroupMessages) \{\
  11492. \f2\b \cf8 for
  11493. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
  11494. \f2\b \cf8 self
  11495. \f0\b0 \cf4 .userIds.count; i ++) \{\
  11496. NSString *userId =
  11497. \f2\b \cf8 self
  11498. \f0\b0 \cf4 .userIds[i];\
  11499. \
  11500. NSString *file = [FileInfo getUUIDFileName:name];\
  11501. [g_server saveDataToFile:imageData file:file];\
  11502. [
  11503. \f2\b \cf8 self
  11504. \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:userId];\
  11505. \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
  11506. \}\
  11507. \}
  11508. \f2\b \cf8 else
  11509. \f0\b0 \cf4 \{\
  11510. NSString *file = [FileInfo getUUIDFileName:name];\
  11511. [g_server saveDataToFile:imageData file:file];\
  11512. [
  11513. \f2\b \cf8 self
  11514. \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:
  11515. \f2\b \cf8 nil
  11516. \f0\b0 \cf4 ];\
  11517. \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
  11518. \}\
  11519. \cf2 // [g_server saveDataToFile:imageData file:file];\cf4 \
  11520. \cf12 ///
  11521. \f3 \cf2 / [self sendImage:file withWidth:imageWidth andHeight:imageHeight];
  11522. \f0 \cf4 \
  11523. \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut toView:self];\cf4 \
  11524. \
  11525. \}\
  11526. \f2\b \cf8 else
  11527. \f0\b0 \cf4 \{\
  11528. \}\
  11529. \};\
  11530. \
  11531. [assetLibrary assetForURL:url\
  11532. resultBlock:ALAssetsLibraryAssetForURLResultBlock\
  11533. failureBlock:^(NSError *error) \{\
  11534. \
  11535. \}];\
  11536. \}
  11537. \f2\b \cf8 else
  11538. \f0\b0 \cf4 \{\
  11539. \
  11540. name = \cf6 @"jpg"\cf4 ;\
  11541. \f2\b \cf8 if
  11542. \f0\b0 \cf4 (
  11543. \f2\b \cf8 self
  11544. \f0\b0 \cf4 .isGroupMessages) \{\
  11545. \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
  11546. \cf2 // NSString *userId = self.userIds[i];\cf4 \
  11547. \cf2 //\cf4 \
  11548. \cf2 // NSString *file = [FileInfo getUUIDFileName:name];\cf4 \
  11549. \cf2 // [g_server saveImageToFile:chosedImage file:file isOriginal:NO];\cf4 \
  11550. \cf2 // [self sendImage:file withWidth:imageWidth andHeight:imageHeight userId:userId];\cf4 \
  11551. \cf12 ///
  11552. \f3 \cf2 / [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];
  11553. \f0 \cf4 \
  11554. \cf2 // \}\cf4 \
  11555. [
  11556. \f2\b \cf8 self
  11557. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_image];\
  11558. \f2\b \cf8 self
  11559. \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:chosedImage];\
  11560. _onceSendNum = \cf7 10\cf4 ;\
  11561. _isOriginal =
  11562. \f2\b \cf8 NO
  11563. \f0\b0 \cf4 ;\
  11564. [
  11565. \f2\b \cf8 self
  11566. \f0\b0 \cf4 sendPhotos:
  11567. \f2\b \cf8 self
  11568. \f0\b0 \cf4 .groupUploadObjArray withOriginal:
  11569. \f2\b \cf8 NO
  11570. \f0\b0 \cf4 ];\
  11571. \}
  11572. \f2\b \cf8 else
  11573. \f0\b0 \cf4 \{\
  11574. NSString *file = [FileInfo getUUIDFileName:name];\
  11575. [g_server saveImageToFile:chosedImage file:file isOriginal:
  11576. \f2\b \cf8 NO
  11577. \f0\b0 \cf4 ];\
  11578. [
  11579. \f2\b \cf8 self
  11580. \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:
  11581. \f2\b \cf8 nil
  11582. \f0\b0 \cf4 ];\
  11583. \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
  11584. \}\
  11585. \cf2 // file = [FileInfo getUUIDFileName:name];\cf4 \
  11586. \cf2 // [g_server saveImageToFile:chosedImage file:file isOriginal:NO];\cf4 \
  11587. \cf12 ///
  11588. \f3 \cf2 / [self sendImage:file withWidth:imageWidth andHeight:imageHeight];
  11589. \f0 \cf4 \
  11590. \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut toView:self];\cf4 \
  11591. \}\
  11592. \
  11593. \
  11594. \cf2 // [picker release];\cf4 \
  11595. \}];\
  11596. \}\
  11597. \
  11598. -(
  11599. \f2\b \cf8 void
  11600. \f0\b0 \cf4 )\cf11 imagePickerControllerDidCancel\cf4 :(UIImagePickerController *)picker\
  11601. \{\
  11602. [
  11603. \f2\b \cf8 self
  11604. \f0\b0 \cf4 dismissViewControllerAnimated:
  11605. \f2\b \cf8 NO
  11606. \f0\b0 \cf4 completion:^\{\
  11607. \f2\b \cf8 self
  11608. \f0\b0 \cf4 .view.frame = CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT);\
  11609. [
  11610. \f2\b \cf8 self
  11611. \f0\b0 \cf4 hideKeyboard:
  11612. \f2\b \cf8 YES
  11613. \f0\b0 \cf4 ];\
  11614. \cf2 // [picker release];\cf4 \
  11615. \}];\
  11616. \}\
  11617. \
  11618. \cf5 #pragma mark
  11619. \f2\b \cf16 -
  11620. \f4 \'c2\'bc\'d6\'c6\'d3\'ef\'d2\'f4
  11621. \f0\b0 \cf4 \
  11622. - (
  11623. \f2\b \cf8 void
  11624. \f0\b0 \cf4 )\cf11 recordStart\cf4 :(UIButton *)sender \{\
  11625. NSLog(\cf6 @"recordStart-------"\cf4 );\
  11626. \f2\b \cf8 if
  11627. \f0\b0 \cf4 ([
  11628. \f2\b \cf8 self
  11629. \f0\b0 \cf4 showDisableSay])\
  11630. \f2\b \cf8 return
  11631. \f0\b0 \cf4 ;\
  11632. \f2\b \cf8 if
  11633. \f0\b0 \cf4 (recording)\
  11634. \f2\b \cf8 return
  11635. \f0\b0 \cf4 ;\
  11636. \f2\b \cf8 if
  11637. \f0\b0 \cf4 ([
  11638. \f2\b \cf8 self
  11639. \f0\b0 \cf4 sendMsgCheck])\{\
  11640. \f2\b \cf8 return
  11641. \f0\b0 \cf4 ;\
  11642. \}\
  11643. \f2\b \cf8 if
  11644. \f0\b0 \cf4 (![
  11645. \f2\b \cf8 self
  11646. \f0\b0 \cf4 canRecord]) \{\
  11647. [g_App showAlert:Localized(\cf6 @"JX_CanNotOpenMicr"\cf4 )];\
  11648. \f2\b \cf8 return
  11649. \f0\b0 \cf4 ;\
  11650. \}\
  11651. \
  11652. \cf2 // _recordBtn.layer.borderColor = [[UIColor blueColor] CGColor];\cf4 \
  11653. _recordBtn.backgroundColor = HEXCOLOR(\cf7 0xB8B9BD\cf4 );\
  11654. \
  11655. [g_notify postNotificationName:kAllAudioPlayerPauseNotifaction object:
  11656. \f2\b \cf8 self
  11657. \f0\b0 \cf4 userInfo:
  11658. \f2\b \cf8 nil
  11659. \f0\b0 \cf4 ];\
  11660. [g_notify postNotificationName:kAllVideoPlayerPauseNotifaction object:
  11661. \f2\b \cf8 self
  11662. \f0\b0 \cf4 userInfo:
  11663. \f2\b \cf8 nil
  11664. \f0\b0 \cf4 ];\
  11665. \
  11666. [
  11667. \f2\b \cf8 self
  11668. \f0\b0 \cf4 hideKeyboard:
  11669. \f2\b \cf8 YES
  11670. \f0\b0 \cf4 ];\
  11671. recording=
  11672. \f2\b \cf8 YES
  11673. \f0\b0 \cf4 ;\
  11674. \
  11675. NSDictionary *settings=[NSDictionary dictionaryWithObjectsAndKeys:\
  11676. [NSNumber numberWithFloat:\cf7 8000\cf4 ],AVSampleRateKey,\
  11677. [NSNumber numberWithInt:kAudioFormatLinearPCM],AVFormatIDKey,\
  11678. [NSNumber numberWithInt:\cf7 1\cf4 ],AVNumberOfChannelsKey,\
  11679. [NSNumber numberWithInt:\cf7 16\cf4 ],AVLinearPCMBitDepthKey,\
  11680. [NSNumber numberWithBool:
  11681. \f2\b \cf8 NO
  11682. \f0\b0 \cf4 ],AVLinearPCMIsBigEndianKey,\
  11683. [NSNumber numberWithBool:
  11684. \f2\b \cf8 NO
  11685. \f0\b0 \cf4 ],AVLinearPCMIsFloatKey,\
  11686. \f2\b \cf8 nil
  11687. \f0\b0 \cf4 ];\
  11688. \
  11689. NSError *error;\
  11690. [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayAndRecord error: &error];\
  11691. [[AVAudioSession sharedInstance] setActive:
  11692. \f2\b \cf8 YES
  11693. \f0\b0 \cf4 error:&error];\
  11694. \
  11695. NSURL *url = [NSURL fileURLWithPath:[FileInfo getUUIDFileName:\cf6 @"wav"\cf4 ]];\
  11696. pathURL = url;\
  11697. \
  11698. audioRecorder = [[AVAudioRecorder alloc] initWithURL:pathURL settings:settings error:&error];\
  11699. audioRecorder.delegate =
  11700. \f2\b \cf8 self
  11701. \f0\b0 \cf4 ;\
  11702. \
  11703. peakTimer = [NSTimer scheduledTimerWithTimeInterval:\cf7 0.01\cf4 target:
  11704. \f2\b \cf8 self
  11705. \f0\b0 \cf4 selector:
  11706. \f2\b \cf8 @selector
  11707. \f0\b0 \cf4 (updatePeak:) userInfo:
  11708. \f2\b \cf8 nil
  11709. \f0\b0 \cf4 repeats:
  11710. \f2\b \cf8 YES
  11711. \f0\b0 \cf4 ];\
  11712. [peakTimer fire];\
  11713. \f2\b \cf8 BOOL
  11714. \f0\b0 \cf4 flag =
  11715. \f2\b \cf8 NO
  11716. \f0\b0 \cf4 ;\
  11717. flag = [audioRecorder prepareToRecord];\
  11718. [audioRecorder setMeteringEnabled:
  11719. \f2\b \cf8 YES
  11720. \f0\b0 \cf4 ];\
  11721. flag = [audioRecorder peakPowerForChannel:\cf7 1\cf4 ];\
  11722. flag = [audioRecorder record];\
  11723. \
  11724. _voice.center =
  11725. \f2\b \cf8 self
  11726. \f0\b0 \cf4 .view.center;\
  11727. [_voice show];\
  11728. \}\
  11729. \
  11730. - (
  11731. \f2\b \cf8 void
  11732. \f0\b0 \cf4 )\cf11 updatePeak\cf4 :(NSTimer*)timer\
  11733. \{\
  11734. _timeLen = audioRecorder.currentTime;\
  11735. \f2\b \cf8 if
  11736. \f0\b0 \cf4 (_timeLen>=\cf7 60\cf4 )\
  11737. [
  11738. \f2\b \cf8 self
  11739. \f0\b0 \cf4 recordStop:
  11740. \f2\b \cf8 nil
  11741. \f0\b0 \cf4 ];\
  11742. \
  11743. [audioRecorder updateMeters];\
  11744. \f2\b \cf8 const
  11745. \f0\b0 \cf4
  11746. \f2\b \cf8 double
  11747. \f0\b0 \cf4 alpha=\cf7 0.5\cf4 ;\
  11748. NSLog(\cf6 @"peakPowerForChannel = %f,%f"\cf4 , [audioRecorder peakPowerForChannel:\cf7 0\cf4 ],[audioRecorder peakPowerForChannel:\cf7 1\cf4 ]);\
  11749. \f2\b \cf8 double
  11750. \f0\b0 \cf4 peakPowerForChannel=pow(\cf7 10\cf4 , (\cf7 0.05\cf4 )*[audioRecorder peakPowerForChannel:\cf7 0\cf4 ]);\
  11751. lowPassResults=alpha*peakPowerForChannel+(\cf7 1.0\cf4 -alpha)*lowPassResults;\
  11752. _voice.volume = lowPassResults;\
  11753. \
  11754. \cf2 /* for (int i=1; i<8; i++) \{\cf4 \
  11755. \cf2 if (lowPassResults>1.0/7.0*i)\{\cf4 \
  11756. \cf2 [[talkView viewWithTag:i] setHidden:NO];\cf4 \
  11757. \cf2 \}else\{\cf4 \
  11758. \cf2 [[talkView viewWithTag:i] setHidden:YES];\cf4 \
  11759. \cf2 \}\cf4 \
  11760. \cf2 \}*/\cf4 \
  11761. \}\
  11762. \
  11763. - (
  11764. \f2\b \cf8 void
  11765. \f0\b0 \cf4 )\cf11 recordStop\cf4 :(UIButton *)sender \{\
  11766. \
  11767. [_voice hide];\
  11768. [peakTimer invalidate];\
  11769. peakTimer =
  11770. \f2\b \cf8 nil
  11771. \f0\b0 \cf4 ;\
  11772. recording =
  11773. \f2\b \cf8 NO
  11774. \f0\b0 \cf4 ;\
  11775. \
  11776. \cf2 // if(!recording)\cf4 \
  11777. \cf2 // return;\cf4 \
  11778. \
  11779. _recordBtn.layer.borderColor = [[UIColor grayColor] CGColor];\
  11780. _recordBtn.backgroundColor = HEXCOLOR(\cf7 0xFEFEFE\cf4 );\
  11781. _timeLen = audioRecorder.currentTime;\
  11782. [audioRecorder pause];\
  11783. [audioRecorder stop];\
  11784. \cf2 // [audioRecorder release];\cf4 \
  11785. \cf2 // if (_timeLen<1) \{\cf4 \
  11786. \cf2 // [g_App showAlert:@"
  11787. \f1 \'c2\'bc\'b5\'c4\'ca\'b1\'bc\'e4\'b9\'fd\'b6\'cc
  11788. \f0 \cf4 \
  11789. \cf2 // "];\cf4 \
  11790. \cf2 // return;\cf4 \
  11791. \cf2 // \}\cf4 \
  11792. \
  11793. \f2\b \cf8 if
  11794. \f0\b0 \cf4 (_timeLen<\cf7 1\cf4 )\
  11795. _timeLen = \cf7 1\cf4 ;\
  11796. NSString *amrPath = [VoiceConverter wavToAmr:pathURL.path];\
  11797. [[ChatCacheFileUtil sharedInstance] deleteWithContentPath:pathURL.path];\
  11798. _lastRecordFile = [[amrPath lastPathComponent] copy];\
  11799. \
  11800. \cf2 // NSLog(@"
  11801. \f1 \'d2\'f4\'c6\'b5\'ce\'c4\'bc\'fe\'c2\'b7\'be\'b6
  11802. \f0 :%@\\n%@",pathURL.path,amrPath);\cf4 \
  11803. \f2\b \cf8 if
  11804. \f0\b0 \cf4 (amrPath ==
  11805. \f2\b \cf8 nil
  11806. \f0\b0 \cf4 )\{\
  11807. \cf2 // [g_App showAlert:Localized(@"JXChatVC_TimeLess")];\cf4 \
  11808. [g_server showMsg:Localized(\cf6 @"JXChatVC_TimeLess"\cf4 ) delay:\cf7 1.0\cf4 ];\
  11809. \f2\b \cf8 return
  11810. \f0\b0 \cf4 ;\
  11811. \}\
  11812. \f2\b \cf8 if
  11813. \f0\b0 \cf4 (
  11814. \f2\b \cf8 self
  11815. \f0\b0 \cf4 .isGroupMessages) \{\
  11816. \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
  11817. \cf2 // NSString *userId = self.userIds[i];\cf4 \
  11818. \cf2 //\cf4 \
  11819. \cf2 // [self sendVoice:amrPath userId:userId];\cf4 \
  11820. \cf2 // [g_server uploadFile:amrPath validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
  11821. \cf2 // \}\cf4 \
  11822. [
  11823. \f2\b \cf8 self
  11824. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_audio];\
  11825. _onceSendNum = \cf7 15\cf4 ;\
  11826. \f2\b \cf8 self
  11827. \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:amrPath];\
  11828. [
  11829. \f2\b \cf8 self
  11830. \f0\b0 \cf4 sendVoices:
  11831. \f2\b \cf8 self
  11832. \f0\b0 \cf4 .groupUploadObjArray];\
  11833. \}
  11834. \f2\b \cf8 else
  11835. \f0\b0 \cf4 \{\
  11836. [
  11837. \f2\b \cf8 self
  11838. \f0\b0 \cf4 sendVoice:amrPath userId:
  11839. \f2\b \cf8 nil
  11840. \f0\b0 \cf4 ];\
  11841. [g_server uploadFile:amrPath validTime:
  11842. \f2\b \cf8 self
  11843. \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:
  11844. \f2\b \cf8 nil
  11845. \f0\b0 \cf4 toView:
  11846. \f2\b \cf8 self
  11847. \f0\b0 \cf4 ];\
  11848. \}\
  11849. \}\
  11850. \
  11851. - (
  11852. \f2\b \cf8 void
  11853. \f0\b0 \cf4 )\cf11 sendVoices\cf4 :(NSArray *)voicesArray\{\
  11854. NSString *userId =
  11855. \f2\b \cf8 self
  11856. \f0\b0 \cf4 .userIds[
  11857. \f2\b \cf8 self
  11858. \f0\b0 \cf4 .groupMessagesIndex];\
  11859. NSString *amrPath = voicesArray.lastObject;\
  11860. [
  11861. \f2\b \cf8 self
  11862. \f0\b0 \cf4 sendVoice:amrPath userId:userId];\
  11863. [g_server uploadFile:amrPath validTime:
  11864. \f2\b \cf8 self
  11865. \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:
  11866. \f2\b \cf8 nil
  11867. \f0\b0 \cf4 toView:
  11868. \f2\b \cf8 self
  11869. \f0\b0 \cf4 ];\
  11870. \f2\b \cf8 self
  11871. \f0\b0 \cf4 .groupMessagesIndex ++;\
  11872. \f2\b \cf8 if
  11873. \f0\b0 \cf4 (
  11874. \f2\b \cf8 self
  11875. \f0\b0 \cf4 .groupMessagesIndex <
  11876. \f2\b \cf8 self
  11877. \f0\b0 \cf4 .userIds.count) \{\
  11878. \f2\b \cf8 if
  11879. \f0\b0 \cf4 (
  11880. \f2\b \cf8 self
  11881. \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
  11882. \f2\b \cf8 return
  11883. \f0\b0 \cf4 ;\
  11884. \}
  11885. \f2\b \cf8 else
  11886. \f0\b0 \cf4 \{\
  11887. [
  11888. \f2\b \cf8 self
  11889. \f0\b0 \cf4 sendVoices:voicesArray];\
  11890. \}\
  11891. \}
  11892. \f2\b \cf8 else
  11893. \f0\b0 \cf4
  11894. \f2\b \cf8 if
  11895. \f0\b0 \cf4 (
  11896. \f2\b \cf8 self
  11897. \f0\b0 \cf4 .userIds)\{\
  11898. \f2\b \cf8 self
  11899. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  11900. \f2\b \cf8 return
  11901. \f0\b0 \cf4 ;\
  11902. \}\
  11903. \}\
  11904. \
  11905. - (
  11906. \f2\b \cf8 void
  11907. \f0\b0 \cf4 )\cf11 audioRecorderDidFinishRecording\cf4 :(\cf10 AVAudioRecorder\cf4 *)recorder \cf11 successfully\cf4 :(
  11908. \f2\b \cf8 BOOL
  11909. \f0\b0 \cf4 )flag\{\
  11910. [\cf15 _voice\cf4 \cf15 hide\cf4 ];\
  11911. [\cf15 peakTimer\cf4 \cf14 invalidate\cf4 ];\
  11912. \cf15 peakTimer\cf4 =
  11913. \f2\b \cf8 nil
  11914. \f0\b0 \cf4 ;\
  11915. \cf15 recording\cf4 =
  11916. \f2\b \cf8 NO
  11917. \f0\b0 \cf4 ;\
  11918. \}\
  11919. \
  11920. - (
  11921. \f2\b \cf8 void
  11922. \f0\b0 \cf4 )\cf11 recordCancel\cf4 :(\cf10 UIButton\cf4 *)sender\
  11923. \{\
  11924. \f2\b \cf8 if
  11925. \f0\b0 \cf4 (!\cf15 recording\cf4 )\
  11926. \f2\b \cf8 return
  11927. \f0\b0 \cf4 ;\
  11928. \cf15 _recordBtn\cf4 .\cf14 layer\cf4 .\cf14 borderColor\cf4 = [[\cf10 UIColor\cf4 \cf14 grayColor\cf4 ] \cf14 CGColor\cf4 ];\
  11929. \cf15 _recordBtn\cf4 .\cf14 backgroundColor\cf4 = \cf5 HEXCOLOR\cf4 (\cf7 0xFEFEFE\cf4 );\
  11930. [\cf15 audioRecorder\cf4 \cf14 stop\cf4 ];\
  11931. \cf15 audioRecorder\cf4 =
  11932. \f2\b \cf8 nil
  11933. \f0\b0 \cf4 ;\
  11934. [[\cf9 ChatCacheFileUtil\cf4 \cf15 sharedInstance\cf4 ] \cf15 deleteWithContentPath\cf4 :\cf15 pathURL\cf4 .\cf14 path\cf4 ];\
  11935. \}\
  11936. \
  11937. -(
  11938. \f2\b \cf8 void
  11939. \f0\b0 \cf4 )\cf11 sendVoice\cf4 :(\cf10 NSString\cf4 *)file \cf11 userId\cf4 :(\cf10 NSString\cf4 *)userId\{\
  11940. \
  11941. \cf2 //
  11942. \f1 \'c9\'fa\'b3\'c9\'cf\'fb\'cf\'a2\'b6\'d4\'cf\'f3
  11943. \f0 \cf4 \
  11944. \cf9 JXMessageObject\cf4 *msg=[[\cf9 JXMessageObject\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
  11945. msg.\cf15 timeSend\cf4 = [\cf10 NSDate\cf4 \cf14 date\cf4 ];\
  11946. msg.\cf15 fromUserId\cf4 = \cf5 MY_USER_ID\cf4 ;\
  11947. \f2\b \cf8 if
  11948. \f0\b0 \cf4 ([
  11949. \f2\b \cf8 self
  11950. \f0\b0 \cf4 .\cf15 roomJid\cf4 \cf14 length\cf4 ]>\cf7 0\cf4 )\{\
  11951. msg.\cf15 toUserId\cf4 =
  11952. \f2\b \cf8 self
  11953. \f0\b0 \cf4 .\cf15 roomJid\cf4 ;\
  11954. msg.\cf15 isGroup\cf4 =
  11955. \f2\b \cf8 YES
  11956. \f0\b0 \cf4 ;\
  11957. msg.\cf15 fromUserName\cf4 = \cf15 _userNickName\cf4 ;\
  11958. \}\
  11959. \f2\b \cf8 else
  11960. \f0\b0 \cf4 \{\
  11961. \f2\b \cf8 if
  11962. \f0\b0 \cf4 (
  11963. \f2\b \cf8 self
  11964. \f0\b0 \cf4 .\cf15 isGroupMessages\cf4 ) \{\
  11965. msg.\cf15 toUserId\cf4 = userId;\
  11966. \}
  11967. \f2\b \cf8 else
  11968. \f0\b0 \cf4 \{\
  11969. msg.\cf15 toUserId\cf4 = \cf15 chatPerson\cf4 .\cf15 userId\cf4 ;\
  11970. \}\
  11971. msg.\cf15 isGroup\cf4 =
  11972. \f2\b \cf8 NO
  11973. \f0\b0 \cf4 ;\
  11974. \}\
  11975. \
  11976. msg.\cf15 fileName\cf4 = file;\
  11977. msg.\cf15 content\cf4 = [[file \cf14 lastPathComponent\cf4 ] \cf14 stringByDeletingPathExtension\cf4 ];\
  11978. msg.\cf15 type\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf15 kWCMessageTypeVoice\cf4 ];\
  11979. msg.\cf15 isSend\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf5 transfer_status_ing\cf4 ];\
  11980. msg.\cf15 isUpload\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithBool\cf4 :
  11981. \f2\b \cf8 NO
  11982. \f0\b0 \cf4 ];\
  11983. msg.\cf15 isRead\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithBool\cf4 :
  11984. \f2\b \cf8 NO
  11985. \f0\b0 \cf4 ];\
  11986. msg.\cf15 timeLen\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf15 _timeLen\cf4 ];\
  11987. \
  11988. msg.\cf15 isReadDel\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :
  11989. \f2\b \cf8 self
  11990. \f0\b0 \cf4 .\cf15 isReadDelete\cf4 ];\
  11991. [msg \cf15 insert\cf4 :
  11992. \f2\b \cf8 self
  11993. \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\
  11994. [
  11995. \f2\b \cf8 self
  11996. \f0\b0 \cf4 \cf15 showOneMsg\cf4 :msg];\
  11997. \cf2 // [msg release];\cf4 \
  11998. \}\
  11999. \
  12000. - (
  12001. \f2\b \cf8 void
  12002. \f0\b0 \cf4 )\cf11 sendGif\cf4 :(\cf10 NSString\cf4 *)str \{\
  12003. \f2\b \cf8 if
  12004. \f0\b0 \cf4 ([
  12005. \f2\b \cf8 self
  12006. \f0\b0 \cf4 \cf15 sendMsgCheck\cf4 ])\{\
  12007. \f2\b \cf8 return
  12008. \f0\b0 \cf4 ;\
  12009. \}\
  12010. \
  12011. \cf10 NSString\cf4 *message = str;\
  12012. \f2\b \cf8 if
  12013. \f0\b0 \cf4 (message.\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  12014. \cf9 JXMessageObject\cf4 *msg=[[\cf9 JXMessageObject\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
  12015. msg.\cf15 timeSend\cf4 = [\cf10 NSDate\cf4 \cf14 date\cf4 ];\
  12016. msg.\cf15 fromUserId\cf4 = \cf5 MY_USER_ID\cf4 ;\
  12017. \f2\b \cf8 if
  12018. \f0\b0 \cf4 ([
  12019. \f2\b \cf8 self
  12020. \f0\b0 \cf4 .\cf15 roomJid\cf4 \cf14 length\cf4 ]>\cf7 0\cf4 )\{\
  12021. msg.\cf15 toUserId\cf4 =
  12022. \f2\b \cf8 self
  12023. \f0\b0 \cf4 .\cf15 roomJid\cf4 ;\
  12024. msg.\cf15 isGroup\cf4 =
  12025. \f2\b \cf8 YES
  12026. \f0\b0 \cf4 ;\
  12027. msg.\cf15 fromUserName\cf4 = \cf15 _userNickName\cf4 ;\
  12028. \}\
  12029. \f2\b \cf8 else
  12030. \f0\b0 \cf4 \{\
  12031. msg.\cf15 toUserId\cf4 = \cf15 chatPerson\cf4 .\cf15 userId\cf4 ;\
  12032. msg.\cf15 isGroup\cf4 =
  12033. \f2\b \cf8 NO
  12034. \f0\b0 \cf4 ;\
  12035. \}\
  12036. msg.\cf15 fileData\cf4 =
  12037. \f2\b \cf8 nil
  12038. \f0\b0 \cf4 ;\
  12039. \cf2 // msg.fileName = message;\cf4 \
  12040. msg.\cf15 content\cf4 = message;\
  12041. msg.\cf15 type\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf15 kWCMessageTypeGif\cf4 ];\
  12042. msg.\cf15 isSend\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf5 transfer_status_ing\cf4 ];\
  12043. msg.\cf15 isRead\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithBool\cf4 :
  12044. \f2\b \cf8 NO
  12045. \f0\b0 \cf4 ];\
  12046. msg.\cf15 isReadDel\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :
  12047. \f2\b \cf8 NO
  12048. \f0\b0 \cf4 ];\
  12049. \
  12050. [msg \cf15 insert\cf4 :
  12051. \f2\b \cf8 self
  12052. \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\
  12053. \
  12054. \
  12055. \f2\b \cf8 if
  12056. \f0\b0 \cf4 (\cf15 _useInfoTempChat\cf4 ==\cf7 11\cf4 ) \{\
  12057. \
  12058. msg.\cf15 tempChat\cf4 = \cf7 11\cf4 ;\
  12059. \}
  12060. \f2\b \cf8 else
  12061. \f0\b0 \cf4 \
  12062. \{\
  12063. \
  12064. msg.tempChat = \cf7 1\cf4 ;\
  12065. \}\
  12066. [\cf5 g_xmpp\cf4 sendMessage:msg roomName:
  12067. \f2\b \cf8 self
  12068. \f0\b0 \cf4 .roomJid];\cf2 //
  12069. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  12070. \f0 \cf4 \
  12071. [
  12072. \f2\b \cf8 self
  12073. \f0\b0 \cf4 \cf15 showOneMsg\cf4 :msg];\
  12074. \cf2 // [msg release];\cf4 \
  12075. \}\
  12076. \cf2 // [_messageText setText:nil];\cf4 \
  12077. \}\
  12078. \
  12079. \
  12080. \cf5 #pragma mark
  12081. \f2\b \cf16 -
  12082. \f4 \'ca\'e4\'c8\'eb
  12083. \f2 TextField
  12084. \f4 \'b4\'fa\'c0\'ed
  12085. \f0\b0 \cf4 \
  12086. \
  12087. -(
  12088. \f2\b \cf8 void
  12089. \f0\b0 \cf4 )\cf11 doBeginEdit\cf4 \{\
  12090. \cf15 _table\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf7 0\cf4 ,
  12091. \f2\b \cf8 self
  12092. \f0\b0 \cf4 .\cf15 heightHeader\cf4 +\cf15 _noticeHeight\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 ,
  12093. \f2\b \cf8 self
  12094. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 -\cf5 faceHeight\cf4 -
  12095. \f2\b \cf8 self
  12096. \f0\b0 \cf4 .\cf15 heightHeader\cf4 -
  12097. \f2\b \cf8 self
  12098. \f0\b0 \cf4 .\cf15 heightFooter\cf4 -\cf15 _noticeHeight\cf4 );\
  12099. \f2\b \cf8 self
  12100. \f0\b0 \cf4 .\cf14 tableFooter\cf4 .frame = \cf15 CGRectMake\cf4 (\cf7 0\cf4 , _table.\cf15 frame\cf4 .origin.y+_table.frame.size.height, JX_SCREEN_WIDTH,
  12101. \f2\b \cf8 self
  12102. \f0\b0 \cf4 .heightFooter);\
  12103. [\cf15 _table\cf4 \cf15 gotoLastRow\cf4 :
  12104. \f2\b \cf8 NO
  12105. \f0\b0 \cf4 ];\
  12106. \}\
  12107. \
  12108. -(
  12109. \f2\b \cf8 void
  12110. \f0\b0 \cf4 )\cf11 doEndEdit\cf4 \{\
  12111. \
  12112. _textViewBtn.hidden =
  12113. \f2\b \cf8 YES
  12114. \f0\b0 \cf4 ;\
  12115. \
  12116. \
  12117. \f2\b \cf8 if
  12118. \f0\b0 \cf4 (\cf5 _messageText\cf4 .\cf15 isFirstResponder\cf4 ) \{\
  12119. \
  12120. \cf14 _table\cf4 .\cf14 frame\cf4 =\cf14 CGRectMake\cf4 (\cf7 0\cf4 ,
  12121. \f2\b \cf8 self
  12122. \f0\b0 \cf4 .\cf15 heightHeader\cf4 +\cf15 _noticeHeight\cf4 ,\cf5 self_width\cf4 ,\cf5 JX_SCREEN_HEIGHT\cf4 -
  12123. \f2\b \cf8 self
  12124. \f0\b0 \cf4 .\cf15 heightHeader\cf4 -
  12125. \f2\b \cf8 self
  12126. \f0\b0 \cf4 .\cf15 heightFooter\cf4 -\cf15 _noticeHeight\cf4 );\
  12127. \f2\b \cf8 self
  12128. \f0\b0 \cf4 .\cf14 tableFooter\cf4 .frame = \cf15 CGRectMake\cf4 (\cf7 0\cf4 , \cf15 JX_SCREEN_HEIGHT\cf4 -
  12129. \f2\b \cf8 self
  12130. \f0\b0 \cf4 .\cf5 heightFooter\cf4 , JX_SCREEN_WIDTH,
  12131. \f2\b \cf8 self
  12132. \f0\b0 \cf4 .heightFooter);\
  12133. \cf15 _btnFace\cf4 .selected =
  12134. \f2\b \cf8 NO
  12135. \f0\b0 \cf4 ;\
  12136. [\cf14 _messageText\cf4 \cf5 resignFirstResponder\cf4 ];\
  12137. \cf15 _messageText\cf4 .\cf14 inputView\cf4 =
  12138. \f2\b \cf8 nil
  12139. \f0\b0 \cf4 ;\
  12140. \f2\b \cf8 self
  12141. \f0\b0 \cf4 .\cf14 deltaHeight\cf4 = \cf7 0\cf4 ;\
  12142. \f2\b \cf8 self
  12143. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .frame = CGRectMake(
  12144. \f2\b \cf8 self
  12145. \f0\b0 \cf4 .screenShotView.frame.origin.x,
  12146. \f2\b \cf8 self
  12147. \f0\b0 \cf4 .tableFooter.frame.origin.y -
  12148. \f2\b \cf8 self
  12149. \f0\b0 \cf4 .screenShotView.frame.size.height - \cf7 10\cf4 ,
  12150. \f2\b \cf8 self
  12151. \f0\b0 \cf4 .screenShotView.frame.size.width,
  12152. \f2\b \cf8 self
  12153. \f0\b0 \cf4 .screenShotView.frame.size.height);\
  12154. [\cf15 _table\cf4 gotoLastRow:
  12155. \f2\b \cf8 NO
  12156. \f0\b0 \cf4 ];\
  12157. \}\
  12158. \
  12159. \f2\b \cf8 if
  12160. \f0\b0 \cf4 (\cf15 _faceView\cf4 && !\cf14 _faceView\cf4 .\cf14 hidden\cf4 ) \{\
  12161. \cf15 _table\cf4 .frame =\cf15 CGRectMake\cf4 (\cf7 0\cf4 ,
  12162. \f2\b \cf8 self
  12163. \f0\b0 \cf4 .\cf14 heightHeader\cf4 +\cf14 _noticeHeight\cf4 ,self_width,\cf15 JX_SCREEN_HEIGHT\cf4 -
  12164. \f2\b \cf8 self
  12165. \f0\b0 \cf4 .\cf14 heightHeader\cf4 -
  12166. \f2\b \cf8 self
  12167. \f0\b0 \cf4 .\cf15 heightFooter\cf4 -\cf14 _noticeHeight\cf4 );\
  12168. \f2\b \cf8 self
  12169. \f0\b0 \cf4 .\cf14 tableFooter\cf4 .frame = \cf15 CGRectMake\cf4 (\cf7 0\cf4 , \cf15 JX_SCREEN_HEIGHT\cf4 -
  12170. \f2\b \cf8 self
  12171. \f0\b0 \cf4 .\cf5 heightFooter\cf4 , JX_SCREEN_WIDTH,
  12172. \f2\b \cf8 self
  12173. \f0\b0 \cf4 .heightFooter);\
  12174. \cf15 _faceView\cf4 .hidden =
  12175. \f2\b \cf8 YES
  12176. \f0\b0 \cf4 ;\
  12177. [\cf5 _faceView\cf4 \cf5 removeFromSuperview\cf4 ];\
  12178. [\cf15 _table\cf4 \cf14 gotoLastRow\cf4 :
  12179. \f2\b \cf8 NO
  12180. \f0\b0 \cf4 ];\
  12181. \}\
  12182. \
  12183. \}\
  12184. \
  12185. - (
  12186. \f2\b \cf8 BOOL
  12187. \f0\b0 \cf4 )\cf5 textFieldShouldBeginEditing\cf4 :(UITextField *)textField\{\
  12188. [
  12189. \f2\b \cf8 self
  12190. \f0\b0 \cf4 doBeginEdit];\
  12191. \cf15 _btnFace\cf4 .\cf10 selected\cf4 =
  12192. \f2\b \cf8 NO
  12193. \f0\b0 \cf4 ;\
  12194. \cf2 // if([[NSDate date] timeIntervalSince1970] <= _disableSay)\cf4 \
  12195. \cf2 // return NO;\cf4 \
  12196. \cf2 // else\cf4 \
  12197. \cf2 // return YES;\cf4 \
  12198. \f2\b \cf8 return
  12199. \f0\b0 \cf4
  12200. \f2\b \cf8 YES
  12201. \f0\b0 \cf4 ;\
  12202. \}\
  12203. \
  12204. - (
  12205. \f2\b \cf8 BOOL
  12206. \f0\b0 \cf4 )\cf11 textFieldShouldEndEditing\cf4 :(\cf10 UITextField\cf4 *)textField \{\
  12207. [
  12208. \f2\b \cf8 self
  12209. \f0\b0 \cf4 \cf15 doEndEdit\cf4 ];\
  12210. \f2\b \cf8 return
  12211. \f0\b0 \cf4
  12212. \f2\b \cf8 YES
  12213. \f0\b0 \cf4 ;\
  12214. \}\
  12215. \
  12216. - (
  12217. \f2\b \cf8 BOOL
  12218. \f0\b0 \cf4 ) \cf11 hideKeyboard\cf4 :(
  12219. \f2\b \cf8 BOOL
  12220. \f0\b0 \cf4 )gotoLastRow\{\
  12221. \f2\b \cf8 if
  12222. \f0\b0 \cf4 (gotoLastRow)\
  12223. [\cf15 _table\cf4 \cf15 gotoLastRow\cf4 :
  12224. \f2\b \cf8 NO
  12225. \f0\b0 \cf4 ];\
  12226. \cf15 _btnFace\cf4 .\cf14 selected\cf4 =
  12227. \f2\b \cf8 NO
  12228. \f0\b0 \cf4 ;\
  12229. [\cf15 _messageText\cf4 \cf14 resignFirstResponder\cf4 ];\
  12230. \cf15 _messageText\cf4 .\cf14 inputView\cf4 =
  12231. \f2\b \cf8 nil
  12232. \f0\b0 \cf4 ;\
  12233. \f2\b \cf8 self
  12234. \f0\b0 \cf4 .\cf15 deltaHeight\cf4 = \cf7 0\cf4 ;\
  12235. [
  12236. \f2\b \cf8 self
  12237. \f0\b0 \cf4 \cf15 doEndEdit\cf4 ];\
  12238. \f2\b \cf8 self
  12239. \f0\b0 \cf4 .\cf15 shareMore\cf4 .\cf14 selected\cf4 =
  12240. \f2\b \cf8 NO
  12241. \f0\b0 \cf4 ;\
  12242. \f2\b \cf8 self
  12243. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (
  12244. \f2\b \cf8 self
  12245. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 x\cf4 ,
  12246. \f2\b \cf8 self
  12247. \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 y\cf4 -
  12248. \f2\b \cf8 self
  12249. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 - \cf7 10\cf4 ,
  12250. \f2\b \cf8 self
  12251. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 ,
  12252. \f2\b \cf8 self
  12253. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 );\
  12254. \f2\b \cf8 return
  12255. \f0\b0 \cf4
  12256. \f2\b \cf8 YES
  12257. \f0\b0 \cf4 ;\
  12258. \}\
  12259. \
  12260. - (
  12261. \f2\b \cf8 BOOL
  12262. \f0\b0 \cf4 )\cf11 textFieldShouldReturn\cf4 :(\cf10 UITextField\cf4 *)textField \{\
  12263. [
  12264. \f2\b \cf8 self
  12265. \f0\b0 \cf4 \cf15 hideKeyboard\cf4 :
  12266. \f2\b \cf8 YES
  12267. \f0\b0 \cf4 ];\
  12268. \f2\b \cf8 if
  12269. \f0\b0 \cf4 (textField.\cf14 tag\cf4 == \cf15 kWCMessageTypeGif\cf4 )\
  12270. [
  12271. \f2\b \cf8 self
  12272. \f0\b0 \cf4 \cf15 sendGif\cf4 :textField.\cf14 text\cf4 ];\
  12273. \f2\b \cf8 else
  12274. \f0\b0 \cf4 \{\
  12275. [
  12276. \f2\b \cf8 self
  12277. \f0\b0 \cf4 \cf15 sendIt\cf4 :textField];\
  12278. \}\
  12279. \f2\b \cf8 return
  12280. \f0\b0 \cf4
  12281. \f2\b \cf8 YES
  12282. \f0\b0 \cf4 ;\
  12283. \}\
  12284. \
  12285. -(
  12286. \f2\b \cf8 void
  12287. \f0\b0 \cf4 )\cf11 actionFace\cf4 :(\cf10 UIButton\cf4 *)sender\{\
  12288. \f2\b \cf8 if
  12289. \f0\b0 \cf4 ([
  12290. \f2\b \cf8 self
  12291. \f0\b0 \cf4 \cf15 showDisableSay\cf4 ])\
  12292. \f2\b \cf8 return
  12293. \f0\b0 \cf4 ;\
  12294. \
  12295. \f2\b \cf8 self
  12296. \f0\b0 \cf4 .\cf15 shareMore\cf4 .\cf14 selected\cf4 =
  12297. \f2\b \cf8 YES
  12298. \f0\b0 \cf4 ;\
  12299. \cf15 _messageText\cf4 .\cf14 inputView\cf4 =
  12300. \f2\b \cf8 nil
  12301. \f0\b0 \cf4 ;\
  12302. [\cf15 _messageText\cf4 \cf14 reloadInputViews\cf4 ];\
  12303. \
  12304. [
  12305. \f2\b \cf8 self
  12306. \f0\b0 \cf4 \cf15 offRecordBtns\cf4 ];\
  12307. \f2\b \cf8 if
  12308. \f0\b0 \cf4 (sender.\cf14 selected\cf4 )\{\
  12309. [
  12310. \f2\b \cf8 self
  12311. \f0\b0 \cf4 \cf15 doBeginEdit\cf4 ];\
  12312. [\cf15 _messageText\cf4 \cf14 becomeFirstResponder\cf4 ];\
  12313. [\cf15 _faceView\cf4 \cf14 removeFromSuperview\cf4 ];\
  12314. \cf15 _faceView\cf4 .\cf14 hidden\cf4 =
  12315. \f2\b \cf8 YES
  12316. \f0\b0 \cf4 ;\
  12317. sender.\cf14 selected\cf4 =
  12318. \f2\b \cf8 NO
  12319. \f0\b0 \cf4 ;\
  12320. \}
  12321. \f2\b \cf8 else
  12322. \f0\b0 \cf4 \{\
  12323. \f2\b \cf8 if
  12324. \f0\b0 \cf4 (\cf15 _faceView\cf4 ==
  12325. \f2\b \cf8 nil
  12326. \f0\b0 \cf4 )\{\
  12327. \cf15 _faceView\cf4 = \cf5 g_App\cf4 .\cf15 faceView2\cf4 ;\
  12328. \cf15 _faceView\cf4 .\cf15 delegate\cf4 =
  12329. \f2\b \cf8 self
  12330. \f0\b0 \cf4 ;\
  12331. \}\
  12332. [\cf15 _messageText\cf4 \cf14 resignFirstResponder\cf4 ];\
  12333. [
  12334. \f2\b \cf8 self
  12335. \f0\b0 \cf4 .\cf14 view\cf4 \cf14 addSubview\cf4 :\cf15 _faceView\cf4 ];\
  12336. \cf15 _faceView\cf4 .\cf14 hidden\cf4 =
  12337. \f2\b \cf8 NO
  12338. \f0\b0 \cf4 ;\
  12339. sender.\cf14 selected\cf4 =
  12340. \f2\b \cf8 YES
  12341. \f0\b0 \cf4 ;\
  12342. \cf2 // [_faceView selectType:0];\cf4 \
  12343. [
  12344. \f2\b \cf8 self
  12345. \f0\b0 \cf4 \cf15 doBeginEdit\cf4 ];\
  12346. \f2\b \cf8 self
  12347. \f0\b0 \cf4 .\cf15 deltaHeight\cf4 = -\cf5 faceHeight\cf4 ;\
  12348. [
  12349. \f2\b \cf8 self
  12350. \f0\b0 \cf4 \cf15 setTableFooterFrame\cf4 :\cf15 _messageText\cf4 ];\
  12351. \}\
  12352. \cf2 // [self doBeginEdit];\cf4 \
  12353. \}\
  12354. \
  12355. - (
  12356. \f2\b \cf8 void
  12357. \f0\b0 \cf4 ) \cf11 selectImageNameString\cf4 :(\cf10 NSString\cf4 *)imageName \cf11 ShortName\cf4 :(\cf10 NSString\cf4 *)shortName \cf11 isSelectImage\cf4 :(
  12358. \f2\b \cf8 BOOL
  12359. \f0\b0 \cf4 )isSelectImage \{\
  12360. \cf2 //
  12361. \f1 \'c8\'e7\'b9\'fb\'b2\'bb\'ca\'c7
  12362. \f0 delete
  12363. \f1 \'cf\'ec\'d3\'a6
  12364. \f0 ,
  12365. \f1 \'b5\'b1\'c7\'b0\'ca\'c7\'cc\'e1\'ca\'be\'d0\'c5\'cf\'a2\'a3\'ac\'d0\'de\'b8\'c4\'c6\'e4\'ca\'f4\'d0\'d4
  12366. \f0 \cf4 \
  12367. \f2\b \cf8 if
  12368. \f0\b0 \cf4 (![shortName \cf14 isEqualToString\cf4 :\cf6 @""\cf4 ] && \cf15 _messageText\cf4 .\cf14 textColor\cf4 == [\cf10 UIColor\cf4 \cf14 lightGrayColor\cf4 ]) \{\
  12369. \cf15 _messageText\cf4 .\cf14 text\cf4 = \cf6 @""\cf4 ;\cf2 //
  12370. \f1 \'d6\'c3\'bf\'d5
  12371. \f0 \cf4 \
  12372. \cf15 _messageText\cf4 .\cf14 textColor\cf4 = [\cf10 UIColor\cf4 \cf14 blackColor\cf4 ];\
  12373. \}\
  12374. \
  12375. \cf9 EmojiTextAttachment\cf4 *attachment = [[\cf9 EmojiTextAttachment\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
  12376. attachment.\cf15 emojiTag\cf4 = shortName;\
  12377. attachment.\cf14 image\cf4 = [\cf10 UIImage\cf4 \cf14 imageNamed\cf4 :imageName];\
  12378. attachment.\cf14 bounds\cf4 = \cf14 CGRectMake\cf4 (\cf7 0\cf4 , -\cf7 4\cf4 , \cf15 _messageText\cf4 .\cf14 font\cf4 .\cf14 lineHeight\cf4 , \cf15 _messageText\cf4 .\cf14 font\cf4 .\cf14 lineHeight\cf4 );\
  12379. \cf2 // attachment.emojiSize = CGSizeMake(_messageText.font.lineHeight, _messageText.font.lineHeight);\cf4 \
  12380. \
  12381. \cf10 NSRange\cf4 newRange = \cf14 NSMakeRange\cf4 (\cf15 _messageText\cf4 .\cf14 selectedRange\cf4 .\cf14 location\cf4 + \cf7 1\cf4 , \cf7 0\cf4 );\
  12382. \
  12383. \f2\b \cf8 if
  12384. \f0\b0 \cf4 (\cf15 _messageText\cf4 .\cf14 selectedRange\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  12385. [\cf15 _messageText\cf4 .\cf14 textStorage\cf4 \cf14 deleteCharactersInRange\cf4 :\cf15 _messageText\cf4 .\cf14 selectedRange\cf4 ];\
  12386. \}\
  12387. [\cf15 _messageText\cf4 .\cf14 textStorage\cf4 \cf14 insertAttributedString\cf4 :[\cf10 NSAttributedString\cf4 \cf14 attributedStringWithAttachment\cf4 :attachment] \cf14 atIndex\cf4 :\cf15 _messageText\cf4 .\cf14 selectedRange\cf4 .\cf14 location\cf4 ];\
  12388. \
  12389. \cf15 _messageText\cf4 .\cf14 selectedRange\cf4 = newRange;\
  12390. \cf15 _messageText\cf4 .\cf14 font\cf4 = \cf5 SYSFONT\cf4 (\cf7 18\cf4 );\
  12391. \
  12392. [\cf15 _messageText\cf4 \cf14 scrollRangeToVisible\cf4 :\cf14 NSMakeRange\cf4 (\cf15 _messageText\cf4 .\cf14 text\cf4 .\cf14 length\cf4 , \cf7 1\cf4 )];\
  12393. \f2\b \cf8 if
  12394. \f0\b0 \cf4 (isSelectImage) \{\
  12395. \f2\b \cf8 self
  12396. \f0\b0 \cf4 .\cf15 deltaHeight\cf4 = -\cf5 faceHeight\cf4 ;\
  12397. \}\
  12398. [
  12399. \f2\b \cf8 self
  12400. \f0\b0 \cf4 \cf15 setTableFooterFrame\cf4 :\cf15 _messageText\cf4 ];\
  12401. \}\
  12402. \
  12403. - (
  12404. \f2\b \cf8 void
  12405. \f0\b0 \cf4 )\cf11 faceViewDeleteAction\cf4 \{\
  12406. [\cf15 _messageText\cf4 \cf14 deleteBackward\cf4 ];\
  12407. \}\
  12408. \
  12409. - (
  12410. \f2\b \cf8 void
  12411. \f0\b0 \cf4 )\cf11 selectGifWithString\cf4 :(\cf10 NSString\cf4 *)str \{\
  12412. \cf2 // _messageText.text = str;\cf4 \
  12413. [
  12414. \f2\b \cf8 self
  12415. \f0\b0 \cf4 \cf15 sendGif\cf4 :str];\
  12416. \}\
  12417. \
  12418. \cf2 //
  12419. \f1 \'b7\'a2\'cb\'cd\'b1\'ed\'c7\'e9\'b0\'fc\'b1\'ed\'c7\'e9
  12420. \f0 \cf4 \
  12421. - (
  12422. \f2\b \cf8 void
  12423. \f0\b0 \cf4 )\cf11 selectEmojiPackgeWithString\cf4 :(\cf10 NSString\cf4 *)str \{\
  12424. \
  12425. \cf10 UIImage\cf4 * chosedImage=[[\cf9 SDImageCache\cf4 \cf15 sharedImageCache\cf4 ] \cf15 imageFromMemoryCacheForKey\cf4 :str];\
  12426. \cf2 //
  12427. \f1 \'bb\'f1\'c8\'a1
  12428. \f0 image
  12429. \f1 \'b5\'c4\'b3\'a4\'bf\'ed
  12430. \f0 \cf4 \
  12431. \f2\b \cf8 int
  12432. \f0\b0 \cf4 imageWidth = chosedImage.\cf14 size\cf4 .\cf14 width\cf4 ;\
  12433. \f2\b \cf8 int
  12434. \f0\b0 \cf4 imageHeight = chosedImage.\cf14 size\cf4 .\cf14 height\cf4 ;\
  12435. \cf10 NSString\cf4 *s = [str \cf14 pathExtension\cf4 ];\
  12436. \cf10 NSString\cf4 * file = [\cf9 FileInfo\cf4 \cf15 getUUIDFileName\cf4 :s];\
  12437. \
  12438. \f2\b \cf8 if
  12439. \f0\b0 \cf4 (
  12440. \f2\b \cf8 self
  12441. \f0\b0 \cf4 .\cf15 isCYMSGgroupANDFriendy\cf4 ) \{\
  12442. \cf9 JXMessageObject\cf4 *msg=[[\cf9 JXMessageObject\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
  12443. \f2\b \cf8 for
  12444. \f0\b0 \cf4 (\cf10 NSInteger\cf4 i = \cf7 0\cf4 ; i <
  12445. \f2\b \cf8 self
  12446. \f0\b0 \cf4 .\cf15 userIds\cf4 .\cf14 count\cf4 ; i ++) \{\
  12447. \cf10 NSString\cf4 *userId =
  12448. \f2\b \cf8 self
  12449. \f0\b0 \cf4 .\cf15 userIds\cf4 [i];\
  12450. \
  12451. \f2\b \cf8 if
  12452. \f0\b0 \cf4 ([file \cf14 length\cf4 ]>\cf7 0\cf4 ) \{\
  12453. \
  12454. msg.\cf15 timeSend\cf4 = [\cf10 NSDate\cf4 \cf14 date\cf4 ];\
  12455. msg.\cf15 fromUserId\cf4 = \cf5 MY_USER_ID\cf4 ;\
  12456. msg.\cf15 toUserId\cf4 = userId;\
  12457. \cf2 //
  12458. \f1 \'c8\'ba
  12459. \f0 \cf4 \
  12460. \f2\b \cf8 if
  12461. \f0\b0 \cf4 ([userId \cf14 length\cf4 ]>\cf7 10\cf4 )\{\
  12462. msg.\cf15 isGroup\cf4 =
  12463. \f2\b \cf8 YES
  12464. \f0\b0 \cf4 ;\
  12465. msg.\cf15 fromUserName\cf4 = \cf15 _userNickName\cf4 ;\
  12466. \}\
  12467. \f2\b \cf8 else
  12468. \f0\b0 \cf4 \{\
  12469. msg.\cf15 isGroup\cf4 =
  12470. \f2\b \cf8 NO
  12471. \f0\b0 \cf4 ;\
  12472. \}\
  12473. msg.\cf15 fileName\cf4 = file;\
  12474. msg.\cf15 content\cf4 = str;\
  12475. \cf2 // msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\cf4 \
  12476. \cf2 //
  12477. \f1 \'b8\'c4\'b3\'c9
  12478. \f0 kWCMessageTypeEmoji=12,
  12479. \f1 \'d7\'d4\'b6\'a8\'d2\'e5\'b5\'c4\'b1\'ed\'c7\'e9\'cf\'fb\'cf\'a2
  12480. \f0 \cf4 \
  12481. msg.\cf15 type\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf15 kWCMessageTypeEmoji\cf4 ];\
  12482. \cf2 // msg.remindType = [NSNumber numberWithInt:kWCMessageTypeCustomFace];\cf4 \
  12483. msg.\cf15 isSend\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf5 transfer_status_ing\cf4 ];\
  12484. msg.\cf15 isRead\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithBool\cf4 :
  12485. \f2\b \cf8 NO
  12486. \f0\b0 \cf4 ];\
  12487. msg.\cf15 isUpload\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithBool\cf4 :
  12488. \f2\b \cf8 YES
  12489. \f0\b0 \cf4 ];\
  12490. \cf2 //
  12491. \f1 \'d0\'c2\'cc\'ed\'bc\'d3\'b5\'c4\'cd\'bc\'c6\'ac\'bf\'ed\'b8\'df
  12492. \f0 \cf4 \
  12493. msg.\cf15 location_x\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :imageWidth];\
  12494. msg.\cf15 location_y\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :imageHeight];\
  12495. \
  12496. msg.\cf15 isReadDel\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :
  12497. \f2\b \cf8 self
  12498. \f0\b0 \cf4 .\cf15 isReadDelete\cf4 ];\
  12499. \
  12500. [msg \cf15 insert\cf4 :userId];\
  12501. \
  12502. \f2\b \cf8 if
  12503. \f0\b0 \cf4 ([userId \cf14 length\cf4 ]>\cf7 10\cf4 )\{\
  12504. [\cf5 g_xmpp\cf4 \cf15 sendMessage\cf4 :msg \cf15 roomName\cf4 :userId];\cf2 //
  12505. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  12506. \f0 \cf4 \
  12507. \}
  12508. \f2\b \cf8 else
  12509. \f0\b0 \cf4 \{\
  12510. [\cf5 g_xmpp\cf4 \cf15 sendMessage\cf4 :msg \cf15 roomName\cf4 :
  12511. \f2\b \cf8 nil
  12512. \f0\b0 \cf4 ];\cf2 //
  12513. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  12514. \f0 \cf4 \
  12515. \}\
  12516. \
  12517. [
  12518. \f2\b \cf8 self
  12519. \f0\b0 \cf4 \cf15 showOneMsg\cf4 :msg];\
  12520. \}\
  12521. \}\
  12522. \
  12523. \cf2 //
  12524. \f1 \'d0\'b4\'c8\'eb\'ca\'fd\'be\'dd\'bf\'e2
  12525. \f0 \cf4 \
  12526. \cf10 NSArray\cf4 *array =
  12527. \f2\b \cf8 self
  12528. \f0\b0 \cf4 .\cf15 userIds\cf4 ;\
  12529. \cf10 NSString\cf4 *userIdsString = [array \cf14 componentsJoinedByString\cf4 :\cf6 @","\cf4 ];\
  12530. array =
  12531. \f2\b \cf8 self
  12532. \f0\b0 \cf4 .\cf15 userNames\cf4 ;\
  12533. \cf10 NSString\cf4 *userNamesString = [array \cf14 componentsJoinedByString\cf4 :\cf6 @","\cf4 ];\
  12534. array =
  12535. \f2\b \cf8 self
  12536. \f0\b0 \cf4 .\cf15 userNamesWithGroup\cf4 ;\
  12537. \cf10 NSString\cf4 *userNamesWithGroupString = [array \cf14 componentsJoinedByString\cf4 :\cf6 @","\cf4 ];\
  12538. NSString *sendTime = [NSString stringWithFormat:\cf6 @"%@"\cf4 , msg.dictionary[\cf6 @"timeSend"\cf4 ]];\
  12539. \
  12540. array =
  12541. \f2\b \cf8 self
  12542. \f0\b0 \cf4 .userNmaesWithFriend;\
  12543. NSString *userNmaesWithFriendString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
  12544. \
  12545. JXLabelObject *obj = JXLabelObject.sharedInstance;\
  12546. obj.userId = msg.fromUserId;\
  12547. obj.userIds = userIdsString;\
  12548. obj.text1 = _names;\
  12549. obj.text2 = _names2;\
  12550. obj.userNames = userNamesString;\
  12551. obj.userNamesWithGroup = userNamesWithGroupString;\
  12552. obj.message = \cf6 @"[
  12553. \f1 \'b1\'ed\'c7\'e9
  12554. \f0 ]"\cf4 ;\
  12555. obj.sendTime = sendTime;\
  12556. obj.userNmaesWithFriend = userNmaesWithFriendString;\
  12557. \f2\b \cf8 BOOL
  12558. \f0\b0 \cf4 succeed = [obj insertRecord];\
  12559. \f2\b \cf8 if
  12560. \f0\b0 \cf4 (succeed) \{\
  12561. [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
  12562. [g_notify postNotificationName:kGroupHelperRefreshNotif object:
  12563. \f2\b \cf8 nil
  12564. \f0\b0 \cf4 ];\
  12565. [g_navigation popToViewController:[CYGroupSendHelperViewController
  12566. \f2\b \cf8 class
  12567. \f0\b0 \cf4 ] animated:
  12568. \f2\b \cf8 YES
  12569. \f0\b0 \cf4 ];\
  12570. \}\
  12571. \
  12572. \
  12573. \}
  12574. \f2\b \cf8 else
  12575. \f0\b0 \cf4 \{\
  12576. \cf2 //
  12577. \f1 \'b5\'a5\'c1\'c4
  12578. \f0 ,
  12579. \f1 \'c8\'ba\'c1\'c4
  12580. \f0 \cf4 \
  12581. \f2\b \cf8 if
  12582. \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
  12583. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  12584. msg.timeSend = [NSDate date];\
  12585. msg.fromUserId = MY_USER_ID;\
  12586. \f2\b \cf8 if
  12587. \f0\b0 \cf4 ([
  12588. \f2\b \cf8 self
  12589. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  12590. msg.toUserId =
  12591. \f2\b \cf8 self
  12592. \f0\b0 \cf4 .roomJid;\
  12593. msg.isGroup =
  12594. \f2\b \cf8 YES
  12595. \f0\b0 \cf4 ;\
  12596. msg.fromUserName = _userNickName;\
  12597. \}\
  12598. \f2\b \cf8 else
  12599. \f0\b0 \cf4 \{\
  12600. msg.toUserId = chatPerson.userId;\
  12601. msg.isGroup =
  12602. \f2\b \cf8 NO
  12603. \f0\b0 \cf4 ;\
  12604. \}\
  12605. msg.fileName = file;\
  12606. msg.content = str;\
  12607. \cf2 // msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\cf4 \
  12608. \cf2 //
  12609. \f1 \'b8\'c4\'b3\'c9
  12610. \f0 kWCMessageTypeEmoji=12,
  12611. \f1 \'b1\'ed\'c7\'e9\'b0\'fc\'b1\'ed\'c7\'e9\'cf\'fb\'cf\'a2
  12612. \f0 \cf4 \
  12613. msg.type = [NSNumber numberWithInt:kWCMessageTypeEmoji];\
  12614. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  12615. msg.isRead = [NSNumber numberWithBool:
  12616. \f2\b \cf8 NO
  12617. \f0\b0 \cf4 ];\
  12618. msg.isUpload = [NSNumber numberWithBool:
  12619. \f2\b \cf8 YES
  12620. \f0\b0 \cf4 ];\
  12621. \cf2 //
  12622. \f1 \'d0\'c2\'cc\'ed\'bc\'d3\'b5\'c4\'cd\'bc\'c6\'ac\'bf\'ed\'b8\'df
  12623. \f0 \cf4 \
  12624. msg.location_x = [NSNumber numberWithInt:imageWidth];\
  12625. msg.location_y = [NSNumber numberWithInt:imageHeight];\
  12626. \
  12627. msg.isReadDel = [NSNumber numberWithInt:
  12628. \f2\b \cf8 self
  12629. \f0\b0 \cf4 .isReadDelete];\
  12630. \cf2 // msg.remindType = [NSNumber numberWithInt:kWCMessageTypeEmoji];\cf4 \
  12631. \
  12632. [msg insert:
  12633. \f2\b \cf8 self
  12634. \f0\b0 \cf4 .roomJid];\
  12635. [g_xmpp sendMessage:msg roomName:
  12636. \f2\b \cf8 self
  12637. \f0\b0 \cf4 .roomJid];\cf2 //
  12638. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  12639. \f0 \cf4 \
  12640. [
  12641. \f2\b \cf8 self
  12642. \f0\b0 \cf4 showOneMsg:msg];\
  12643. \cf2 // [msg release];\cf4 \
  12644. \}\
  12645. \}\
  12646. \
  12647. \
  12648. \}\
  12649. \
  12650. \
  12651. \cf2 //
  12652. \f1 \'b7\'a2\'cb\'cd\'ca\'d5\'b2\'d8\'b1\'ed\'c7\'e9
  12653. \f0 \cf4 \
  12654. - (
  12655. \f2\b \cf8 void
  12656. \f0\b0 \cf4 )\cf11 selectFavoritWithString\cf4 :(NSString *)str \{\
  12657. \
  12658. UIImage * chosedImage=[[SDImageCache sharedImageCache] imageFromMemoryCacheForKey:str];\
  12659. \cf2 //
  12660. \f1 \'bb\'f1\'c8\'a1
  12661. \f0 image
  12662. \f1 \'b5\'c4\'b3\'a4\'bf\'ed
  12663. \f0 \cf4 \
  12664. \f2\b \cf8 int
  12665. \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
  12666. \f2\b \cf8 int
  12667. \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
  12668. NSString *s = [str pathExtension];\
  12669. NSString* file = [FileInfo getUUIDFileName:s];\
  12670. \
  12671. \cf2 //
  12672. \f1 \'c8\'ba\'b7\'a2\'d6\'fa\'ca\'d6
  12673. \f0 \cf4 \
  12674. \f2\b \cf8 if
  12675. \f0\b0 \cf4 (
  12676. \f2\b \cf8 self
  12677. \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
  12678. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  12679. \f2\b \cf8 for
  12680. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
  12681. \f2\b \cf8 self
  12682. \f0\b0 \cf4 .userIds.count; i ++) \{\
  12683. NSString *userId =
  12684. \f2\b \cf8 self
  12685. \f0\b0 \cf4 .userIds[i];\
  12686. \
  12687. \f2\b \cf8 if
  12688. \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
  12689. msg.timeSend = [NSDate date];\
  12690. msg.fromUserId = MY_USER_ID;\
  12691. msg.toUserId = userId;\
  12692. \cf2 //
  12693. \f1 \'c8\'ba
  12694. \f0 \cf4 \
  12695. \f2\b \cf8 if
  12696. \f0\b0 \cf4 ([userId length]>\cf7 10\cf4 )\{\
  12697. msg.isGroup =
  12698. \f2\b \cf8 YES
  12699. \f0\b0 \cf4 ;\
  12700. msg.fromUserName = _userNickName;\
  12701. \}\
  12702. \f2\b \cf8 else
  12703. \f0\b0 \cf4 \{\
  12704. msg.isGroup =
  12705. \f2\b \cf8 NO
  12706. \f0\b0 \cf4 ;\
  12707. \}\
  12708. msg.fileName = file;\
  12709. msg.content = str;\
  12710. \cf2 // msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\cf4 \
  12711. \cf2 //
  12712. \f1 \'b8\'c4\'b3\'c9
  12713. \f0 kWCMessageTypeCustomFace=11,
  12714. \f1 \'d7\'d4\'b6\'a8\'d2\'e5\'b5\'c4\'b1\'ed\'c7\'e9\'cf\'fb\'cf\'a2
  12715. \f0 \cf4 \
  12716. msg.type = [NSNumber numberWithInt:kWCMessageTypeCustomFace];\
  12717. \cf2 // msg.remindType = [NSNumber numberWithInt:kWCMessageTypeCustomFace];\cf4 \
  12718. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  12719. msg.isRead = [NSNumber numberWithBool:
  12720. \f2\b \cf8 NO
  12721. \f0\b0 \cf4 ];\
  12722. msg.isUpload = [NSNumber numberWithBool:
  12723. \f2\b \cf8 YES
  12724. \f0\b0 \cf4 ];\
  12725. \cf2 //
  12726. \f1 \'d0\'c2\'cc\'ed\'bc\'d3\'b5\'c4\'cd\'bc\'c6\'ac\'bf\'ed\'b8\'df
  12727. \f0 \cf4 \
  12728. msg.location_x = [NSNumber numberWithInt:imageWidth];\
  12729. msg.location_y = [NSNumber numberWithInt:imageHeight];\
  12730. \
  12731. msg.isReadDel = [NSNumber numberWithInt:
  12732. \f2\b \cf8 self
  12733. \f0\b0 \cf4 .isReadDelete];\
  12734. \
  12735. [msg insert:userId];\
  12736. \f2\b \cf8 if
  12737. \f0\b0 \cf4 ([userId length]>\cf7 10\cf4 )\{\
  12738. [g_xmpp sendMessage:msg roomName:userId];\cf2 //
  12739. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  12740. \f0 \cf4 \
  12741. \}
  12742. \f2\b \cf8 else
  12743. \f0\b0 \cf4 \{\
  12744. [g_xmpp sendMessage:msg roomName:
  12745. \f2\b \cf8 nil
  12746. \f0\b0 \cf4 ];\cf2 //
  12747. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  12748. \f0 \cf4 \
  12749. \}\
  12750. \
  12751. \}\
  12752. \}\
  12753. \cf2 //
  12754. \f1 \'d0\'b4\'c8\'eb\'ca\'fd\'be\'dd\'bf\'e2
  12755. \f0 \cf4 \
  12756. NSArray *array =
  12757. \f2\b \cf8 self
  12758. \f0\b0 \cf4 .userIds;\
  12759. NSString *userIdsString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
  12760. array =
  12761. \f2\b \cf8 self
  12762. \f0\b0 \cf4 .userNames;\
  12763. NSString *userNamesString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
  12764. array =
  12765. \f2\b \cf8 self
  12766. \f0\b0 \cf4 .userNamesWithGroup;\
  12767. NSString *userNamesWithGroupString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
  12768. NSString *sendTime = [NSString stringWithFormat:\cf6 @"%@"\cf4 , msg.dictionary[\cf6 @"timeSend"\cf4 ]];\
  12769. \
  12770. array =
  12771. \f2\b \cf8 self
  12772. \f0\b0 \cf4 .userNmaesWithFriend;\
  12773. NSString *userNmaesWithFriendString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
  12774. \
  12775. JXLabelObject *obj = JXLabelObject.sharedInstance;\
  12776. obj.userId = msg.fromUserId;\
  12777. obj.userIds = userIdsString;\
  12778. obj.text1 = _names;\
  12779. obj.text2 = _names2;\
  12780. obj.userNames = userNamesString;\
  12781. obj.userNamesWithGroup = userNamesWithGroupString;\
  12782. obj.message = \cf6 @"[
  12783. \f1 \'cd\'bc\'c6\'ac
  12784. \f0 ]"\cf4 ;\
  12785. obj.sendTime = sendTime;\
  12786. obj.userNmaesWithFriend = userNmaesWithFriendString;\
  12787. \f2\b \cf8 BOOL
  12788. \f0\b0 \cf4 succeed = [obj insertRecord];\
  12789. \f2\b \cf8 if
  12790. \f0\b0 \cf4 (succeed) \{\
  12791. [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
  12792. [g_notify postNotificationName:kGroupHelperRefreshNotif object:
  12793. \f2\b \cf8 nil
  12794. \f0\b0 \cf4 ];\
  12795. [g_navigation popToViewController:[CYGroupSendHelperViewController
  12796. \f2\b \cf8 class
  12797. \f0\b0 \cf4 ] animated:
  12798. \f2\b \cf8 YES
  12799. \f0\b0 \cf4 ];\
  12800. \}\
  12801. \
  12802. \}
  12803. \f2\b \cf8 else
  12804. \f0\b0 \cf4 \{\
  12805. \cf2 //
  12806. \f1 \'b5\'a5\'c1\'c4
  12807. \f0 ,
  12808. \f1 \'c8\'ba\'c1\'c4
  12809. \f0 \cf4 \
  12810. \f2\b \cf8 if
  12811. \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
  12812. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  12813. msg.timeSend = [NSDate date];\
  12814. msg.fromUserId = MY_USER_ID;\
  12815. \f2\b \cf8 if
  12816. \f0\b0 \cf4 ([
  12817. \f2\b \cf8 self
  12818. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  12819. msg.toUserId =
  12820. \f2\b \cf8 self
  12821. \f0\b0 \cf4 .roomJid;\
  12822. msg.isGroup =
  12823. \f2\b \cf8 YES
  12824. \f0\b0 \cf4 ;\
  12825. msg.fromUserName = _userNickName;\
  12826. \}\
  12827. \f2\b \cf8 else
  12828. \f0\b0 \cf4 \{\
  12829. msg.toUserId = chatPerson.userId;\
  12830. msg.isGroup =
  12831. \f2\b \cf8 NO
  12832. \f0\b0 \cf4 ;\
  12833. \}\
  12834. msg.fileName = file;\
  12835. msg.content = str;\
  12836. \cf2 // msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\cf4 \
  12837. \cf2 //
  12838. \f1 \'b8\'c4\'b3\'c9
  12839. \f0 kWCMessageTypeCustomFace=11,
  12840. \f1 \'d7\'d4\'b6\'a8\'d2\'e5\'b5\'c4\'b1\'ed\'c7\'e9\'cf\'fb\'cf\'a2
  12841. \f0 \cf4 \
  12842. msg.type = [NSNumber numberWithInt:kWCMessageTypeCustomFace];\
  12843. \cf2 // msg.remindType = [NSNumber numberWithInt:kWCMessageTypeCustomFace];\cf4 \
  12844. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  12845. msg.isRead = [NSNumber numberWithBool:
  12846. \f2\b \cf8 NO
  12847. \f0\b0 \cf4 ];\
  12848. msg.isUpload = [NSNumber numberWithBool:
  12849. \f2\b \cf8 YES
  12850. \f0\b0 \cf4 ];\
  12851. \cf2 //
  12852. \f1 \'d0\'c2\'cc\'ed\'bc\'d3\'b5\'c4\'cd\'bc\'c6\'ac\'bf\'ed\'b8\'df
  12853. \f0 \cf4 \
  12854. msg.location_x = [NSNumber numberWithInt:imageWidth];\
  12855. msg.location_y = [NSNumber numberWithInt:imageHeight];\
  12856. \
  12857. msg.isReadDel = [NSNumber numberWithInt:
  12858. \f2\b \cf8 self
  12859. \f0\b0 \cf4 .isReadDelete];\
  12860. \
  12861. [msg insert:
  12862. \f2\b \cf8 self
  12863. \f0\b0 \cf4 .roomJid];\
  12864. [g_xmpp sendMessage:msg roomName:
  12865. \f2\b \cf8 self
  12866. \f0\b0 \cf4 .roomJid];\cf2 //
  12867. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  12868. \f0 \cf4 \
  12869. [
  12870. \f2\b \cf8 self
  12871. \f0\b0 \cf4 showOneMsg:msg];\
  12872. \cf2 // [msg release];\cf4 \
  12873. \}\
  12874. \
  12875. \}\
  12876. \
  12877. \
  12878. \}\
  12879. \
  12880. \cf2 //
  12881. \f1 \'c8\'a1\'cf\'fb\'ca\'d5\'b2\'d8
  12882. \f0 \cf4 \
  12883. - (
  12884. \f2\b \cf8 void
  12885. \f0\b0 \cf4 )\cf11 deleteFavoritWithString\cf4 :(NSString *)str \{\
  12886. \cf2 // [g_server userEmojiDeleteWithId:str toView:self];\cf4 \
  12887. [g_server faceClollectDeleteFaceClollect:str View:
  12888. \f2\b \cf8 self
  12889. \f0\b0 \cf4 ];\
  12890. \}\
  12891. \
  12892. - (
  12893. \f2\b \cf8 BOOL
  12894. \f0\b0 \cf4 )\cf11 textView\cf4 :(UITextView *)textView \cf11 shouldChangeTextInRange\cf4 :(NSRange)range \cf11 replacementText\cf4 :(NSString *)text \{\
  12895. \cf2 //
  12896. \f1 \'d6\'bb\'d3\'d0\'cb\'ae\'d3\'a1\'ca\'b1\'a3\'ac\'b2\'bb\'c4\'dc
  12897. \f0 send\cf4 \
  12898. \f2\b \cf8 if
  12899. \f0\b0 \cf4 ([text isEqualToString:\cf6 @"\\n"\cf4 ] && textView.textColor == [UIColor lightGrayColor]) \{\
  12900. \f2\b \cf8 return
  12901. \f0\b0 \cf4
  12902. \f2\b \cf8 NO
  12903. \f0\b0 \cf4 ;\
  12904. \}\
  12905. \cf2 //
  12906. \f1 \'c8\'e7\'b9\'fb\'b2\'bb\'ca\'c7
  12907. \f0 delete
  12908. \f1 \'cf\'ec\'d3\'a6
  12909. \f0 ,
  12910. \f1 \'b5\'b1\'c7\'b0\'ca\'c7\'cc\'e1\'ca\'be\'d0\'c5\'cf\'a2\'a3\'ac\'d0\'de\'b8\'c4\'c6\'e4\'ca\'f4\'d0\'d4
  12911. \f0 \cf4 \
  12912. \f2\b \cf8 if
  12913. \f0\b0 \cf4 (![text isEqualToString:\cf6 @""\cf4 ] && textView.textColor == [UIColor lightGrayColor]) \{\
  12914. textView.text = \cf6 @""\cf4 ;\cf2 //
  12915. \f1 \'d6\'c3\'bf\'d5
  12916. \f0 \cf4 \
  12917. textView.textColor = [UIColor blackColor];\
  12918. \}\
  12919. \
  12920. NSMutableArray *arr = [NSMutableArray array];\
  12921. [
  12922. \f2\b \cf8 self
  12923. \f0\b0 \cf4 getImageRange:text array:arr];\
  12924. \f2\b \cf8 if
  12925. \f0\b0 \cf4 (arr.count > \cf7 1\cf4 ) \{\
  12926. \f2\b \cf8 for
  12927. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < arr.count; i ++) \{\
  12928. NSString *str = arr[i];\
  12929. NSInteger n;\
  12930. \
  12931. _messageText.font = SYSFONT(\cf7 18\cf4 );\
  12932. \f2\b \cf8 if
  12933. \f0\b0 \cf4 ([str hasPrefix:\cf6 @"["\cf4 ]&&[str hasSuffix:\cf6 @"]"\cf4 ] && [g_faceVC.shortNameArrayE containsObject:str]) \{\
  12934. n = [g_faceVC.shortNameArrayE indexOfObject:str];\
  12935. NSDictionary *dic = [g_constant.emojiArray objectAtIndex:n];\
  12936. [
  12937. \f2\b \cf8 self
  12938. \f0\b0 \cf4 selectImageNameString:dic[\cf6 @"filename"\cf4 ] ShortName:str isSelectImage:
  12939. \f2\b \cf8 NO
  12940. \f0\b0 \cf4 ];\
  12941. NSLog(\cf6 @""\cf4 );\
  12942. \}
  12943. \f2\b \cf8 else
  12944. \f0\b0 \cf4 \{\
  12945. \cf2 // NSMutableString *textViewStr = [_messageText.text mutableCopy];\cf4 \
  12946. \cf2 // [textViewStr insertString:str atIndex:_messageText.selectedRange.location];\cf4 \
  12947. \cf2 // _messageText.text = textViewStr;\cf4 \
  12948. NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];\
  12949. paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping;\
  12950. NSRange newRange = NSMakeRange(_messageText.selectedRange.location + str.length, \cf7 0\cf4 );\
  12951. [_messageText.textStorage insertAttributedString:[[NSAttributedString alloc] initWithString:str attributes:\cf7 @\{\cf4 NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:SYSFONT(\cf7 18\cf4 )\cf7 \}\cf4 ] atIndex:_messageText.selectedRange.location];\
  12952. \
  12953. _messageText.selectedRange = newRange;\
  12954. \
  12955. [_messageText scrollRangeToVisible:NSMakeRange(_messageText.text.length, \cf7 1\cf4 )];\
  12956. \}\
  12957. \}\
  12958. [
  12959. \f2\b \cf8 self
  12960. \f0\b0 \cf4 setTableFooterFrame:textView];\
  12961. \f2\b \cf8 return
  12962. \f0\b0 \cf4
  12963. \f2\b \cf8 NO
  12964. \f0\b0 \cf4 ;\
  12965. \}\
  12966. \
  12967. \f2\b \cf8 if
  12968. \f0\b0 \cf4 ([text isEqualToString:\cf6 @"\\n"\cf4 ])\{ \cf2 //
  12969. \f1 \'c5\'d0\'b6\'cf\'ca\'e4\'c8\'eb\'b5\'c4\'d7\'d6\'ca\'c7\'b7\'f1\'ca\'c7\'bb\'d8\'b3\'b5\'a3\'ac\'bc\'b4\'b0\'b4\'cf\'c2
  12970. \f0 return\cf4 \
  12971. \cf2 //
  12972. \f1 \'d4\'da\'d5\'e2\'c0\'ef\'d7\'f6\'c4\'e3\'cf\'ec\'d3\'a6
  12973. \f0 return
  12974. \f1 \'bc\'fc\'b5\'c4\'b4\'fa\'c2\'eb
  12975. \f0 \cf4 \
  12976. \cf2 // if(textView.tag == kWCMessageTypeGif)\cf4 \
  12977. \cf2 // [self sendGif:textView];\cf4 \
  12978. \cf2 // else\cf4 \
  12979. \f2\b \cf8 if
  12980. \f0\b0 \cf4 (
  12981. \f2\b \cf8 self
  12982. \f0\b0 \cf4 .isGroupMessages) \{\
  12983. [
  12984. \f2\b \cf8 self
  12985. \f0\b0 \cf4 hideKeyboard:
  12986. \f2\b \cf8 YES
  12987. \f0\b0 \cf4 ];\
  12988. _onceSendNum = \cf7 20\cf4 ;\
  12989. [
  12990. \f2\b \cf8 self
  12991. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_text];\
  12992. \}\
  12993. [
  12994. \f2\b \cf8 self
  12995. \f0\b0 \cf4 sendIt:textView];\
  12996. [
  12997. \f2\b \cf8 self
  12998. \f0\b0 \cf4 setTableFooterFrame:textView];\
  12999. \f2\b \cf8 return
  13000. \f0\b0 \cf4
  13001. \f2\b \cf8 NO
  13002. \f0\b0 \cf4 ; \cf2 //
  13003. \f1 \'d5\'e2\'c0\'ef\'b7\'b5\'bb\'d8
  13004. \f0 NO
  13005. \f1 \'a3\'ac\'be\'cd\'b4\'fa\'b1\'ed
  13006. \f0 return
  13007. \f1 \'bc\'fc\'d6\'b5\'ca\'a7\'d0\'a7\'a3\'ac\'bc\'b4\'d2\'b3\'c3\'e6\'c9\'cf\'b0\'b4\'cf\'c2
  13008. \f0 return
  13009. \f1 \'a3\'ac\'b2\'bb\'bb\'e1\'b3\'f6\'cf\'d6\'bb\'bb\'d0\'d0\'a3\'ac\'c8\'e7\'b9\'fb\'ce\'aa
  13010. \f0 yes
  13011. \f1 \'a3\'ac\'d4\'f2\'ca\'e4\'c8\'eb\'d2\'b3\'c3\'e6\'bb\'e1\'bb\'bb\'d0\'d0
  13012. \f0 \cf4 \
  13013. \}
  13014. \f2\b \cf8 else
  13015. \f0\b0 \cf4
  13016. \f2\b \cf8 if
  13017. \f0\b0 \cf4 ([text isEqualToString:\cf6 @"@"\cf4 ] && [
  13018. \f2\b \cf8 self
  13019. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  13020. \f2\b \cf8 if
  13021. \f0\b0 \cf4 (!
  13022. \f2\b \cf8 self
  13023. \f0\b0 \cf4 .isShowAT) \{\
  13024. \f2\b \cf8 self
  13025. \f0\b0 \cf4 .isShowAT =
  13026. \f2\b \cf8 YES
  13027. \f0\b0 \cf4 ;\
  13028. \cf2 //@
  13029. \f1 \'c8\'ba\'b3\'c9\'d4\'b1
  13030. \f0 \cf4 \
  13031. [
  13032. \f2\b \cf8 self
  13033. \f0\b0 \cf4 performSelector:
  13034. \f2\b \cf8 @selector
  13035. \f0\b0 \cf4 (showAtSelectMemberView) withObject:
  13036. \f2\b \cf8 nil
  13037. \f0\b0 \cf4 afterDelay:\cf7 0.35\cf4 ];\
  13038. \}\
  13039. \}\
  13040. \
  13041. \f2\b \cf8 return
  13042. \f0\b0 \cf4
  13043. \f2\b \cf8 YES
  13044. \f0\b0 \cf4 ;\
  13045. \}\
  13046. \
  13047. \
  13048. \cf5 #pragma mark
  13049. \f2\b \cf16 -
  13050. \f4 \'d3\'d0\'b1\'ed\'c7\'e9\'b5\'c4
  13051. \f2 txt
  13052. \f4 \'d7\'aa\'bb\'bb\'b3\'c9
  13053. \f2
  13054. \f4 \'ba\'ac\'cd\'bc\'c6\'ac\'b5\'c4
  13055. \f2 txt
  13056. \f0\b0 \cf4 \
  13057. - (
  13058. \f2\b \cf8 BOOL
  13059. \f0\b0 \cf4 )\cf11 changeEmjoyText\cf4 :(NSString *)text \cf11 textColor\cf4 :(UIColor *)textColor \{\
  13060. NSMutableArray *arr = [NSMutableArray array];\
  13061. [
  13062. \f2\b \cf8 self
  13063. \f0\b0 \cf4 getImageRange:text array:arr];\
  13064. NSRange newRange = _messageText.selectedRange;\
  13065. \f2\b \cf8 if
  13066. \f0\b0 \cf4 (arr.count > \cf7 1\cf4 ) \{\
  13067. \f2\b \cf8 for
  13068. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < arr.count; i ++) \{\
  13069. NSString *str = arr[i];\
  13070. NSInteger n;\
  13071. \
  13072. _messageText.font = SYSFONT(\cf7 18\cf4 );\
  13073. \f2\b \cf8 if
  13074. \f0\b0 \cf4 ([str hasPrefix:\cf6 @"["\cf4 ]&&[str hasSuffix:\cf6 @"]"\cf4 ] && [g_faceVC.shortNameArrayE containsObject:str]) \{\
  13075. n = [g_faceVC.shortNameArrayE indexOfObject:str];\
  13076. NSDictionary *dic = [g_constant.emojiArray objectAtIndex:n];\
  13077. \
  13078. EmojiTextAttachment *attachment = [[EmojiTextAttachment alloc] init];\
  13079. attachment.emojiTag = str;\
  13080. attachment.image = [UIImage imageNamed:dic[\cf6 @"filename"\cf4 ]];\
  13081. attachment.bounds = CGRectMake(\cf7 0\cf4 , -\cf7 4\cf4 , _messageText.font.lineHeight, _messageText.font.lineHeight);\
  13082. \
  13083. newRange = NSMakeRange(newRange.location + \cf7 1\cf4 , \cf7 0\cf4 );\
  13084. [_messageText.textStorage appendAttributedString:[NSAttributedString attributedStringWithAttachment:attachment]];\
  13085. _messageText.font = SYSFONT(\cf7 18\cf4 );\
  13086. \
  13087. [_messageText scrollRangeToVisible:NSMakeRange(_messageText.text.length, \cf7 1\cf4 )];\
  13088. \}
  13089. \f2\b \cf8 else
  13090. \f0\b0 \cf4 \{\
  13091. newRange = NSMakeRange(newRange.location + str.length, \cf7 0\cf4 );\
  13092. \
  13093. [_messageText.textStorage appendAttributedString:[[NSAttributedString alloc] initWithString:str attributes:\cf7 @\{\cf4 NSFontAttributeName:SYSFONT(\cf7 18\cf4 ),NSForegroundColorAttributeName:textColor\cf7 \}\cf4 ]];\
  13094. [_messageText scrollRangeToVisible:NSMakeRange(_messageText.text.length, \cf7 1\cf4 )];\
  13095. \}\
  13096. \
  13097. \}\
  13098. _messageText.selectedRange = newRange;\
  13099. \}\
  13100. \f2\b \cf8 return
  13101. \f0\b0 \cf4 arr.count > \cf7 1\cf4 ;\
  13102. \}\
  13103. \
  13104. \cf2 //
  13105. \f1 \'bd\'ab\'b1\'ed\'c7\'e9\'ba\'cd\'ce\'c4\'d7\'d6\'b7\'d6\'bf\'aa\'a3\'ac\'d7\'b0\'bd\'f8
  13106. \f0 array\cf4 \
  13107. -(
  13108. \f2\b \cf8 void
  13109. \f0\b0 \cf4 )\cf11 getImageRange\cf4 :(NSString*)message \cf11 array\cf4 : (NSMutableArray*)array \{\
  13110. NSRange range=[message rangeOfString: \cf6 @"["\cf4 ];\
  13111. NSRange range1=[message rangeOfString: \cf6 @"]"\cf4 ];\
  13112. NSRange atRange = [message rangeOfString:\cf6 @"@"\cf4 ];\
  13113. \cf2 //
  13114. \f1 \'c5\'d0\'b6\'cf\'b5\'b1\'c7\'b0\'d7\'d6\'b7\'fb\'b4\'ae\'ca\'c7\'b7\'f1\'bb\'b9\'d3\'d0\'b1\'ed\'c7\'e9\'b5\'c4\'b1\'ea\'d6\'be\'a1\'a3
  13115. \f0 \cf4 \
  13116. \
  13117. \cf2 // self.contentEmoji = [self isContainsEmoji:message];\cf4 \
  13118. \
  13119. \f2\b \cf8 if
  13120. \f0\b0 \cf4 (((range.length>\cf7 0\cf4 && range1.length>\cf7 0\cf4 ) || atRange.length>\cf7 0\cf4 ) && range1.location > range.location) \{\
  13121. \f2\b \cf8 if
  13122. \f0\b0 \cf4 (range.length>\cf7 0\cf4 && range1.length>\cf7 0\cf4 ) \{\
  13123. \cf2 // self.contentEmoji = YES;\cf4 \
  13124. \cf2 // if (range.location > 0) \{\cf4 \
  13125. \cf2 // [array addObject:[message substringToIndex:range.location]];\cf4 \
  13126. \cf2 // [array addObject:[message substringWithRange:NSMakeRange(range.location, range1.location+1-range.location)]];\cf4 \
  13127. \cf2 // NSString *str=[message substringFromIndex:range1.location+1];\cf4 \
  13128. \cf2 // [self getImageRange:str array:array];\cf4 \
  13129. \cf2 // \}else \{\cf4 \
  13130. \cf2 // NSString *nextstr=[message substringWithRange:NSMakeRange(range.location, range1.location+1-range.location)];\cf4 \
  13131. \cf2 // //
  13132. \f1 \'c5\'c5\'b3\'fd\'ce\'c4\'d7\'d6\'ca\'c7
  13133. \f0 \'93\'94
  13134. \f1 \'b5\'c4
  13135. \f0 \cf4 \
  13136. \cf2 // if (![nextstr isEqualToString:@""]) \{\cf4 \
  13137. \cf2 // [array addObject:nextstr];\cf4 \
  13138. \cf2 // NSString *str=[message substringFromIndex:range1.location+1];\cf4 \
  13139. \cf2 // [self getImageRange:str array:array];\cf4 \
  13140. \cf2 // \}else \{\cf4 \
  13141. \cf2 // return;\cf4 \
  13142. \cf2 // \}\cf4 \
  13143. \cf2 // \}\cf4 \
  13144. \f2\b \cf8 if
  13145. \f0\b0 \cf4 (range.\cf14 location\cf4 > \cf7 0\cf4 ) \{\
  13146. \
  13147. \cf10 NSString\cf4 *str = [message \cf14 substringToIndex\cf4 :range.\cf14 location\cf4 ];\
  13148. \
  13149. \cf10 NSString\cf4 *str1 = [message \cf14 substringFromIndex\cf4 :range.\cf14 location\cf4 ];\
  13150. \
  13151. [array \cf14 addObject\cf4 :str];\
  13152. \
  13153. [
  13154. \f2\b \cf8 self
  13155. \f0\b0 \cf4 \cf15 getImageRange\cf4 :str1 \cf15 array\cf4 :array];\
  13156. \
  13157. \}
  13158. \f2\b \cf8 else
  13159. \f0\b0 \cf4 \{\
  13160. \
  13161. \cf10 NSString\cf4 *emojiString = [message \cf14 substringWithRange\cf4 :\cf14 NSMakeRange\cf4 (range.\cf14 location\cf4 + \cf7 1\cf4 , range1.\cf14 location\cf4 - \cf7 1\cf4 )];\
  13162. \f2\b \cf8 BOOL
  13163. \f0\b0 \cf4 isEmoji =
  13164. \f2\b \cf8 NO
  13165. \f0\b0 \cf4 ;\
  13166. \cf10 NSString\cf4 *str;\
  13167. \cf10 NSString\cf4 *str1;\
  13168. \f2\b \cf8 for
  13169. \f0\b0 \cf4 (\cf10 NSMutableDictionary\cf4 *dic
  13170. \f2\b \cf8 in
  13171. \f0\b0 \cf4 \cf5 g_constant\cf4 .\cf15 emojiArray\cf4 ) \{\
  13172. \cf10 NSString\cf4 *emoji = [dic \cf14 objectForKey\cf4 :\cf6 @"english"\cf4 ];\
  13173. \f2\b \cf8 if
  13174. \f0\b0 \cf4 ([emoji \cf14 isEqualToString\cf4 :emojiString]) \{\
  13175. isEmoji =
  13176. \f2\b \cf8 YES
  13177. \f0\b0 \cf4 ;\
  13178. \f2\b \cf8 break
  13179. \f0\b0 \cf4 ;\
  13180. \}\
  13181. \}\
  13182. \f2\b \cf8 if
  13183. \f0\b0 \cf4 (isEmoji) \{\
  13184. str = [message \cf14 substringWithRange\cf4 :\cf14 NSMakeRange\cf4 (range.\cf14 location\cf4 , range1.\cf14 location\cf4 + \cf7 1\cf4 )];\
  13185. str1 = [message \cf14 substringFromIndex\cf4 :range1.\cf14 location\cf4 + \cf7 1\cf4 ];\
  13186. [array \cf14 addObject\cf4 :str];\
  13187. \}
  13188. \f2\b \cf8 else
  13189. \f0\b0 \cf4 \{\
  13190. \cf10 NSString\cf4 *posString = [message \cf14 substringWithRange\cf4 :\cf14 NSMakeRange\cf4 (range.\cf14 location\cf4 + \cf7 1\cf4 , range1.\cf14 location\cf4 )];\
  13191. \cf10 NSRange\cf4 posRange = [posString \cf14 rangeOfString\cf4 :\cf6 @"["\cf4 ];\
  13192. \f2\b \cf8 if
  13193. \f0\b0 \cf4 (posRange.\cf14 location\cf4 != \cf14 NSNotFound\cf4 ) \{\
  13194. str = [message \cf14 substringToIndex\cf4 :posRange.\cf14 location\cf4 ];\
  13195. str1 = [message \cf14 substringFromIndex\cf4 :posRange.\cf14 location\cf4 ];\
  13196. [array \cf14 addObject\cf4 :str];\
  13197. \}
  13198. \f2\b \cf8 else
  13199. \f0\b0 \cf4 \{\
  13200. str = [message \cf14 substringToIndex\cf4 :range1.\cf14 location\cf4 + \cf7 1\cf4 ];\
  13201. str1 = [message \cf14 substringFromIndex\cf4 :range1.\cf14 location\cf4 + \cf7 1\cf4 ];\
  13202. [array \cf14 addObject\cf4 :str];\
  13203. \}\
  13204. \}\
  13205. [
  13206. \f2\b \cf8 self
  13207. \f0\b0 \cf4 \cf15 getImageRange\cf4 :str1 \cf15 array\cf4 :array];\
  13208. \}\
  13209. \
  13210. \
  13211. \}
  13212. \f2\b \cf8 else
  13213. \f0\b0 \cf4
  13214. \f2\b \cf8 if
  13215. \f0\b0 \cf4 (atRange.\cf14 length\cf4 >\cf7 0\cf4 ) \{\
  13216. \f2\b \cf8 if
  13217. \f0\b0 \cf4 (atRange.\cf14 location\cf4 > \cf7 0\cf4 ) \{\
  13218. [array \cf14 addObject\cf4 :[message \cf14 substringToIndex\cf4 :atRange.\cf14 location\cf4 ]];\
  13219. [array \cf14 addObject\cf4 :[message \cf14 substringWithRange\cf4 :\cf14 NSMakeRange\cf4 (atRange.\cf14 location\cf4 , \cf7 1\cf4 )]];\
  13220. \cf10 NSString\cf4 *str=[message \cf14 substringFromIndex\cf4 :atRange.\cf14 location\cf4 +\cf7 1\cf4 ];\
  13221. [
  13222. \f2\b \cf8 self
  13223. \f0\b0 \cf4 \cf15 getImageRange\cf4 :str \cf15 array\cf4 :array];\
  13224. \}
  13225. \f2\b \cf8 else
  13226. \f0\b0 \cf4 \{\
  13227. [array \cf14 addObject\cf4 :[message \cf14 substringWithRange\cf4 :\cf14 NSMakeRange\cf4 (atRange.\cf14 location\cf4 , \cf7 1\cf4 )]];\
  13228. \cf10 NSString\cf4 *str=[message \cf14 substringFromIndex\cf4 :atRange.\cf14 location\cf4 +\cf7 1\cf4 ];\
  13229. [
  13230. \f2\b \cf8 self
  13231. \f0\b0 \cf4 \cf15 getImageRange\cf4 :str \cf15 array\cf4 :array];\
  13232. \}\
  13233. \
  13234. \}
  13235. \f2\b \cf8 else
  13236. \f0\b0 \cf4
  13237. \f2\b \cf8 if
  13238. \f0\b0 \cf4 (message !=
  13239. \f2\b \cf8 nil
  13240. \f0\b0 \cf4 ) \{\
  13241. [array \cf14 addObject\cf4 :message];\
  13242. \}\
  13243. \}\
  13244. \
  13245. \f2\b \cf8 else
  13246. \f0\b0 \cf4
  13247. \f2\b \cf8 if
  13248. \f0\b0 \cf4 (range.\cf14 length\cf4 >\cf7 0\cf4 && range1.\cf14 length\cf4 >\cf7 0\cf4 && range1.\cf14 location\cf4 < range.\cf14 location\cf4 )\{\
  13249. \cf10 NSString\cf4 *str = [message \cf14 substringToIndex\cf4 :range1.\cf14 location\cf4 + \cf7 1\cf4 ];\
  13250. \cf10 NSString\cf4 *str1 = [message \cf14 substringFromIndex\cf4 :range1.\cf14 location\cf4 + \cf7 1\cf4 ];\
  13251. [array \cf14 addObject\cf4 :str];\
  13252. [
  13253. \f2\b \cf8 self
  13254. \f0\b0 \cf4 \cf15 getImageRange\cf4 :str1 \cf15 array\cf4 :array];\
  13255. \}\
  13256. \
  13257. \
  13258. \
  13259. \f2\b \cf8 else
  13260. \f0\b0 \cf4
  13261. \f2\b \cf8 if
  13262. \f0\b0 \cf4 (message !=
  13263. \f2\b \cf8 nil
  13264. \f0\b0 \cf4 ) \{\
  13265. [array \cf14 addObject\cf4 :message];\
  13266. \}\
  13267. \}\
  13268. \
  13269. - (
  13270. \f2\b \cf8 void
  13271. \f0\b0 \cf4 )\cf11 textViewDidChangeSelection\cf4 :(\cf10 UITextView\cf4 *)textView \{\
  13272. \cf2 //
  13273. \f1 \'c8\'e7\'b9\'fb\'ca\'c7\'cc\'e1\'ca\'be\'c4\'da\'c8\'dd\'a3\'ac\'b9\'e2\'b1\'ea\'b7\'c5\'d6\'c3\'bf\'aa\'ca\'bc\'ce\'bb\'d6\'c3
  13274. \f0 \cf4 \
  13275. \f2\b \cf8 if
  13276. \f0\b0 \cf4 (textView.\cf14 textColor\cf4 ==[\cf10 UIColor\cf4 \cf14 lightGrayColor\cf4 ]) \{\
  13277. \cf10 NSRange\cf4 range;\
  13278. range.\cf14 location\cf4 = \cf7 0\cf4 ;\
  13279. range.\cf14 length\cf4 = \cf7 0\cf4 ;\
  13280. textView.\cf14 selectedRange\cf4 = range;\
  13281. \}\
  13282. \}\
  13283. \
  13284. - (
  13285. \f2\b \cf8 void
  13286. \f0\b0 \cf4 )\cf11 textViewDidChange\cf4 :(\cf10 UITextView\cf4 *)textView \{\
  13287. \
  13288. \f2\b \cf8 if
  13289. \f0\b0 \cf4 (textView.\cf14 text\cf4 .\cf10 length\cf4 <= \cf7 0\cf4 ) \{\
  13290. [
  13291. \f2\b \cf8 self
  13292. \f0\b0 \cf4 \cf14 removeAllAt\cf4 ];\
  13293. \cf2 //
  13294. \f1 \'cf\'d4\'ca\'be\'cb\'ae\'d3\'a1
  13295. \f0 \cf4 \
  13296. [
  13297. \f2\b \cf8 self
  13298. \f0\b0 \cf4 getTextViewWatermark];\
  13299. \}\
  13300. \
  13301. [
  13302. \f2\b \cf8 self
  13303. \f0\b0 \cf4 setTableFooterFrame:textView];\
  13304. \
  13305. \cf2 //
  13306. \f1 \'b7\'a2\'cb\'cd\'d5\'fd\'d4\'da\'ca\'e4\'c8\'eb\'b9\'fd\'c2\'cb\'cc\'f5\'bc\'fe
  13307. \f0 \cf4 \
  13308. \cf2 // BOOL enteringStatus = [g_default boolForKey:kStartEnteringStatus];\cf4 \
  13309. \f2\b \cf8 BOOL
  13310. \f0\b0 \cf4 enteringStatus = [g_myself.isTyping intValue] > \cf7 0\cf4 ?
  13311. \f2\b \cf8 YES
  13312. \f0\b0 \cf4 :
  13313. \f2\b \cf8 NO
  13314. \f0\b0 \cf4 ;\
  13315. \f2\b \cf8 if
  13316. \f0\b0 \cf4 (!enteringStatus ||
  13317. \f2\b \cf8 self
  13318. \f0\b0 \cf4 .\cf15 roomJid\cf4 ||
  13319. \f2\b \cf8 self
  13320. \f0\b0 \cf4 .\cf5 isSendEntering\cf4 ) \{\
  13321. \f2\b \cf8 return
  13322. \f0\b0 \cf4 ;\
  13323. \}\
  13324. \
  13325. \{\cf2 //
  13326. \f1 \'b7\'a2\'cb\'cd\'d5\'fd\'d4\'da\'ca\'e4\'c8\'eb
  13327. \f0 \cf4 \
  13328. \f2\b \cf8 self
  13329. \f0\b0 \cf4 .isSendEntering =
  13330. \f2\b \cf8 YES
  13331. \f0\b0 \cf4 ;\
  13332. [
  13333. \f2\b \cf8 self
  13334. \f0\b0 \cf4 sendEntering];\
  13335. [
  13336. \f2\b \cf8 self
  13337. \f0\b0 \cf4 .\cf15 enteringTimer\cf4 invalidate];\
  13338. \f2\b \cf8 self
  13339. \f0\b0 \cf4 .\cf15 enteringTimer\cf4 =
  13340. \f2\b \cf8 nil
  13341. \f0\b0 \cf4 ;\
  13342. \f2\b \cf8 self
  13343. \f0\b0 \cf4 .\cf15 enteringTimer\cf4 = [NSTimer scheduledTimerWithTimeInterval:\cf7 10\cf4 target:
  13344. \f2\b \cf8 self
  13345. \f0\b0 \cf4 selector:
  13346. \f2\b \cf8 @selector
  13347. \f0\b0 \cf4 (enteringTimerAction:) userInfo:
  13348. \f2\b \cf8 nil
  13349. \f0\b0 \cf4 repeats:
  13350. \f2\b \cf8 NO
  13351. \f0\b0 \cf4 ];\
  13352. \}\
  13353. \
  13354. \}\
  13355. \
  13356. - (
  13357. \f2\b \cf8 void
  13358. \f0\b0 \cf4 ) \cf10 enteringTimerAction\cf4 :(NSTimer *)timer \{\
  13359. \f2\b \cf8 self
  13360. \f0\b0 \cf4 .\cf14 isSendEntering\cf4 =
  13361. \f2\b \cf8 NO
  13362. \f0\b0 \cf4 ;\
  13363. [
  13364. \f2\b \cf8 self
  13365. \f0\b0 \cf4 .enteringTimer \cf5 invalidate\cf4 ];\
  13366. \f2\b \cf8 self
  13367. \f0\b0 \cf4 .\cf15 enteringTimer\cf4 =
  13368. \f2\b \cf8 nil
  13369. \f0\b0 \cf4 ;\
  13370. \}\
  13371. \cf2 //
  13372. \f1 \'bc\'fc\'c5\'cc
  13373. \f0 \cf4 \
  13374. - (
  13375. \f2\b \cf8 void
  13376. \f0\b0 \cf4 ) \cf5 setTableFooterFrame\cf4 :(UITextView *) textView \{\
  13377. \
  13378. \f2\b \cf8 static
  13379. \f0\b0 \cf4 CGFloat \cf10 maxHeight\cf4 =\cf7 66.0f\cf4 ;\
  13380. CGRect \cf10 frame\cf4 = textView.frame;\
  13381. \cf10 CGSize\cf4 constraintSize = \cf14 CGSizeMake\cf4 (frame.size.width, MAXFLOAT);\
  13382. \cf10 CGSize\cf4 size = [textView sizeThatFits:\cf14 constraintSize\cf4 ];\
  13383. \
  13384. \f2\b \cf8 if
  13385. \f0\b0 \cf4 (size.height >= \cf14 maxHeight\cf4 )\
  13386. \{\
  13387. size.height = maxHeight;\
  13388. \cf14 textView\cf4 .scrollEnabled =
  13389. \f2\b \cf8 YES
  13390. \f0\b0 \cf4 ; \cf2 //
  13391. \f1 \'d4\'ca\'d0\'ed\'b9\'f6\'b6\'af
  13392. \f0 \cf4 \
  13393. \}\
  13394. \f2\b \cf8 else
  13395. \f0\b0 \cf4 \
  13396. \{\
  13397. \cf5 textView\cf4 .scrollEnabled =
  13398. \f2\b \cf8 NO
  13399. \f0\b0 \cf4 ; \cf2 //
  13400. \f1 \'b2\'bb\'d4\'ca\'d0\'ed\'b9\'f6\'b6\'af
  13401. \f0 \cf4 \
  13402. \}\
  13403. \f2\b \cf8 if
  13404. \f0\b0 \cf4 (\cf14 textView\cf4 .hidden) \{\
  13405. size.\cf14 height\cf4 = \cf7 32\cf4 + \cf7 5.5\cf4 ;\
  13406. \}\
  13407. \f2\b \cf8 self
  13408. \f0\b0 \cf4 .heightFooter = size.height + \cf7 16\cf4 ;\
  13409. \f2\b \cf8 if
  13410. \f0\b0 \cf4 (
  13411. \f2\b \cf8 self
  13412. \f0\b0 \cf4 .isHiddenFooter) \{\
  13413. \f2\b \cf8 self
  13414. \f0\b0 \cf4 .\cf15 heightFooter\cf4 =\cf7 0\cf4 ;\
  13415. \}\
  13416. \cf15 textView\cf4 .frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, size.height);\
  13417. inputBar.\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf14 inputBar\cf4 .\cf14 frame\cf4 .origin.\cf14 x\cf4 , inputBar.\cf14 frame\cf4 .\cf14 origin\cf4 .y, \cf14 inputBar\cf4 .frame.size.width,
  13418. \f2\b \cf8 self
  13419. \f0\b0 \cf4 .heightFooter);\
  13420. \f2\b \cf8 self
  13421. \f0\b0 \cf4 .\cf14 tableFooter\cf4 .\cf14 frame\cf4 = \cf15 CGRectMake\cf4 (\cf7 0\cf4 ,
  13422. \f2\b \cf8 self
  13423. \f0\b0 \cf4 .view.\cf15 frame\cf4 .size.\cf14 height\cf4 +
  13424. \f2\b \cf8 self
  13425. \f0\b0 \cf4 .\cf15 deltaHeight\cf4 -\cf14 size\cf4 .\cf14 height\cf4 -\cf7 16\cf4 , \cf15 JX_SCREEN_WIDTH\cf4 ,
  13426. \f2\b \cf8 self
  13427. \f0\b0 \cf4 .heightFooter);\
  13428. \cf15 CGFloat\cf4 height = \cf7 0\cf4 ;\
  13429. \f2\b \cf8 if
  13430. \f0\b0 \cf4 (
  13431. \f2\b \cf8 self
  13432. \f0\b0 \cf4 .\cf14 heightFooter\cf4 > \cf7 0\cf4 ) \{\
  13433. \cf15 height\cf4 =
  13434. \f2\b \cf8 self
  13435. \f0\b0 \cf4 .tableFooter.\cf14 frame\cf4 .origin.\cf5 y\cf4 ;\
  13436. \}
  13437. \f2\b \cf8 else
  13438. \f0\b0 \cf4 \{\
  13439. \cf15 height\cf4 = \cf14 JX_SCREEN_HEIGHT\cf4 ;\
  13440. \}\
  13441. _table.\cf5 frame\cf4 =CGRectMake(_table.frame.origin.x,_table.frame.origin.y,self_width,JX_SCREEN_HEIGHT-_table.frame.origin.y-(JX_SCREEN_HEIGHT - height));\
  13442. [_table \cf14 gotoLastRow\cf4 :
  13443. \f2\b \cf8 NO
  13444. \f0\b0 \cf4 ];\
  13445. \
  13446. \cf15 _publicMenuBar\cf4 .\cf5 frame\cf4 = \cf14 CGRectMake\cf4 (\cf5 _publicMenuBar\cf4 .frame.origin.x,
  13447. \f2\b \cf8 self
  13448. \f0\b0 \cf4 .\cf14 tableFooter\cf4 .\cf5 frame\cf4 .size.height, _publicMenuBar.frame.size.width, _publicMenuBar.frame.size.height);\
  13449. \
  13450. \
  13451. \f2\b \cf8 self
  13452. \f0\b0 \cf4 .\cf14 screenShotView\cf4 .\cf15 frame\cf4 = CGRectMake(
  13453. \f2\b \cf8 self
  13454. \f0\b0 \cf4 .\cf14 screenShotView\cf4 .\cf15 frame\cf4 .origin.\cf14 x\cf4 ,
  13455. \f2\b \cf8 self
  13456. \f0\b0 \cf4 .\cf14 tableFooter\cf4 .frame.origin.y -
  13457. \f2\b \cf8 self
  13458. \f0\b0 \cf4 .\cf15 screenShotView\cf4 .frame.size.\cf14 height\cf4 - \cf7 10\cf4 ,
  13459. \f2\b \cf8 self
  13460. \f0\b0 \cf4 .screenShotView.frame.size.width,
  13461. \f2\b \cf8 self
  13462. \f0\b0 \cf4 .screenShotView.frame.size.height);\
  13463. \}\
  13464. \
  13465. - (
  13466. \f2\b \cf8 BOOL
  13467. \f0\b0 \cf4 )\cf14 textViewShouldBeginEditing\cf4 :(\cf15 UITextView\cf4 *)textView \{\
  13468. \
  13469. \cf14 _btnFace\cf4 .\cf15 selected\cf4 =
  13470. \f2\b \cf8 NO
  13471. \f0\b0 \cf4 ;\
  13472. \f2\b \cf8 return
  13473. \f0\b0 \cf4
  13474. \f2\b \cf8 YES
  13475. \f0\b0 \cf4 ;\
  13476. \}\
  13477. \
  13478. - (
  13479. \f2\b \cf8 BOOL
  13480. \f0\b0 \cf4 )\cf5 textViewShouldEndEditing\cf4 :(UITextView *)\cf15 textView\cf4 \{\
  13481. [
  13482. \f2\b \cf8 self
  13483. \f0\b0 \cf4 \cf14 doEndEdit\cf4 ];\
  13484. \f2\b \cf8 return
  13485. \f0\b0 \cf4
  13486. \f2\b \cf8 YES
  13487. \f0\b0 \cf4 ;\
  13488. \}\
  13489. \
  13490. \
  13491. \
  13492. \
  13493. -(
  13494. \f2\b \cf8 void
  13495. \f0\b0 \cf4 )\cf14 recordSwitch\cf4 :(UIButton*)sender\{\
  13496. \f2\b \cf8 if
  13497. \f0\b0 \cf4 ([
  13498. \f2\b \cf8 self
  13499. \f0\b0 \cf4 \cf10 showDisableSay\cf4 ])\
  13500. \f2\b \cf8 return
  13501. \f0\b0 \cf4 ;\
  13502. _messageText.inputView =
  13503. \f2\b \cf8 nil
  13504. \f0\b0 \cf4 ;\
  13505. [_messageText \cf5 reloadInputViews\cf4 ];\
  13506. \
  13507. \cf15 sender\cf4 .\cf14 selected\cf4 = !sender.selected;\
  13508. \cf14 _recordBtn\cf4 .hidden = !\cf14 sender\cf4 .selected;\
  13509. \cf14 _messageText\cf4 .hidden = !\cf14 _recordBtn\cf4 .hidden;\
  13510. \f2\b \cf8 if
  13511. \f0\b0 \cf4 (!\cf14 _recordBtn\cf4 .hidden)\
  13512. [
  13513. \f2\b \cf8 self
  13514. \f0\b0 \cf4 \cf14 hideKeyboard\cf4 :
  13515. \f2\b \cf8 YES
  13516. \f0\b0 \cf4 ];\
  13517. \
  13518. [
  13519. \f2\b \cf8 self
  13520. \f0\b0 \cf4 \cf5 setTableFooterFrame\cf4 :_messageText];\
  13521. \}\
  13522. \
  13523. \cf2 //
  13524. \f1 \'c1\'c4\'cc\'ec\'ce\'bb\'d6\'c3\'b1\'bb\'b5\'e3\'bb\'f7
  13525. \f0 \cf4 \
  13526. -(
  13527. \f2\b \cf8 void
  13528. \f0\b0 \cf4 )\cf15 onDidLocation\cf4 :(JXMessageObject*)msg\{\
  13529. JXLocationVC* vc = [JXLocationVC alloc];\
  13530. \cf9 vc\cf4 .longitude = [msg.\cf9 location_y\cf4 \cf14 doubleValue\cf4 ];\
  13531. vc.\cf15 latitude\cf4 = [msg.\cf15 location_x\cf4 \cf14 doubleValue\cf4 ];\
  13532. vc.\cf15 locationType\cf4 = \cf14 JXLocationTypeShowStaticLocation\cf4 ;\
  13533. vc = [vc init];\
  13534. \cf2 // [g_window addSubview:vc.view];\cf4 \
  13535. [g_navigation pushViewController:vc animated:
  13536. \f2\b \cf8 YES
  13537. \f0\b0 \cf4 ];\
  13538. \cf2 // [vc release];\cf4 \
  13539. \}\
  13540. \
  13541. \cf2 //cell
  13542. \f1 \'c0\'ef\'b5\'c4\'cd\'bc\'c6\'ac\'a3\'ac\'b1\'bb\'b5\'e3\'bb\'f7\'ba\'f3\'b5\'c4\'b4\'a6\'c0\'ed\'ca\'c2\'bc\'fe
  13543. \f0 \cf4 \
  13544. -(
  13545. \f2\b \cf8 void
  13546. \f0\b0 \cf4 )\cf11 onSelectImage\cf4 :(\cf9 JXImageView\cf4 *)sender\{\
  13547. \cf2 // [sender removeFromSuperview];\cf4 \
  13548. \}\
  13549. \
  13550. -(
  13551. \f2\b \cf8 void
  13552. \f0\b0 \cf4 )\cf11 offRecordBtns\cf4 \{\
  13553. \cf15 _recordBtnLeft\cf4 .\cf14 selected\cf4 =
  13554. \f2\b \cf8 NO
  13555. \f0\b0 \cf4 ;\
  13556. \cf15 _recordBtn\cf4 .\cf14 hidden\cf4 =
  13557. \f2\b \cf8 YES
  13558. \f0\b0 \cf4 ;\
  13559. \cf15 _messageText\cf4 .\cf14 hidden\cf4 =
  13560. \f2\b \cf8 NO
  13561. \f0\b0 \cf4 ;\
  13562. \}\
  13563. \
  13564. \
  13565. -(
  13566. \f2\b \cf8 void
  13567. \f0\b0 \cf4 )\cf11 scrollToPageUp\cf4 \{\
  13568. \f2\b \cf8 if
  13569. \f0\b0 \cf4 (\cf15 _isLoading\cf4 )\
  13570. \f2\b \cf8 return
  13571. \f0\b0 \cf4 ;\
  13572. \cf14 NSLog\cf4 (\cf6 @"scrollToPageUp"\cf4 );\
  13573. \cf15 _page\cf4 ++;\
  13574. [
  13575. \f2\b \cf8 self
  13576. \f0\b0 \cf4 \cf15 getServerData\cf4 ];\
  13577. \}\
  13578. \
  13579. -(
  13580. \f2\b \cf8 void
  13581. \f0\b0 \cf4 )\cf11 scrollToPageDown\cf4 \{\
  13582. \f2\b \cf8 if
  13583. \f0\b0 \cf4 (\cf15 _isLoading\cf4 )\
  13584. \f2\b \cf8 return
  13585. \f0\b0 \cf4 ;\
  13586. \cf15 _page\cf4 =\cf7 0\cf4 ;\
  13587. [
  13588. \f2\b \cf8 self
  13589. \f0\b0 \cf4 \cf15 getServerData\cf4 ];\
  13590. \}\
  13591. \cf5 #pragma mark
  13592. \f2\b \cf16 - ViewLoad
  13593. \f4 \'bb\'f1\'c8\'a1\'ca\'fd\'be\'dd
  13594. \f0\b0 \cf4 \
  13595. -(
  13596. \f2\b \cf8 void
  13597. \f0\b0 \cf4 )\cf11 getServerData\cf4 \{\
  13598. \cf15 _isLoading\cf4 =
  13599. \f2\b \cf8 YES
  13600. \f0\b0 \cf4 ;\
  13601. [
  13602. \f2\b \cf8 self
  13603. \f0\b0 \cf4 \cf15 refresh\cf4 :
  13604. \f2\b \cf8 nil
  13605. \f0\b0 \cf4 ];\
  13606. \cf14 NSLog\cf4 (\cf6 @"_isLoading=no"\cf4 );\
  13607. [
  13608. \f2\b \cf8 self
  13609. \f0\b0 \cf4 \cf15 stopLoading\cf4 ];\
  13610. \}\
  13611. \
  13612. \
  13613. \cf2 //- (void)tableView:(UITableView *)tableView touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event\{\cf4 \
  13614. \cf2 // [self hideKeyboard:NO];\cf4 \
  13615. \cf2 //\}\cf4 \
  13616. \
  13617. -(
  13618. \f2\b \cf8 void
  13619. \f0\b0 \cf4 )\cf11 sendText\cf4 :(\cf10 UIView\cf4 *)sender\{\
  13620. \f2\b \cf8 if
  13621. \f0\b0 \cf4 ([\cf15 _messageText\cf4 .\cf14 text\cf4 \cf14 length\cf4 ]<=\cf7 0\cf4 )\{\
  13622. \cf2 // [g_App showAlert:Localized(@"JXAlert_MessageNotNil")];\cf4 \
  13623. \f2\b \cf8 return
  13624. \f0\b0 \cf4 ;\
  13625. \}\
  13626. \cf2 // [self hideKeyboard:NO];\cf4 \
  13627. \f2\b \cf8 if
  13628. \f0\b0 \cf4 (
  13629. \f2\b \cf8 self
  13630. \f0\b0 \cf4 .\cf15 isGroupMessages\cf4 ) \{\
  13631. [
  13632. \f2\b \cf8 self
  13633. \f0\b0 \cf4 \cf15 hideKeyboard\cf4 :
  13634. \f2\b \cf8 YES
  13635. \f0\b0 \cf4 ];\
  13636. \cf15 _onceSendNum\cf4 = \cf7 20\cf4 ;\
  13637. [
  13638. \f2\b \cf8 self
  13639. \f0\b0 \cf4 \cf15 addWaitGroupSendViewWithMsgNum\cf4 :\cf7 1\cf4 \cf15 withType\cf4 :\cf5 groupsend_msgType_text\cf4 ];\
  13640. \}\
  13641. [
  13642. \f2\b \cf8 self
  13643. \f0\b0 \cf4 \cf15 sendIt\cf4 :
  13644. \f2\b \cf8 nil
  13645. \f0\b0 \cf4 ];\
  13646. [
  13647. \f2\b \cf8 self
  13648. \f0\b0 \cf4 \cf15 setTableFooterFrame\cf4 :\cf15 _messageText\cf4 ];\
  13649. \}\
  13650. \
  13651. -(
  13652. \f2\b \cf8 void
  13653. \f0\b0 \cf4 ) \cf11 setChatPerson\cf4 :(\cf9 JXUserObject\cf4 *)user\{\
  13654. \f2\b \cf8 if
  13655. \f0\b0 \cf4 (user ==
  13656. \f2\b \cf8 nil
  13657. \f0\b0 \cf4 || user == \cf15 chatPerson\cf4 )\{\
  13658. \cf15 current_chat_userId\cf4 =
  13659. \f2\b \cf8 nil
  13660. \f0\b0 \cf4 ;\
  13661. \f2\b \cf8 return
  13662. \f0\b0 \cf4 ;\
  13663. \}\
  13664. \cf2 // chatPerson = [user retain];\cf4 \
  13665. \cf15 chatPerson\cf4 = user;\
  13666. \cf15 current_chat_userId\cf4 = user.\cf15 userId\cf4 ;\
  13667. \}\
  13668. \
  13669. \cf5 #pragma mark
  13670. \f2\b \cf16 ----
  13671. \f4 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2\'b2\'a2\'cf\'d4\'ca\'be
  13672. \f0\b0 \cf4 \
  13673. -(
  13674. \f2\b \cf8 void
  13675. \f0\b0 \cf4 )\cf11 resendMsgNotif\cf4 :(\cf10 NSNotification\cf4 *)notification\{\
  13676. \f2\b \cf8 int
  13677. \f0\b0 \cf4 indexNum = [notification.\cf14 object\cf4 \cf14 intValue\cf4 ];\
  13678. \cf9 JXMessageObject\cf4 *p =[\cf15 _array\cf4 \cf14 objectAtIndex\cf4 :indexNum];\
  13679. [p \cf15 updateIsSend\cf4 :\cf5 transfer_status_ing\cf4 ];\
  13680. \cf10 NSIndexPath\cf4 * cellIndex = [\cf10 NSIndexPath\cf4 \cf14 indexPathForRow\cf4 :indexNum \cf14 inSection\cf4 :\cf7 0\cf4 ];\
  13681. \cf15 _selCell\cf4 = [\cf15 _table\cf4 \cf14 cellForRowAtIndexPath\cf4 :cellIndex];\
  13682. [\cf15 _selCell\cf4 \cf15 drawIsSend\cf4 ];\
  13683. \f2\b \cf8 if
  13684. \f0\b0 \cf4 ([p.\cf15 isUpload\cf4 \cf14 boolValue\cf4 ])\{\
  13685. [\cf5 g_xmpp\cf4 \cf15 sendMessage\cf4 :p \cf15 roomName\cf4 :
  13686. \f2\b \cf8 nil
  13687. \f0\b0 \cf4 ];\cf2 //
  13688. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  13689. \f0 \cf4 \
  13690. \}
  13691. \f2\b \cf8 else
  13692. \f0\b0 \cf4 \{\
  13693. [\cf5 g_server\cf4 \cf15 uploadFile\cf4 :p.\cf15 fileName\cf4 \cf15 validTime\cf4 :
  13694. \f2\b \cf8 self
  13695. \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 chatRecordTimeOut\cf4 \cf15 messageId\cf4 :
  13696. \f2\b \cf8 nil
  13697. \f0\b0 \cf4 \cf15 toView\cf4 :
  13698. \f2\b \cf8 self
  13699. \f0\b0 \cf4 ];\
  13700. \}\
  13701. \}\
  13702. \
  13703. \cf5 #pragma mark
  13704. \f2\b \cf16 ----
  13705. \f4 \'c9\'be\'b3\'fd\'cf\'fb\'cf\'a2\'b2\'a2\'cb\'a2\'d0\'c2
  13706. \f0\b0 \cf4 \
  13707. -(
  13708. \f2\b \cf8 void
  13709. \f0\b0 \cf4 )\cf11 deleteMsgNotif\cf4 :(NSNotification*)notification\{\
  13710. \f2\b \cf8 int
  13711. \f0\b0 \cf4 indexNum = [notification.object intValue];\
  13712. JXMessageObject *p=[_array objectAtIndex:indexNum];\
  13713. [p
  13714. \f2\b \cf8 delete
  13715. \f0\b0 \cf4 ];\
  13716. [_array removeObject:p];\
  13717. [
  13718. \f2\b \cf8 self
  13719. \f0\b0 \cf4 deleteMsg:p];\
  13720. \}\
  13721. \
  13722. - (
  13723. \f2\b \cf8 void
  13724. \f0\b0 \cf4 )\cf11 showReadPersons\cf4 :(NSNotification *)notification\{\
  13725. \f2\b \cf8 if
  13726. \f0\b0 \cf4 (recording) \{\
  13727. \f2\b \cf8 return
  13728. \f0\b0 \cf4 ;\
  13729. \}\
  13730. \f2\b \cf8 int
  13731. \f0\b0 \cf4 indexNum = [notification.object intValue];\
  13732. JXMessageObject *msg = _array[indexNum];\
  13733. JXReadListVC *vc = [[JXReadListVC alloc] init];\
  13734. vc.msg = msg;\
  13735. vc.room = _room;\
  13736. \cf2 // [g_window addSubview:vc.view];\cf4 \
  13737. [g_navigation pushViewController:vc animated:
  13738. \f2\b \cf8 YES
  13739. \f0\b0 \cf4 ];\
  13740. \}\
  13741. \
  13742. -(
  13743. \f2\b \cf8 void
  13744. \f0\b0 \cf4 )\cf11 resend\cf4 :(JXMessageObject*)p\{\
  13745. \cf2 // NSLog(@"resend");\cf4 \
  13746. [p updateIsSend:transfer_status_ing];\
  13747. [_selCell drawIsSend];\
  13748. \f2\b \cf8 if
  13749. \f0\b0 \cf4 ([p.isUpload boolValue])\{\
  13750. [g_xmpp sendMessage:p roomName:
  13751. \f2\b \cf8 self
  13752. \f0\b0 \cf4 .roomJid];\cf2 //
  13753. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  13754. \f0 \cf4 \
  13755. \}
  13756. \f2\b \cf8 else
  13757. \f0\b0 \cf4 \{\
  13758. [g_server uploadFile:p.fileName validTime:
  13759. \f2\b \cf8 self
  13760. \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:
  13761. \f2\b \cf8 nil
  13762. \f0\b0 \cf4 toView:
  13763. \f2\b \cf8 self
  13764. \f0\b0 \cf4 ];\
  13765. \}\
  13766. \}\
  13767. \
  13768. -(
  13769. \f2\b \cf8 void
  13770. \f0\b0 \cf4 )\cf11 deleteMsg\cf4 :(JXMessageObject*)p\{\
  13771. \f2\b \cf8 for
  13772. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _array.count; i ++) \{\
  13773. JXMessageObject *msg = _array[i];\
  13774. \f2\b \cf8 if
  13775. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeText) \{\
  13776. JXMessageCell *cell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:\cf7 0\cf4 ]];\
  13777. [cell.readDelTimer invalidate];\
  13778. cell.readDelTimer =
  13779. \f2\b \cf8 nil
  13780. \f0\b0 \cf4 ;\
  13781. \
  13782. \f2\b \cf8 if
  13783. \f0\b0 \cf4 ([p.messageId isEqualToString:msg.messageId]) \{\
  13784. \f2\b \cf8 if
  13785. \f0\b0 \cf4 (i == _array.count - \cf7 1\cf4 && i > \cf7 0\cf4 ) \{\
  13786. JXMessageObject *theLastMsg = _array[_array.count - \cf7 2\cf4 ];\
  13787. \f2\b \cf8 self
  13788. \f0\b0 \cf4 .lastMsg = theLastMsg;\
  13789. [theLastMsg updateLastSend:UpdateLastSendType_None];\
  13790. \}\
  13791. \}\
  13792. \}\
  13793. \}\
  13794. \
  13795. [_array removeObject:p];\
  13796. _refreshCount++;\
  13797. [_table reloadData];\
  13798. \}\
  13799. \
  13800. -(
  13801. \f2\b \cf8 void
  13802. \f0\b0 \cf4 )\cf11 actionQuit\cf4 \{\
  13803. \
  13804. [_voice hide];\
  13805. [peakTimer invalidate];\
  13806. peakTimer =
  13807. \f2\b \cf8 nil
  13808. \f0\b0 \cf4 ;\
  13809. recording =
  13810. \f2\b \cf8 NO
  13811. \f0\b0 \cf4 ;\
  13812. \
  13813. \f2\b \cf8 if
  13814. \f0\b0 \cf4 (
  13815. \f2\b \cf8 self
  13816. \f0\b0 \cf4 .isGroupMessages) \{\
  13817. _isGroupSendCancel =
  13818. \f2\b \cf8 YES
  13819. \f0\b0 \cf4 ;\
  13820. \}\
  13821. \
  13822. \f2\b \cf8 if
  13823. \f0\b0 \cf4 (
  13824. \f2\b \cf8 self
  13825. \f0\b0 \cf4 .isSelectMore) \{\
  13826. \f2\b \cf8 self
  13827. \f0\b0 \cf4 .isSelectMore =
  13828. \f2\b \cf8 NO
  13829. \f0\b0 \cf4 ;\
  13830. \f2\b \cf8 self
  13831. \f0\b0 \cf4 .selectMoreView.hidden =
  13832. \f2\b \cf8 YES
  13833. \f0\b0 \cf4 ;\
  13834. \
  13835. [
  13836. \f2\b \cf8 self
  13837. \f0\b0 \cf4 .gotoBackBtn setBackgroundImage:[UIImage imageNamed:\cf6 @"title_back_black_big"\cf4 ] forState:UIControlStateNormal];\
  13838. [
  13839. \f2\b \cf8 self
  13840. \f0\b0 \cf4 .gotoBackBtn setTitle:
  13841. \f2\b \cf8 nil
  13842. \f0\b0 \cf4 forState:UIControlStateNormal];\
  13843. [_selectMoreArr removeAllObjects];\
  13844. [
  13845. \f2\b \cf8 self
  13846. \f0\b0 \cf4 enableCell];\
  13847. [
  13848. \f2\b \cf8 self
  13849. \f0\b0 \cf4 .tableView reloadData];\
  13850. \f2\b \cf8 return
  13851. \f0\b0 \cf4 ;\
  13852. \}\
  13853. \
  13854. [g_notify postNotificationName:kAllVideoPlayerStopNotifaction object:
  13855. \f2\b \cf8 nil
  13856. \f0\b0 \cf4 userInfo:
  13857. \f2\b \cf8 nil
  13858. \f0\b0 \cf4 ];\
  13859. [g_notify postNotificationName:kAllAudioPlayerStopNotifaction object:
  13860. \f2\b \cf8 nil
  13861. \f0\b0 \cf4 userInfo:
  13862. \f2\b \cf8 nil
  13863. \f0\b0 \cf4 ];\
  13864. \
  13865. \f2\b \cf8 for
  13866. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _array.count; i ++) \{\
  13867. JXMessageObject *msg = _array[i];\
  13868. \f2\b \cf8 if
  13869. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeText) \{\
  13870. JXMessageCell *cell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:\cf7 0\cf4 ]];\
  13871. \f2\b \cf8 if
  13872. \f0\b0 \cf4 ([cell isKindOfClass:[JXMessageCell
  13873. \f2\b \cf8 class
  13874. \f0\b0 \cf4 ]]) \{\
  13875. \
  13876. [cell.readDelTimer invalidate];\
  13877. cell.readDelTimer =
  13878. \f2\b \cf8 nil
  13879. \f0\b0 \cf4 ;\
  13880. \}\
  13881. \}\
  13882. \}\
  13883. \cf2 //
  13884. \f1 \'b1\'a3\'b4\'e6\'b8\'fc\'d0\'c2\'ca\'e4\'c8\'eb\'bf\'f2\'d6\'d0\'c8\'e7\'c8\'e7\'b5\'c4\'d0\'c5\'cf\'a2
  13885. \f0 \cf4 \
  13886. \f2\b \cf8 if
  13887. \f0\b0 \cf4 (_messageText.textColor != [UIColor lightGrayColor]) \{\
  13888. chatPerson.lastInput = [_messageText.textStorage getPlainString];\
  13889. [chatPerson updateLastInput];\
  13890. \}\
  13891. \cf2 // if (g_mainVC.msgVc.array.count > 0) \{\cf4 \
  13892. \cf2 // [g_mainVC.msgVc.tableView reloadRow:(int)self.rowIndex section:0];\cf4 \
  13893. \cf2 // \}\cf4 \
  13894. \
  13895. [g_notify postNotificationName:kChatViewDisappear object:
  13896. \f2\b \cf8 nil
  13897. \f0\b0 \cf4 ];\
  13898. [g_xmpp.chatingUserIds removeObject:current_chat_userId];\
  13899. current_chat_userId =
  13900. \f2\b \cf8 nil
  13901. \f0\b0 \cf4 ;\
  13902. [g_notify removeObserver:
  13903. \f2\b \cf8 self
  13904. \f0\b0 \cf4 ];\
  13905. [
  13906. \f2\b \cf8 super
  13907. \f0\b0 \cf4 actionQuit];\
  13908. \}\
  13909. -(
  13910. \f2\b \cf8 void
  13911. \f0\b0 \cf4 )\cf11 showChatView\cf4 \{\
  13912. [_wait stop];\
  13913. NSDictionary * dict = _dataDict;\
  13914. \cf2 //
  13915. \f1 \'c0\'cf\'b7\'bf\'bc\'e4
  13916. \f0 :\cf4 \
  13917. JXRoomObject *chatRoom = [[JXXMPP sharedInstance].roomPool joinRoom:[dict objectForKey:\cf6 @"jid"\cf4 ] title:[dict objectForKey:\cf6 @"name"\cf4 ] lastDate:
  13918. \f2\b \cf8 nil
  13919. \f0\b0 \cf4 isNew:
  13920. \f2\b \cf8 YES
  13921. \f0\b0 \cf4 ];\
  13922. \
  13923. roomData * roomdata = [[roomData alloc] init];\
  13924. [roomdata getDataFromDict:dict];\
  13925. \
  13926. JXChatViewController *sendView=[JXChatViewController alloc];\
  13927. sendView.title = [dict objectForKey:\cf6 @"name"\cf4 ];\
  13928. sendView.roomJid = [dict objectForKey:\cf6 @"jid"\cf4 ];\
  13929. sendView.roomId = [dict objectForKey:\cf6 @"id"\cf4 ];\
  13930. sendView.chatRoom = chatRoom;\
  13931. sendView.room = roomdata;\
  13932. \
  13933. \
  13934. JXUserObject * userObj = [[JXUserObject alloc]init];\
  13935. userObj.userId = [dict objectForKey:\cf6 @"jid"\cf4 ];\
  13936. userObj.showRead = [dict objectForKey:\cf6 @"showRead"\cf4 ];\
  13937. userObj.userNickname = [dict objectForKey:\cf6 @"name"\cf4 ];\
  13938. userObj.showMember = [dict objectForKey:\cf6 @"showMember"\cf4 ];\
  13939. userObj.allowSendCard = [dict objectForKey:\cf6 @"allowSendCard"\cf4 ];\
  13940. userObj.chatRecordTimeOut = roomdata.chatRecordTimeOut;\
  13941. userObj.talkTime = [dict objectForKey:\cf6 @"talkTime"\cf4 ];\
  13942. userObj.allowInviteFriend = [dict objectForKey:\cf6 @"allowInviteFriend"\cf4 ];\
  13943. userObj.allowUploadFile = [dict objectForKey:\cf6 @"allowUploadFile"\cf4 ];\
  13944. userObj.allowConference = [dict objectForKey:\cf6 @"allowConference"\cf4 ];\
  13945. userObj.allowSpeakCourse = [dict objectForKey:\cf6 @"allowSpeakCourse"\cf4 ];\
  13946. userObj.isNeedVerify = [dict objectForKey:\cf6 @"isNeedVerify"\cf4 ];\
  13947. \
  13948. sendView.chatPerson = userObj;\
  13949. sendView = [sendView init];\
  13950. \cf2 // [g_App.window addSubview:sendView.view];\cf4 \
  13951. [g_navigation pushViewController:sendView animated:
  13952. \f2\b \cf8 YES
  13953. \f0\b0 \cf4 ];\
  13954. \
  13955. dict =
  13956. \f2\b \cf8 nil
  13957. \f0\b0 \cf4 ;\
  13958. \}\
  13959. -(
  13960. \f2\b \cf8 void
  13961. \f0\b0 \cf4 )\cf11 onInputHello\cf4 :(JXInputVC*)sender\{\
  13962. \
  13963. JXMessageObject *msg = [[JXMessageObject alloc] init];\
  13964. msg.fromUserId = MY_USER_ID;\
  13965. msg.toUserId = [NSString stringWithFormat:\cf6 @"%@"\cf4 , [_dataDict objectForKey:\cf6 @"userId"\cf4 ]];\
  13966. msg.fromUserName = MY_USER_NAME;\
  13967. msg.toUserName = [_dataDict objectForKey:\cf6 @"nickname"\cf4 ];\
  13968. msg.timeSend = [NSDate date];\
  13969. msg.type = [NSNumber numberWithInt:kRoomRemind_NeedVerify];\
  13970. NSString *userIds = g_myself.userId;\
  13971. NSString *userNames = g_myself.userNickname;\
  13972. NSDictionary *dict = \cf7 @\{\cf4 \
  13973. \cf6 @"userIds"\cf4 : userIds,\
  13974. \cf6 @"userNames"\cf4 : userNames,\
  13975. \cf6 @"roomJid"\cf4 :
  13976. \f2\b \cf8 self
  13977. \f0\b0 \cf4 .roomJid,\
  13978. \cf6 @"reason"\cf4 : sender.inputText,\
  13979. \cf6 @"isInvite"\cf4 : [NSNumber numberWithBool:
  13980. \f2\b \cf8 YES
  13981. \f0\b0 \cf4 ]\
  13982. \cf7 \}\cf4 ;\
  13983. NSError *error =
  13984. \f2\b \cf8 nil
  13985. \f0\b0 \cf4 ;\
  13986. NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dict options:NSJSONWritingPrettyPrinted error:&error];\
  13987. \
  13988. NSString *jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];\
  13989. msg.objectId = jsonStr;\
  13990. [g_xmpp sendMessage:msg roomName:
  13991. \f2\b \cf8 nil
  13992. \f0\b0 \cf4 ];\
  13993. [
  13994. \f2\b \cf8 self
  13995. \f0\b0 \cf4 actionQuit];\
  13996. \
  13997. \cf2 // msg.fromUserId = self.roomJid;\cf4 \
  13998. \cf2 // msg.type = [NSNumber numberWithInt:kWCMessageTypeRemind];\cf4 \
  13999. \cf2 // msg.content = @"
  14000. \f1 \'c9\'ea\'c7\'eb\'d2\'d1\'b7\'a2\'cb\'cd\'b8\'f8\'c8\'ba\'d6\'f7\'a3\'ac\'c7\'eb\'b5\'c8\'b4\'fd\'c8\'ba\'d6\'f7\'c8\'b7\'c8\'cf
  14001. \f0 ";\cf4 \
  14002. \cf2 // [msg insert:self.roomJid];\cf4 \
  14003. \cf2 // if ([self.delegate respondsToSelector:@selector(needVerify:)]) \{\cf4 \
  14004. \cf2 // [self.delegate needVerify:msg];\cf4 \
  14005. \cf2 // \}\cf4 \
  14006. \}\
  14007. \
  14008. -(
  14009. \f2\b \cf8 void
  14010. \f0\b0 \cf4 )\cf11 xmppRoomDidJoin\cf4 \{\
  14011. \
  14012. NSDictionary * dict = _dataDict;\
  14013. \
  14014. JXUserObject* user = [[JXUserObject alloc]init];\
  14015. user.userNickname = [dict objectForKey:\cf6 @"name"\cf4 ];\
  14016. user.userId = [dict objectForKey:\cf6 @"jid"\cf4 ];\
  14017. user.userDescription = [dict objectForKey:\cf6 @"desc"\cf4 ];\
  14018. user.roomId = [dict objectForKey:\cf6 @"id"\cf4 ];\
  14019. user.showRead = [dict objectForKey:\cf6 @"showRead"\cf4 ];\
  14020. user.showMember = [dict objectForKey:\cf6 @"showMember"\cf4 ];\
  14021. user.allowSendCard = [dict objectForKey:\cf6 @"allowSendCard"\cf4 ];\
  14022. user.chatRecordTimeOut = [dict objectForKey:\cf6 @"chatRecordTimeOut"\cf4 ];\
  14023. user.talkTime = [dict objectForKey:\cf6 @"talkTime"\cf4 ];\
  14024. user.allowInviteFriend = [dict objectForKey:\cf6 @"allowInviteFriend"\cf4 ];\
  14025. user.allowUploadFile = [dict objectForKey:\cf6 @"allowUploadFile"\cf4 ];\
  14026. user.allowConference = [dict objectForKey:\cf6 @"allowConference"\cf4 ];\
  14027. user.allowSpeakCourse = [dict objectForKey:\cf6 @"allowSpeakCourse"\cf4 ];\
  14028. user.isNeedVerify = [dict objectForKey:\cf6 @"isNeedVerify"\cf4 ];\
  14029. \
  14030. \f2\b \cf8 if
  14031. \f0\b0 \cf4 (![user haveTheUser])\
  14032. [user insertRoom];\
  14033. \cf2 // else\cf4 \
  14034. \cf2 // [user update];\cf4 \
  14035. \cf2 // [user release];\cf4 \
  14036. \
  14037. \cf2 // [g_server addRoomMember:[dict objectForKey:@"id"] userId:g_myself.userId nickName:g_myself.userNickname toView:self];\cf4 \
  14038. [g_server roomJoin:[dict objectForKey:\cf6 @"id"\cf4 ] userId:g_myself.userId nickName:g_myself.userNickname toView:
  14039. \f2\b \cf8 self
  14040. \f0\b0 \cf4 ];\
  14041. \
  14042. user.groupStatus = [NSNumber numberWithInt:\cf7 0\cf4 ];\
  14043. [user updateGroupInvalid];\
  14044. \
  14045. dict =
  14046. \f2\b \cf8 nil
  14047. \f0\b0 \cf4 ;\
  14048. \cf2 // chatRoom.delegate = nil;\cf4 \
  14049. \}\
  14050. \
  14051. - (
  14052. \f2\b \cf8 void
  14053. \f0\b0 \cf4 )\cf11 goundAttionTitle\cf4 :(NSMutableArray *)tempArr\{\
  14054. \
  14055. memberData *model=[tempArr firstObject];\
  14056. [
  14057. \f2\b \cf8 self
  14058. \f0\b0 \cf4 .attioPersonBtn setTitle:model.userNickName forState:UIControlStateNormal];\
  14059. \
  14060. \}\
  14061. \cf5 #pragma mark
  14062. \f2\b \cf16 -------------------
  14063. \f4 \'b7\'fe\'ce\'f1\'c6\'f7\'b7\'b5\'bb\'d8\'ca\'fd\'be\'dd
  14064. \f2 --------------------
  14065. \f0\b0 \cf4 \
  14066. -(
  14067. \f2\b \cf8 void
  14068. \f0\b0 \cf4 ) \cf11 didServerResultSucces\cf4 :(JXConnection*)aDownload \cf11 dict\cf4 :(NSDictionary*)dict \cf11 array\cf4 :(NSArray*)array1\{\
  14069. \
  14070. \f2\b \cf8 double
  14071. \f0\b0 \cf4 time = [dict[\cf6 @"timeSend"\cf4 ] doubleValue];\
  14072. \f2\b \cf8 __block
  14073. \f0\b0 \cf4 NSUInteger aaaa=\cf7 0\cf4 ;\
  14074. \f2\b \cf8 if
  14075. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UserRoomgetlastMessage]) \{\
  14076. NSLog(\cf6 @"
  14077. \f1 \'d7\'ee\'ba\'f3\'d2\'bb\'cc\'f5\'cf\'fb\'cf\'a2\'ca\'b1\'bc\'e4
  14078. \f0 X
  14079. \f1 \'a3\'ba
  14080. \f0 %@"\cf4 ,dict[\cf6 @"timeSend"\cf4 ]);\
  14081. [_array enumerateObjectsUsingBlock:^(JXMessageObject *
  14082. \f2\b \cf8 _Nonnull
  14083. \f0\b0 \cf4 obj, NSUInteger idx,
  14084. \f2\b \cf8 BOOL
  14085. \f0\b0 \cf4 *
  14086. \f2\b \cf8 _Nonnull
  14087. \f0\b0 \cf4 stop) \{\
  14088. \f2\b \cf8 double
  14089. \f0\b0 \cf4 time2 = [obj.timeSend timeIntervalSince1970]*\cf7 1000\cf4 ;\
  14090. \f2\b \cf8 if
  14091. \f0\b0 \cf4 (time ==time2) \{\
  14092. aaaa=idx;\
  14093. \}\
  14094. \}];\
  14095. NSIndexPath * dayOne = [NSIndexPath indexPathForRow:aaaa inSection:\cf7 0\cf4 ];\
  14096. [_table scrollToRowAtIndexPath:dayOne atScrollPosition:UITableViewScrollPositionTop animated:
  14097. \f2\b \cf8 YES
  14098. \f0\b0 \cf4 ];\
  14099. \}\
  14100. \f2\b \cf8 if
  14101. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UserRoomgetRoomAttention]) \{\
  14102. \
  14103. NSArray * memberArray = [memberData fetchAllMembers:roomId];\
  14104. NSString *userArr = [dict[\cf6 @"attentionUserIds"\cf4 ] firstObject];\
  14105. [memberArray enumerateObjectsUsingBlock:^(memberData *
  14106. \f2\b \cf8 _Nonnull
  14107. \f0\b0 \cf4 obj, NSUInteger idx,
  14108. \f2\b \cf8 BOOL
  14109. \f0\b0 \cf4 *
  14110. \f2\b \cf8 _Nonnull
  14111. \f0\b0 \cf4 stop) \{\
  14112. memberData *dataModel=obj;\
  14113. \f2\b \cf8 if
  14114. \f0\b0 \cf4 (dataModel.userId == [userArr longLongValue]) \{\
  14115. [_tempArrMM addObject:dataModel];\
  14116. \}\
  14117. \
  14118. \}];\
  14119. [
  14120. \f2\b \cf8 self
  14121. \f0\b0 \cf4 goundAttionTitle:_tempArrMM];\
  14122. memberData *model=[_tempArrMM firstObject];\
  14123. [
  14124. \f2\b \cf8 self
  14125. \f0\b0 \cf4 .showTopView.tebieGuanXin setTitle:model.userNickName forState:UIControlStateNormal];\
  14126. \
  14127. \
  14128. \}\
  14129. \
  14130. \f2\b \cf8 if
  14131. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_SilkPlanallByJidlist]) \{\
  14132. NSDictionary *dict = array1.firstObject;\
  14133. \
  14134. JXSiDaiWebView *vc = [[JXSiDaiWebView alloc] init];\
  14135. vc.dataArr=[array1 mutableCopy];\
  14136. vc.sdaiArr=array1;\
  14137. [g_navigation pushViewController:vc animated:
  14138. \f2\b \cf8 YES
  14139. \f0\b0 \cf4 ];\
  14140. \}\
  14141. \
  14142. \f2\b \cf8 if
  14143. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_getAppResource]) \{\
  14144. NSDictionary *dict = array1.firstObject;\
  14145. NSString *imageUrl = dict[\cf6 @"imgUrl"\cf4 ];\
  14146. CYWebCustomerServiceVC *vc = [[CYWebCustomerServiceVC alloc] init];\
  14147. vc.titleName = dict[\cf6 @"desc"\cf4 ];\
  14148. vc.link = imageUrl;\
  14149. [
  14150. \f2\b \cf8 self
  14151. \f0\b0 \cf4 presentViewController:vc animated:
  14152. \f2\b \cf8 YES
  14153. \f0\b0 \cf4 completion:^\{\
  14154. \
  14155. \}];\
  14156. \}\
  14157. \
  14158. \
  14159. \f2\b \cf8 if
  14160. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_getFaceListByGrade]) \{\
  14161. \cf2 // NSMutableArray *tempArr=[NSMutableArray arrayWithCapacity:0];\cf4 \
  14162. \cf2 // tempArr=[array1 mutableCopy];\cf4 \
  14163. \cf2 // NSSortDescriptor *sortNumSD = [NSSortDescriptor sortDescriptorWithKey:@"sortNum" ascending:YES];\cf4 \
  14164. \cf2 // tempArr = [[tempArr sortedArrayUsingDescriptors:@[sortNumSD]] mutableCopy];\cf4 \
  14165. \cf2 // if (tempArr.count>=7) \{\cf4 \
  14166. \cf2 // \cf4 \
  14167. \cf2 // [tempArr removeLastObject];\cf4 \
  14168. \cf2 // [tempArr removeLastObject];\cf4 \
  14169. \cf2 // array1=[tempArr copy];\cf4 \
  14170. _faceView.emojiDataArray = array1;\
  14171. \cf2 // \}\cf4 \
  14172. \
  14173. [g_notify postNotificationName:kFavoritesRefresh object:array1];\
  14174. \}\
  14175. \
  14176. \
  14177. \
  14178. \f2\b \cf8 if
  14179. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_getbubbleFontByUserId]) \{\
  14180. \
  14181. \}\
  14182. \
  14183. \
  14184. \f2\b \cf8 if
  14185. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomMemberGetMemberListByPage]) \{\
  14186. \
  14187. [
  14188. \f2\b \cf8 self
  14189. \f0\b0 \cf4 stopLoading];\
  14190. \
  14191. \f2\b \cf8 if
  14192. \f0\b0 \cf4 (array1.count < kRoomMemberListNum) \{\
  14193. \cf2 // self.isShowFooterPull = NO;\cf4 \
  14194. \}\
  14195. \
  14196. NSDictionary *lastDict = array1.lastObject;\
  14197. \cf2 // self.user.joinTime = [NSDate dateWithTimeIntervalSince1970:[lastDict[@"createTime"] longValue]];\cf4 \
  14198. \cf2 // [self.user updateJoinTime];\cf4 \
  14199. \cf2 // _dataArrGetGroundPersonArr=[array1 mutableCopy];\cf4 \
  14200. \f2\b \cf8 for
  14201. \f0\b0 \cf4 (NSDictionary *member
  14202. \f2\b \cf8 in
  14203. \f0\b0 \cf4 array1) \{\
  14204. memberData* option = [[memberData alloc] init];\
  14205. [option getDataFromDict:member];\
  14206. option.roomId =
  14207. \f2\b \cf8 self
  14208. \f0\b0 \cf4 .room.roomId;\
  14209. [option insert];\
  14210. \}\
  14211. \cf2 // [self refresh];\cf4 \
  14212. \cf2 // [self refresh:nil];\cf4 \
  14213. \}\
  14214. \f2\b \cf8 if
  14215. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomActivityRecord]) \{\
  14216. \cf2 // //
  14217. \f1 \'c7\'c0\'b5\'bd\'c1\'cb
  14218. \f0 \cf4 \
  14219. \cf2 // _activityModel.content = dict[@"resultMsg"];\cf4 \
  14220. \cf2 // _activityModel.success = YES;\cf4 \
  14221. \cf2 // [self showAdAlertViewImageString:@"ad_box.gif" linkUrl:nil audio:nil duration:1 content:nil showCancelButton:NO type:(DYAdModelTypeGifttOpenAnimation) success:YES];\cf4 \
  14222. \
  14223. \}\
  14224. \f2\b \cf8 if
  14225. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomActivity]) \{\
  14226. \cf2 //
  14227. \f1 \'c7\'c0\'b5\'bd\'c1\'cb
  14228. \f0 \cf4 \
  14229. _activityModel.content = dict[\cf6 @"resultMsg"\cf4 ];\
  14230. _activityModel.success =
  14231. \f2\b \cf8 YES
  14232. \f0\b0 \cf4 ;\
  14233. [
  14234. \f2\b \cf8 self
  14235. \f0\b0 \cf4 showAdAlertViewImageString:\cf6 @"ad_box.gif"\cf4 linkUrl:
  14236. \f2\b \cf8 nil
  14237. \f0\b0 \cf4 audio:
  14238. \f2\b \cf8 nil
  14239. \f0\b0 \cf4 duration:\cf7 1\cf4 content:
  14240. \f2\b \cf8 nil
  14241. \f0\b0 \cf4 showCancelButton:
  14242. \f2\b \cf8 NO
  14243. \f0\b0 \cf4 type:(DYAdModelTypeGifttOpenAnimation) success:
  14244. \f2\b \cf8 YES
  14245. \f0\b0 \cf4 ];\
  14246. \
  14247. \}\
  14248. \f2\b \cf8 if
  14249. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_FaceList]) \{\
  14250. _faceView.emojiDataArray = array1;\
  14251. [g_notify postNotificationName:kFavoritesRefresh object:array1];\
  14252. \}\
  14253. \f2\b \cf8 if
  14254. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_FaceClollectList]) \{\
  14255. \cf2 // NSMutableArray *nameArray = [NSMutableArray array];\cf4 \
  14256. \cf2 // for (NSDictionary *dict in array1) \{\cf4 \
  14257. \cf2 // [nameArray addObject:dict[@"name"]];\cf4 \
  14258. \cf2 // \}\cf4 \
  14259. \cf2 // _faceView.emojiDataArray = array1;\cf4 \
  14260. \
  14261. _faceView.emojiDataArray = array1;\
  14262. [g_notify postNotificationName:kFavoritesRefresh object:array1];\
  14263. \}\
  14264. \f2\b \cf8 if
  14265. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_FaceClollectAddFaceClollect]) \{\
  14266. [
  14267. \f2\b \cf8 self
  14268. \f0\b0 \cf4 getEmojsData];\
  14269. [g_notify postNotificationName:kFavoritesRefresh object:
  14270. \f2\b \cf8 nil
  14271. \f0\b0 \cf4 ];\
  14272. \}\
  14273. \
  14274. \f2\b \cf8 if
  14275. \f0\b0 \cf4 (![aDownload.action isEqualToString:act_getRedPacket]) \{\
  14276. [_wait stop];\
  14277. \}\
  14278. \f2\b \cf8 if
  14279. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomJoin]) \{\
  14280. [
  14281. \f2\b \cf8 self
  14282. \f0\b0 \cf4 showChatView];\
  14283. [
  14284. \f2\b \cf8 self
  14285. \f0\b0 \cf4 actionQuit];\
  14286. \}\
  14287. \
  14288. \f2\b \cf8 if
  14289. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UploadFile])\{\
  14290. NSDictionary* p =
  14291. \f2\b \cf8 nil
  14292. \f0\b0 \cf4 ;\
  14293. \f2\b \cf8 if
  14294. \f0\b0 \cf4 ([(NSArray *)[dict objectForKey:\cf6 @"audios"\cf4 ] count]>\cf7 0\cf4 )\
  14295. p = [[dict objectForKey:\cf6 @"audios"\cf4 ] objectAtIndex:\cf7 0\cf4 ];\
  14296. \f2\b \cf8 if
  14297. \f0\b0 \cf4 ([(NSArray *)[dict objectForKey:\cf6 @"images"\cf4 ] count]>\cf7 0\cf4 )\
  14298. p = [[dict objectForKey:\cf6 @"images"\cf4 ] objectAtIndex:\cf7 0\cf4 ];\
  14299. \f2\b \cf8 if
  14300. \f0\b0 \cf4 ([(NSArray *)[dict objectForKey:\cf6 @"videos"\cf4 ] count]>\cf7 0\cf4 )\
  14301. p = [(NSArray *)[dict objectForKey:\cf6 @"videos"\cf4 ] objectAtIndex:\cf7 0\cf4 ];\
  14302. \f2\b \cf8 if
  14303. \f0\b0 \cf4 (p==
  14304. \f2\b \cf8 nil
  14305. \f0\b0 \cf4 )\
  14306. p = [(NSArray *)[dict objectForKey:\cf6 @"others"\cf4 ] objectAtIndex:\cf7 0\cf4 ];\
  14307. \
  14308. \f2\b \cf8 if
  14309. \f0\b0 \cf4 (
  14310. \f2\b \cf8 self
  14311. \f0\b0 \cf4 .isMapMsg) \{\
  14312. [
  14313. \f2\b \cf8 self
  14314. \f0\b0 \cf4 sendMapMsgWithDict:p];\
  14315. \}
  14316. \f2\b \cf8 else
  14317. \f0\b0 \cf4 \{\
  14318. [
  14319. \f2\b \cf8 self
  14320. \f0\b0 \cf4 doSendAfterUpload:p];\
  14321. \f2\b \cf8 if
  14322. \f0\b0 \cf4 (
  14323. \f2\b \cf8 self
  14324. \f0\b0 \cf4 .isGroupMessages) \{\
  14325. [
  14326. \f2\b \cf8 self
  14327. \f0\b0 \cf4 keepOnUplpadGroupSend];\
  14328. \f2\b \cf8 if
  14329. \f0\b0 \cf4 (_sendedNum ==
  14330. \f2\b \cf8 self
  14331. \f0\b0 \cf4 .userIds.count *
  14332. \f2\b \cf8 self
  14333. \f0\b0 \cf4 .groupUploadObjArray.count) \{\
  14334. \f2\b \cf8 if
  14335. \f0\b0 \cf4 (
  14336. \f2\b \cf8 self
  14337. \f0\b0 \cf4 .waitGroupSendView) \{\
  14338. [
  14339. \f2\b \cf8 self
  14340. \f0\b0 \cf4 .waitGroupSendView removeFromSuperview];\
  14341. [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
  14342. \}\
  14343. \}\
  14344. \}\
  14345. \}\
  14346. p =
  14347. \f2\b \cf8 nil
  14348. \f0\b0 \cf4 ;\
  14349. \}\
  14350. \f2\b \cf8 if
  14351. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UploadVoiceServlet]) \{\
  14352. NSDictionary* p =
  14353. \f2\b \cf8 nil
  14354. \f0\b0 \cf4 ;\
  14355. \f2\b \cf8 if
  14356. \f0\b0 \cf4 ([(NSDictionary *)[dict objectForKey:\cf6 @"audios"\cf4 ] count]>\cf7 0\cf4 )\
  14357. p = [[dict objectForKey:\cf6 @"audios"\cf4 ] objectAtIndex:\cf7 0\cf4 ];\
  14358. [
  14359. \f2\b \cf8 self
  14360. \f0\b0 \cf4 doSendAfterUpload:p];\
  14361. p =
  14362. \f2\b \cf8 nil
  14363. \f0\b0 \cf4 ;\
  14364. \}\
  14365. \
  14366. \f2\b \cf8 if
  14367. \f0\b0 \cf4 ( [aDownload.action isEqualToString:act_UserGet] )\{\
  14368. \f2\b \cf8 if
  14369. \f0\b0 \cf4 (
  14370. \f2\b \cf8 self
  14371. \f0\b0 \cf4 .firstGetUser ||
  14372. \f2\b \cf8 self
  14373. \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
  14374. JXUserObject* user = [[JXUserObject alloc]init];\
  14375. [user getDataFromDict:dict];\
  14376. [_room setNickNameForUser:user];\
  14377. \
  14378. JXUserInfoVC* vc = [JXUserInfoVC alloc];\
  14379. vc.user = user;\
  14380. vc.isJustShow =
  14381. \f2\b \cf8 self
  14382. \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ;\
  14383. vc.fromAddType = \cf7 3\cf4 ;\
  14384. vc = [vc init];\
  14385. \
  14386. JXUserBaseObj *baseObj = [[JXUserBaseObj alloc] init];\
  14387. \cf2 // self.bubbleFontId,self.gradeIndex,self.userId\cf4 \
  14388. baseObj.userId = [dict objectForKey:\cf6 @"userId"\cf4 ];\
  14389. baseObj.bubbleFontId = [dict objectForKey:\cf6 @"bubbleFontId"\cf4 ];\
  14390. baseObj.gradeIndex = [dict objectForKey:\cf6 @"gradeIndex"\cf4 ];\
  14391. [baseObj updateBubbleFontIdAndGradIndex];\
  14392. \cf2 // [g_window addSubview:vc.view];\cf4 \
  14393. \cf2 // [g_navigation pushViewController:vc animated:YES];\cf4 \
  14394. \}
  14395. \f2\b \cf8 else
  14396. \f0\b0 \cf4 \{\
  14397. JXUserBaseObj *baseObj = [[JXUserBaseObj alloc] init];\
  14398. \cf2 // self.bubbleFontId,self.gradeIndex,self.userId\cf4 \
  14399. baseObj.bubbleFontId = [dict objectForKey:\cf6 @"bubbleFontId"\cf4 ];\
  14400. baseObj.gradeIndex = [dict objectForKey:\cf6 @"gradeIndex"\cf4 ];\
  14401. baseObj.userId = [dict objectForKey:\cf6 @"userId"\cf4 ];\
  14402. [baseObj updateBubbleFontIdAndGradIndex];\
  14403. \
  14404. \f2\b \cf8 self
  14405. \f0\b0 \cf4 .isBeenBlack = [[(NSDictionary *)[dict objectForKey:\cf6 @"friends"\cf4 ] objectForKey:\cf6 @"isBeenBlack"\cf4 ] intValue];\
  14406. \f2\b \cf8 self
  14407. \f0\b0 \cf4 .friendStatus = [[(NSDictionary *)[dict objectForKey:\cf6 @"friends"\cf4 ] objectForKey:\cf6 @"status"\cf4 ] intValue];\
  14408. \f2\b \cf8 self
  14409. \f0\b0 \cf4 .isReadDelete = [[(NSDictionary *)[dict objectForKey:\cf6 @"friends"\cf4 ] objectForKey:\cf6 @"isOpenSnapchat"\cf4 ] boolValue];\
  14410. \f2\b \cf8 self
  14411. \f0\b0 \cf4 .isReadDelete = [[(NSDictionary *)[dict objectForKey:\cf6 @"friends"\cf4 ] objectForKey:\cf6 @"isOpenSnapchat"\cf4 ] boolValue];\
  14412. \f2\b \cf8 self
  14413. \f0\b0 \cf4 .firstGetUser =
  14414. \f2\b \cf8 YES
  14415. \f0\b0 \cf4 ;\
  14416. \f2\b \cf8 self
  14417. \f0\b0 \cf4 .onlinestate = [dict[\cf6 @"onlinestate"\cf4 ] boolValue];\
  14418. \f2\b \cf8 if
  14419. \f0\b0 \cf4 ([chatPerson.userId intValue]<\cf7 10100\cf4 && [chatPerson.userId intValue]>=\cf7 10000\cf4 ) \{\
  14420. \f2\b \cf8 if
  14421. \f0\b0 \cf4 (chatPerson.userNickname) \{\
  14422. \f2\b \cf8 self
  14423. \f0\b0 \cf4 .title = chatPerson.userNickname;\
  14424. \}
  14425. \f2\b \cf8 else
  14426. \f0\b0 \cf4 \{\
  14427. \f2\b \cf8 self
  14428. \f0\b0 \cf4 .title = dict[\cf6 @"nickname"\cf4 ];\
  14429. \}\
  14430. [
  14431. \f2\b \cf8 self
  14432. \f0\b0 \cf4 setAudioIconFrame];\
  14433. \}
  14434. \f2\b \cf8 else
  14435. \f0\b0 \cf4 \{\
  14436. \f2\b \cf8 if
  14437. \f0\b0 \cf4 (
  14438. \f2\b \cf8 self
  14439. \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
  14440. \
  14441. \}
  14442. \f2\b \cf8 else
  14443. \f0\b0 \cf4 \{\
  14444. \cf2 // NSString *str = self.onlinestate ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
  14445. \f2\b \cf8 if
  14446. \f0\b0 \cf4 (chatPerson.userNickname) \{\
  14447. \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.remarkName.length > 0 ? chatPerson.remarkName : chatPerson.userNickname,str];\cf4 \
  14448. [
  14449. \f2\b \cf8 self
  14450. \f0\b0 \cf4 setChatTitle:chatPerson.remarkName.length > \cf7 0\cf4 ? chatPerson.remarkName : chatPerson.userNickname];\
  14451. \}
  14452. \f2\b \cf8 else
  14453. \f0\b0 \cf4 \{\
  14454. \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",dict[@"nickname"],str];\cf4 \
  14455. [
  14456. \f2\b \cf8 self
  14457. \f0\b0 \cf4 setChatTitle:dict[\cf6 @"nickname"\cf4 ]];\
  14458. \}\
  14459. \}\
  14460. \
  14461. \}\
  14462. \
  14463. \
  14464. \f2\b \cf8 if
  14465. \f0\b0 \cf4 ([dict[\cf6 @"userType"\cf4 ] intValue] == \cf7 2\cf4 ) \{ \cf2 //
  14466. \f1 \'bb\'f1\'c8\'a1\'b9\'ab\'d6\'da\'ba\'c5\'b2\'cb\'b5\'a5
  14467. \f0 \cf4 \
  14468. \cf2 //
  14469. \f1 \'bb\'f1\'c8\'a1\'b9\'ab\'d6\'da\'ba\'c5\'b2\'cb\'b5\'a5
  14470. \f0 \cf4 \
  14471. [g_server getPublicMenuListWithUserId:chatPerson.userId toView:
  14472. \f2\b \cf8 self
  14473. \f0\b0 \cf4 ];\
  14474. \}\
  14475. \cf2 // else \{\cf4 \
  14476. \cf2 // //
  14477. \f1 \'bb\'f1\'c8\'a1\'b9\'ab\'d6\'da\'ba\'c5\'b2\'cb\'b5\'a5
  14478. \f0 \cf4 \
  14479. \cf2 // [g_server getPublicMenuListWithUserId:chatPerson.userId toView:self];\cf4 \
  14480. \cf2 // \}\cf4 \
  14481. \}\
  14482. \
  14483. \
  14484. \}\
  14485. \f2\b \cf8 if
  14486. \f0\b0 \cf4 ( [aDownload.action isEqualToString:act_roomGet] )\{\
  14487. \cf2 // [_room getDataFromDict:dict];\cf4 \
  14488. \cf2 //\cf4 \
  14489. \cf2 // JXRoomMemberVC* vc = [JXRoomMemberVC alloc];\cf4 \
  14490. \cf2 // vc.chatRoom = chatRoom;\cf4 \
  14491. \cf2 // vc.room = _room;\cf4 \
  14492. \cf2 // vc.delegate = self;\cf4 \
  14493. \cf2 // vc = [vc init];\cf4 \
  14494. \cf12 ///
  14495. \f3 \cf2 / [g_window addSubview:vc.view];
  14496. \f0 \cf4 \
  14497. \cf2 // [g_navigation pushViewController:vc animated:YES];\cf4 \
  14498. \
  14499. _dataDict = dict;\
  14500. \
  14501. \f2\b \cf8 if
  14502. \f0\b0 \cf4 ([[dict objectForKey:\cf6 @"s"\cf4 ] integerValue] == \cf7 1\cf4 ) \{\
  14503. \f2\b \cf8 self
  14504. \f0\b0 \cf4 .isDisable =
  14505. \f2\b \cf8 NO
  14506. \f0\b0 \cf4 ;\
  14507. \}
  14508. \f2\b \cf8 else
  14509. \f0\b0 \cf4 \{\
  14510. \f2\b \cf8 self
  14511. \f0\b0 \cf4 .isDisable =
  14512. \f2\b \cf8 YES
  14513. \f0\b0 \cf4 ;\
  14514. \}\
  14515. \
  14516. \f2\b \cf8 if
  14517. \f0\b0 \cf4 (g_xmpp.isLogined == login_status_no)\{\
  14518. \cf2 // [self hideKeyboard:NO];\cf4 \
  14519. \cf2 // [g_xmpp showXmppOfflineAlert];\cf4 \
  14520. \cf2 // return YES;\cf4 \
  14521. \
  14522. \cf2 // [g_xmpp logout];\cf4 \
  14523. [g_xmpp login];\
  14524. \
  14525. \}\
  14526. \
  14527. \cf2 // _chatRoom = [g_xmpp.roomPool joinRoom:[dict objectForKey:@"jid"] title:[dict objectForKey:@"name"] isNew:YES];\cf4 \
  14528. \
  14529. \
  14530. \f2\b \cf8 if
  14531. \f0\b0 \cf4 (
  14532. \f2\b \cf8 self
  14533. \f0\b0 \cf4 .isFirst) \{\
  14534. \f2\b \cf8 self
  14535. \f0\b0 \cf4 .isFirst =
  14536. \f2\b \cf8 NO
  14537. \f0\b0 \cf4 ;\
  14538. \
  14539. roomData * roomdata = [[roomData alloc] init];\
  14540. [roomdata getDataFromDict:dict];\
  14541. \f2\b \cf8 return
  14542. \f0\b0 \cf4 ;\
  14543. \}\
  14544. \
  14545. \
  14546. JXUserObject *user = [[JXUserObject sharedInstance] getUserById:[dict objectForKey:\cf6 @"jid"\cf4 ]];\
  14547. \f2\b \cf8 if
  14548. \f0\b0 \cf4 (user && [user.groupStatus intValue] == \cf7 0\cf4 )\{\
  14549. \
  14550. \cf2 //
  14551. \f1 \'c0\'cf\'b7\'bf\'bc\'e4
  14552. \f0 :\cf4 \
  14553. [
  14554. \f2\b \cf8 self
  14555. \f0\b0 \cf4 showChatView];\
  14556. [
  14557. \f2\b \cf8 self
  14558. \f0\b0 \cf4 actionQuit];\
  14559. \}
  14560. \f2\b \cf8 else
  14561. \f0\b0 \cf4 \{\
  14562. JXRoomObject *chatRoomObj = [[JXXMPP sharedInstance].roomPool joinRoom:[dict objectForKey:\cf6 @"jid"\cf4 ] title:[dict objectForKey:\cf6 @"name"\cf4 ] lastDate:
  14563. \f2\b \cf8 nil
  14564. \f0\b0 \cf4 isNew:
  14565. \f2\b \cf8 YES
  14566. \f0\b0 \cf4 ];\
  14567. \f2\b \cf8 BOOL
  14568. \f0\b0 \cf4 isNeedVerify = [dict[\cf6 @"isNeedVerify"\cf4 ] boolValue];\
  14569. \f2\b \cf8 long
  14570. \f0\b0 \cf4 userId = [dict[\cf6 @"userId"\cf4 ] longLongValue];\
  14571. \f2\b \cf8 if
  14572. \f0\b0 \cf4 (isNeedVerify && userId != [g_myself.userId longLongValue]) \{\
  14573. \
  14574. \f2\b \cf8 self
  14575. \f0\b0 \cf4 .roomJid = [dict objectForKey:\cf6 @"jid"\cf4 ];\
  14576. \cf2 // self.roomUserName = [dict objectForKey:@"nickname"];\cf4 \
  14577. \cf2 // self.roomUserId = [dict objectForKey:@"userId"];\cf4 \
  14578. \
  14579. JXInputVC* vc = [JXInputVC alloc];\
  14580. vc.delegate =
  14581. \f2\b \cf8 self
  14582. \f0\b0 \cf4 ;\
  14583. vc.didTouch =
  14584. \f2\b \cf8 @selector
  14585. \f0\b0 \cf4 (onInputHello:);\
  14586. vc.inputTitle = Localized(\cf6 @"JX_GroupOwnersHaveEnabled"\cf4 );\
  14587. vc.titleColor = [UIColor lightGrayColor];\
  14588. vc.titleFont = [UIFont systemFontOfSize:\cf7 13.0\cf4 ];\
  14589. vc.inputHint = Localized(\cf6 @"JX_PleaseEnterTheReason"\cf4 );\
  14590. vc = [vc init];\
  14591. [g_window addSubview:vc.view];\
  14592. \}
  14593. \f2\b \cf8 else
  14594. \f0\b0 \cf4 \{\
  14595. \
  14596. [_wait start:Localized(\cf6 @"JXAlert_AddRoomIng"\cf4 ) delay:\cf7 30\cf4 ];\
  14597. \cf2 //
  14598. \f1 \'d0\'c2\'b7\'bf\'bc\'e4
  14599. \f0 :\cf4 \
  14600. chatRoomObj.delegate =
  14601. \f2\b \cf8 self
  14602. \f0\b0 \cf4 ;\
  14603. [chatRoomObj joinRoom:
  14604. \f2\b \cf8 YES
  14605. \f0\b0 \cf4 ];\
  14606. \}\
  14607. \}\
  14608. \
  14609. \
  14610. \}\
  14611. \f2\b \cf8 if
  14612. \f0\b0 \cf4 ( [aDownload.action isEqualToString:act_roomMemberGet] )\{\
  14613. _disableSay = [[dict objectForKey:\cf6 @"talkTime"\cf4 ] longLongValue];\
  14614. _audioMeetingNo = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,dict[\cf6 @"call"\cf4 ]];\
  14615. _videoMeetingNo = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,dict[\cf6 @"videoMeetingNo"\cf4 ]];\
  14616. _userNickName = dict[\cf6 @"nickname"\cf4 ];\
  14617. [_table reloadData];\
  14618. \
  14619. \f2\b \cf8 if
  14620. \f0\b0 \cf4 (_relayMsgArray.count > \cf7 0\cf4 ) \{\
  14621. \f2\b \cf8 for
  14622. \f0\b0 \cf4 (JXMessageObject *msg
  14623. \f2\b \cf8 in
  14624. \f0\b0 \cf4
  14625. \f2\b \cf8 self
  14626. \f0\b0 \cf4 .relayMsgArray) \{\
  14627. \f2\b \cf8 if
  14628. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeRedPacket) \{\
  14629. msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
  14630. msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JXredPacket"\cf4 )];\
  14631. \}\
  14632. \f2\b \cf8 if
  14633. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeAudioMeetingInvite || [msg.type intValue] == kWCMessageTypeVideoMeetingInvite || [msg.type intValue] == kWCMessageTypeAudioChatCancel || [msg.type intValue] == kWCMessageTypeAudioChatEnd || [msg.type intValue] == kWCMessageTypeVideoChatCancel || [msg.type intValue] == kWCMessageTypeVideoChatEnd || [msg.type intValue] == kWCMessageTypeAVBusy) \{\
  14634. \
  14635. msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
  14636. msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JX_AudioAndVideoCalls"\cf4 )];\
  14637. \}\
  14638. [
  14639. \f2\b \cf8 self
  14640. \f0\b0 \cf4 relay:msg];\
  14641. \}\
  14642. \cf2 // [self relay];\cf4 \
  14643. \}\
  14644. \}\
  14645. \f2\b \cf8 if
  14646. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomMemberList]) \{\
  14647. _room.roomId = roomId;\
  14648. _room.members = [array1 mutableCopy];\
  14649. \
  14650. memberData *data = [
  14651. \f2\b \cf8 self
  14652. \f0\b0 \cf4 .room getMember:g_myself.userId];\
  14653. \f2\b \cf8 if
  14654. \f0\b0 \cf4 ([data.role intValue] == \cf7 1\cf4 || [data.role intValue] == \cf7 2\cf4 ) \{\
  14655. _isAdmin =
  14656. \f2\b \cf8 YES
  14657. \f0\b0 \cf4 ;\
  14658. \}
  14659. \f2\b \cf8 else
  14660. \f0\b0 \cf4 \{\
  14661. _isAdmin =
  14662. \f2\b \cf8 NO
  14663. \f0\b0 \cf4 ;\
  14664. \}\
  14665. \f2\b \cf8 self
  14666. \f0\b0 \cf4 .title = [NSString stringWithFormat:\cf6 @"%@(%ld)"\cf4 ,
  14667. \f2\b \cf8 self
  14668. \f0\b0 \cf4 .chatPerson.userNickname, array1.count];\
  14669. [
  14670. \f2\b \cf8 self
  14671. \f0\b0 \cf4 setAudioIconFrame];\
  14672. \}\
  14673. \cf2 //
  14674. \f1 \'bb\'f1\'c8\'a1\'ba\'ec\'b0\'fc\'d0\'c5\'cf\'a2
  14675. \f0 \cf4 \
  14676. \f2\b \cf8 if
  14677. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_getRedPacket]) \{\
  14678. \cf2 // if ([dict[@"packet"][@"type"] intValue] != 3) \{\cf4 \
  14679. NSString *userId = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,[(NSDictionary *)[dict objectForKey:\cf6 @"packet"\cf4 ] objectForKey:\cf6 @"userId"\cf4 ]];\
  14680. \f2\b \cf8 if
  14681. \f0\b0 \cf4 (
  14682. \f2\b \cf8 self
  14683. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
  14684. \f2\b \cf8 if
  14685. \f0\b0 \cf4 (
  14686. \f2\b \cf8 self
  14687. \f0\b0 \cf4 .isDidRedPacketRemind) \{\
  14688. \f2\b \cf8 self
  14689. \f0\b0 \cf4 .isDidRedPacketRemind =
  14690. \f2\b \cf8 NO
  14691. \f0\b0 \cf4 ;\
  14692. JXredPacketDetailVC * redPacketDetailVC = [[JXredPacketDetailVC alloc]init];\
  14693. redPacketDetailVC.dataDict = [[NSDictionary alloc]initWithDictionary:dict];\
  14694. redPacketDetailVC.isGroup =
  14695. \f2\b \cf8 self
  14696. \f0\b0 \cf4 .room.roomId.length > \cf7 0\cf4 ;\
  14697. [g_navigation pushViewController:redPacketDetailVC animated:
  14698. \f2\b \cf8 YES
  14699. \f0\b0 \cf4 ];\
  14700. \}
  14701. \f2\b \cf8 else
  14702. \f0\b0 \cf4 \{\
  14703. \
  14704. \f2\b \cf8 if
  14705. \f0\b0 \cf4 ([dict[\cf6 @"packet"\cf4 ][\cf6 @"type"\cf4 ] intValue] == \cf7 3\cf4 ) \{\
  14706. \cf2 //\cf4 \
  14707. [
  14708. \f2\b \cf8 self
  14709. \f0\b0 \cf4 showRedPacket:dict];\
  14710. [
  14711. \f2\b \cf8 self
  14712. \f0\b0 \cf4 openReadPacket];\
  14713. \}
  14714. \f2\b \cf8 else
  14715. \f0\b0 \cf4 \{\
  14716. [
  14717. \f2\b \cf8 self
  14718. \f0\b0 \cf4 showRedPacket:dict];\
  14719. \}\
  14720. \}\
  14721. \
  14722. \cf2 // [g_server openRedPacket:dict[@"packet"][@"id"] toView:self];\cf4 \
  14723. \}
  14724. \f2\b \cf8 else
  14725. \f0\b0 \cf4 \{\
  14726. [_wait stop];\
  14727. \f2\b \cf8 if
  14728. \f0\b0 \cf4 ([userId isEqualToString:MY_USER_ID]) \{\
  14729. [
  14730. \f2\b \cf8 self
  14731. \f0\b0 \cf4 changeMessageRedPacketStatus:dict[\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ]];\
  14732. [
  14733. \f2\b \cf8 self
  14734. \f0\b0 \cf4 changeMessageArrFileSize:dict[\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ]];\
  14735. \
  14736. JXredPacketDetailVC * redPacketDetailVC = [[JXredPacketDetailVC alloc]init];\
  14737. redPacketDetailVC.dataDict = [[NSDictionary alloc]initWithDictionary:dict];\
  14738. redPacketDetailVC.isGroup =
  14739. \f2\b \cf8 self
  14740. \f0\b0 \cf4 .room.roomId.length > \cf7 0\cf4 ;\
  14741. [g_navigation pushViewController:redPacketDetailVC animated:
  14742. \f2\b \cf8 YES
  14743. \f0\b0 \cf4 ];\
  14744. \}
  14745. \f2\b \cf8 else
  14746. \f0\b0 \cf4 \{\
  14747. \cf2 // [g_server openRedPacket:dict[@"packet"][@"id"] toView:self];\cf4 \
  14748. \f2\b \cf8 if
  14749. \f0\b0 \cf4 ([dict[\cf6 @"packet"\cf4 ][\cf6 @"type"\cf4 ] intValue] == \cf7 3\cf4 ) \{\
  14750. \cf2 //\cf4 \
  14751. [
  14752. \f2\b \cf8 self
  14753. \f0\b0 \cf4 showRedPacket:dict];\
  14754. [
  14755. \f2\b \cf8 self
  14756. \f0\b0 \cf4 openReadPacket];\
  14757. \}
  14758. \f2\b \cf8 else
  14759. \f0\b0 \cf4 \{\
  14760. [
  14761. \f2\b \cf8 self
  14762. \f0\b0 \cf4 showRedPacket:dict];\
  14763. \}\
  14764. \}\
  14765. \}\
  14766. \cf2 // \}\cf4 \
  14767. \
  14768. \}\
  14769. \cf2 //
  14770. \f1 \'b4\'f2\'bf\'aa\'ba\'ec\'b0\'fc
  14771. \f0 \cf4 \
  14772. \f2\b \cf8 if
  14773. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_openRedPacket]) \{\
  14774. \
  14775. NSString *userId = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,[(NSDictionary *)[dict objectForKey:\cf6 @"packet"\cf4 ] objectForKey:\cf6 @"userId"\cf4 ]];\
  14776. \
  14777. \cf2 // if ([dict[@"packet"][@"status"] intValue] == 2) \{\cf4 \
  14778. [
  14779. \f2\b \cf8 self
  14780. \f0\b0 \cf4 changeMessageRedPacketStatus:dict[\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ]];\
  14781. [
  14782. \f2\b \cf8 self
  14783. \f0\b0 \cf4 changeMessageArrFileSize:dict[\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ]];\
  14784. \cf2 // \}\cf4 \
  14785. [
  14786. \f2\b \cf8 self
  14787. \f0\b0 \cf4 doEndEdit];\
  14788. \cf2 // JXOpenRedPacketVC * openRedPacketVC = [[JXOpenRedPacketVC alloc]init];\cf4 \
  14789. \cf2 // openRedPacketVC.dataDict = [[NSDictionary alloc]initWithDictionary:dict];\cf4 \
  14790. \cf2 // [g_window addSubview:openRedPacketVC.view];\cf4 \
  14791. \f2\b \cf8 if
  14792. \f0\b0 \cf4 (
  14793. \f2\b \cf8 self
  14794. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
  14795. JXMessageObject *msg = [[JXMessageObject alloc] init];\
  14796. msg.type = [NSNumber numberWithInt:kWCMessageTypeRemind];\
  14797. msg.timeSend = [NSDate date];\
  14798. msg.toUserId =
  14799. \f2\b \cf8 self
  14800. \f0\b0 \cf4 .chatPerson.userId;\
  14801. msg.fromUserId = MY_USER_ID;\
  14802. msg.objectId = dict[\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ];\
  14803. NSString *userName = [NSString string];\
  14804. NSString *overStr = [NSString string];\
  14805. \f2\b \cf8 if
  14806. \f0\b0 \cf4 ([userId intValue] == [MY_USER_ID intValue]) \{\
  14807. userName = Localized(\cf6 @"JX_RedPacketOneself"\cf4 );\
  14808. \f2\b \cf8 double
  14809. \f0\b0 \cf4 over = [[NSString stringWithFormat:\cf6 @"%.2f"\cf4 ,[dict[\cf6 @"packet"\cf4 ][\cf6 @"over"\cf4 ] floatValue]] doubleValue];\
  14810. \f2\b \cf8 if
  14811. \f0\b0 \cf4 (over < \cf7 0.01\cf4 ) \{\
  14812. overStr = Localized(\cf6 @"JX_RedPacketOver"\cf4 );\
  14813. \}\
  14814. \}
  14815. \f2\b \cf8 else
  14816. \f0\b0 \cf4 \{\
  14817. userName = dict[\cf6 @"packet"\cf4 ][\cf6 @"userName"\cf4 ];\
  14818. \}\
  14819. NSString *getRedStr = [NSString stringWithFormat:Localized(\cf6 @"JX_GetRedPacketFromFriend"\cf4 ),userName];\
  14820. msg.content = [NSString stringWithFormat:\cf6 @"%@%@"\cf4 ,getRedStr,overStr];\
  14821. [msg insert:
  14822. \f2\b \cf8 self
  14823. \f0\b0 \cf4 .roomJid];\
  14824. \
  14825. \
  14826. \
  14827. [
  14828. \f2\b \cf8 self
  14829. \f0\b0 \cf4 showOneMsg:msg];\
  14830. \}\
  14831. [UIView animateWithDuration:\cf7 .3f\cf4 animations:^\{\
  14832. _redBackV.frame = CGRectMake(_redBackV.frame.origin.x, -_redBackV.frame.size.height/\cf7 2\cf4 , _redBackV.frame.size.width, _redBackV.frame.size.height);\
  14833. \} completion:^(
  14834. \f2\b \cf8 BOOL
  14835. \f0\b0 \cf4 finished) \{\
  14836. [_redBaseView removeFromSuperview];\
  14837. \
  14838. JXredPacketDetailVC * redPacketDetailVC = [[JXredPacketDetailVC alloc]init];\
  14839. redPacketDetailVC.dataDict = [[NSDictionary alloc]initWithDictionary:dict];\
  14840. redPacketDetailVC.isGroup =
  14841. \f2\b \cf8 self
  14842. \f0\b0 \cf4 .room.roomId.length > \cf7 0\cf4 ;\
  14843. [g_navigation pushViewController:redPacketDetailVC animated:
  14844. \f2\b \cf8 NO
  14845. \f0\b0 \cf4 ];\
  14846. \}];\
  14847. \
  14848. \
  14849. [g_server getUserMoenyToView:
  14850. \f2\b \cf8 self
  14851. \f0\b0 \cf4 ];\
  14852. \
  14853. \}\
  14854. \f2\b \cf8 if
  14855. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_getUserMoeny]) \{\
  14856. g_App.myMoney = [dict[\cf6 @"balance"\cf4 ] doubleValue];\
  14857. \}\
  14858. \
  14859. \cf2 //
  14860. \f1 \'c2\'fe\'d3\'ce\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
  14861. \f0 \cf4 \
  14862. \f2\b \cf8 if
  14863. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_tigaseMsgs] || [aDownload.action isEqualToString:act_tigaseMucMsgs]) \{\
  14864. \f2\b \cf8 self
  14865. \f0\b0 \cf4 .isGetServerMsg =
  14866. \f2\b \cf8 NO
  14867. \f0\b0 \cf4 ;\
  14868. \f2\b \cf8 if
  14869. \f0\b0 \cf4 (array1.count > \cf7 0\cf4 ) \{\
  14870. NSString* s;\
  14871. \f2\b \cf8 if
  14872. \f0\b0 \cf4 (!IsStringNull(
  14873. \f2\b \cf8 self
  14874. \f0\b0 \cf4 .roomJid))\
  14875. s =
  14876. \f2\b \cf8 self
  14877. \f0\b0 \cf4 .roomJid;\
  14878. \f2\b \cf8 else
  14879. \f0\b0 \cf4 \
  14880. s = chatPerson.userId;\
  14881. [[JXMessageObject sharedInstance] getHistory:array1 userId:s];\
  14882. \
  14883. \f2\b \cf8 if
  14884. \f0\b0 \cf4 (
  14885. \f2\b \cf8 self
  14886. \f0\b0 \cf4 .roomJid && _taskList.count > \cf7 0\cf4 ) \{\
  14887. JXSynTask *task = _taskList.firstObject;\
  14888. \f2\b \cf8 if
  14889. \f0\b0 \cf4 (array1.count < PAGECOUNT) \{\
  14890. [task
  14891. \f2\b \cf8 delete
  14892. \f0\b0 \cf4 ];\
  14893. [_taskList removeObjectAtIndex: \cf7 0\cf4 ];\
  14894. \}
  14895. \f2\b \cf8 else
  14896. \f0\b0 \cf4 \{\
  14897. NSDictionary *dict = array1.lastObject;\
  14898. task.endTime = [NSDate dateWithTimeIntervalSince1970:[[dict objectForKey:kMESSAGE_TIMESEND] doubleValue] / \cf7 1000.0\cf4 ];\
  14899. \}\
  14900. \}
  14901. \f2\b \cf8 else
  14902. \f0\b0 \cf4 \{\
  14903. \f2\b \cf8 if
  14904. \f0\b0 \cf4 (
  14905. \f2\b \cf8 self
  14906. \f0\b0 \cf4 .isSyncMsg) \{\
  14907. [_array removeAllObjects];\
  14908. _page = \cf7 0\cf4 ;\
  14909. \f2\b \cf8 self
  14910. \f0\b0 \cf4 .isSyncMsg =
  14911. \f2\b \cf8 NO
  14912. \f0\b0 \cf4 ;\
  14913. \}
  14914. \f2\b \cf8 else
  14915. \f0\b0 \cf4 \{\
  14916. \
  14917. \f2\b \cf8 self
  14918. \f0\b0 \cf4 .isShowHeaderPull = array1.count >= \cf7 20\cf4 ;\
  14919. \}\
  14920. \}\
  14921. \
  14922. \f2\b \cf8 int
  14923. \f0\b0 \cf4 pageCount = \cf7 20\cf4 ;\
  14924. \f2\b \cf8 if
  14925. \f0\b0 \cf4 (
  14926. \f2\b \cf8 self
  14927. \f0\b0 \cf4 .newMsgCount > \cf7 20\cf4 ) \{\
  14928. pageCount =
  14929. \f2\b \cf8 self
  14930. \f0\b0 \cf4 .newMsgCount;\
  14931. \f2\b \cf8 self
  14932. \f0\b0 \cf4 .newMsgCount = \cf7 0\cf4 ;\
  14933. \}\
  14934. NSMutableArray *p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:[NSDate dateWithTimeIntervalSince1970:\cf7 0\cf4 ]];\
  14935. \f2\b \cf8 if
  14936. \f0\b0 \cf4 (p.count > \cf7 0\cf4 ) \{\
  14937. \
  14938. \f2\b \cf8 self
  14939. \f0\b0 \cf4 .isGetServerMsg =
  14940. \f2\b \cf8 NO
  14941. \f0\b0 \cf4 ;\
  14942. \f2\b \cf8 self
  14943. \f0\b0 \cf4 .scrollLine = \cf7 0\cf4 ;\
  14944. [
  14945. \f2\b \cf8 self
  14946. \f0\b0 \cf4 refresh:
  14947. \f2\b \cf8 nil
  14948. \f0\b0 \cf4 ];\
  14949. \}\
  14950. \
  14951. \}\
  14952. \f2\b \cf8 else
  14953. \f0\b0 \cf4 \{\
  14954. \
  14955. \f2\b \cf8 if
  14956. \f0\b0 \cf4 (
  14957. \f2\b \cf8 self
  14958. \f0\b0 \cf4 .roomJid && _taskList.count > \cf7 0\cf4 ) \{\
  14959. JXSynTask *task = _taskList.firstObject;\
  14960. [task
  14961. \f2\b \cf8 delete
  14962. \f0\b0 \cf4 ];\
  14963. [_taskList removeObjectAtIndex: \cf7 0\cf4 ];\
  14964. \
  14965. \f2\b \cf8 self
  14966. \f0\b0 \cf4 .isGetServerMsg =
  14967. \f2\b \cf8 NO
  14968. \f0\b0 \cf4 ;\
  14969. \f2\b \cf8 self
  14970. \f0\b0 \cf4 .scrollLine = \cf7 0\cf4 ;\
  14971. [
  14972. \f2\b \cf8 self
  14973. \f0\b0 \cf4 refresh:
  14974. \f2\b \cf8 nil
  14975. \f0\b0 \cf4 ];\
  14976. \}
  14977. \f2\b \cf8 else
  14978. \f0\b0 \cf4 \{\
  14979. \f2\b \cf8 self
  14980. \f0\b0 \cf4 .isShowHeaderPull =
  14981. \f2\b \cf8 NO
  14982. \f0\b0 \cf4 ;\
  14983. \}\
  14984. \}\
  14985. \}\
  14986. \
  14987. \f2\b \cf8 if
  14988. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_publicMenuList]) \{\
  14989. \
  14990. _menuList = [NSArray arrayWithArray:array1];\
  14991. \f2\b \cf8 if
  14992. \f0\b0 \cf4 (_menuList.count > \cf7 0\cf4 ) \{\
  14993. [
  14994. \f2\b \cf8 self
  14995. \f0\b0 \cf4 createFooterSubViews];\
  14996. \}\
  14997. \
  14998. \}\
  14999. \
  15000. \f2\b \cf8 if
  15001. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_tigaseDeleteMsg]) \{\
  15002. \
  15003. NSDictionary *param = aDownload.params;\
  15004. \f2\b \cf8 int
  15005. \f0\b0 \cf4 type = [[NSString stringWithFormat:\cf6 @"%@"\cf4 , param[\cf6 @"deleteType"\cf4 ]] intValue];\
  15006. \
  15007. \f2\b \cf8 if
  15008. \f0\b0 \cf4 (
  15009. \f2\b \cf8 self
  15010. \f0\b0 \cf4 .withdrawIndex >= \cf7 0\cf4 ) \{\
  15011. \cf2 //[_wait start];\cf4 \
  15012. JXMessageObject *msg = _array[
  15013. \f2\b \cf8 self
  15014. \f0\b0 \cf4 .withdrawIndex];\
  15015. \
  15016. \cf2 //
  15017. \f1 \'b7\'a2\'cb\'cd\'b3\'b7\'bb\'d8\'cf\'fb\'cf\'a2\'b5\'c4
  15018. \f0 XMPP\cf4 \
  15019. JXMessageObject *newMsg=[[JXMessageObject alloc]init];\
  15020. newMsg.timeSend = [NSDate date];\
  15021. newMsg.fromUserId = MY_USER_ID;\
  15022. \
  15023. \f2\b \cf8 if
  15024. \f0\b0 \cf4 ([
  15025. \f2\b \cf8 self
  15026. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  15027. newMsg.isGroup =
  15028. \f2\b \cf8 YES
  15029. \f0\b0 \cf4 ;\
  15030. newMsg.fromUserName = _userNickName;\
  15031. newMsg.toUserId =
  15032. \f2\b \cf8 self
  15033. \f0\b0 \cf4 .roomJid;\
  15034. \}\
  15035. \f2\b \cf8 else
  15036. \f0\b0 \cf4 \{\
  15037. newMsg.fromUserName = MY_USER_NAME;\
  15038. newMsg.toUserId = chatPerson.userId;\
  15039. \}\
  15040. newMsg.content = msg.messageId;\
  15041. newMsg.type = [NSNumber numberWithInt:type];\
  15042. newMsg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  15043. \
  15044. [g_xmpp sendMessage:newMsg roomName:
  15045. \f2\b \cf8 self
  15046. \f0\b0 \cf4 .roomJid];\cf2 //
  15047. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  15048. \f0 \cf4 \
  15049. \}\
  15050. \
  15051. \}\
  15052. \
  15053. \
  15054. \cf2 //
  15055. \f1 \'ca\'d5\'b2\'d8\'b1\'ed\'c7\'e9
  15056. \f0 \cf4 \
  15057. \f2\b \cf8 if
  15058. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_userEmojiAdd]) \{\
  15059. \f2\b \cf8 if
  15060. \f0\b0 \cf4 ([dict[\cf6 @"type"\cf4 ] intValue] == CollectTypeEmoji) \{\
  15061. [g_myself.favorites addObject:dict];\
  15062. \}\
  15063. \
  15064. [JXMyTools showTipView:Localized(\cf6 @"JX_CollectionSuccess"\cf4 )];\
  15065. \
  15066. [g_notify postNotificationName:kEmojiRefresh object:
  15067. \f2\b \cf8 nil
  15068. \f0\b0 \cf4 ];\
  15069. [g_notify postNotificationName:kFavoritesRefresh object:
  15070. \f2\b \cf8 nil
  15071. \f0\b0 \cf4 ];\
  15072. \f2\b \cf8 if
  15073. \f0\b0 \cf4 (
  15074. \f2\b \cf8 self
  15075. \f0\b0 \cf4 .isSelectMore) \{\
  15076. [
  15077. \f2\b \cf8 self
  15078. \f0\b0 \cf4 actionQuit];\
  15079. \}\
  15080. \}\
  15081. \
  15082. \cf2 //
  15083. \f1 \'c8\'a1\'cf\'fb\'ca\'d5\'b2\'d8
  15084. \f0 \cf4 \
  15085. \f2\b \cf8 if
  15086. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_userEmojiDelete]) \{\
  15087. [JXMyTools showTipView:Localized(\cf6 @"JXAlert_DeleteOK"\cf4 )];\
  15088. \}\
  15089. \
  15090. \cf2 //
  15091. \f1 \'cc\'ed\'bc\'d3\'bf\'ce\'b3\'cc
  15092. \f0 \cf4 \
  15093. \f2\b \cf8 if
  15094. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_userCourseAdd]) \{\
  15095. [JXMyTools showTipView:Localized(\cf6 @"JX_AddSuccess"\cf4 )];\
  15096. [_recordArray removeAllObjects];\
  15097. \}\
  15098. \f2\b \cf8 if
  15099. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_userCourseUpdate]) \{\
  15100. [JXMyTools showTipView:Localized(\cf6 @"JXAlert_DeleteOK"\cf4 )];\
  15101. [g_notify postNotificationName:kUpdateCourseList object:
  15102. \f2\b \cf8 nil
  15103. \f0\b0 \cf4 ];\
  15104. \}\
  15105. \
  15106. \cf2 //
  15107. \f1 \'b7\'a2\'cb\'cd\'ca\'d5\'b2\'d8
  15108. \f0
  15109. \f1 \'bf\'bd\'b1\'b4\'ce\'c4\'bc\'fe
  15110. \f0 \cf4 \
  15111. \f2\b \cf8 if
  15112. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UploadCopyFileServlet]) \{\
  15113. \f2\b \cf8 if
  15114. \f0\b0 \cf4 (
  15115. \f2\b \cf8 self
  15116. \f0\b0 \cf4 .isGroupMessages) \{\
  15117. NSMutableArray *allArray = [NSMutableArray array];\
  15118. \f2\b \cf8 if
  15119. \f0\b0 \cf4 (_collectionData.content && _collectionData.content.length > \cf7 0\cf4 ) \{\
  15120. [allArray addObject:_collectionData.content];\
  15121. \}\
  15122. [allArray addObject:dict[\cf6 @"url"\cf4 ]];\
  15123. \f2\b \cf8 self
  15124. \f0\b0 \cf4 .groupSendMsgArray = allArray;\
  15125. [
  15126. \f2\b \cf8 self
  15127. \f0\b0 \cf4 collectionMsgSendAll:allArray];\
  15128. \}
  15129. \f2\b \cf8 else
  15130. \f0\b0 \cf4 \{\
  15131. [
  15132. \f2\b \cf8 self
  15133. \f0\b0 \cf4 collectionMsgSend:dict[\cf6 @"url"\cf4 ] isFile:
  15134. \f2\b \cf8 YES
  15135. \f0\b0 \cf4 ];\
  15136. \}\
  15137. \}\
  15138. \
  15139. \cf2 //
  15140. \f1 \'bb\'f1\'c8\'a1\'d2\'f4\'ca\'d3\'c6\'b5\'b7\'fe\'ce\'f1\'c6\'f7\'b5\'d8\'d6\'b7
  15141. \f0 \cf4 \
  15142. \f2\b \cf8 if
  15143. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UserOpenMeet]) \{\
  15144. \f2\b \cf8 self
  15145. \f0\b0 \cf4 .meetUrl = [dict objectForKey:\cf6 @"meetUrl"\cf4 ];\
  15146. \f2\b \cf8 if
  15147. \f0\b0 \cf4 (
  15148. \f2\b \cf8 self
  15149. \f0\b0 \cf4 .isAudioMeeting) \{\
  15150. [
  15151. \f2\b \cf8 self
  15152. \f0\b0 \cf4 onChatAudio:
  15153. \f2\b \cf8 nil
  15154. \f0\b0 \cf4 ];\
  15155. \}
  15156. \f2\b \cf8 else
  15157. \f0\b0 \cf4 \{\
  15158. [
  15159. \f2\b \cf8 self
  15160. \f0\b0 \cf4 onChatVideo:
  15161. \f2\b \cf8 nil
  15162. \f0\b0 \cf4 ];\
  15163. \}\
  15164. \}\
  15165. \
  15166. \cf2 //
  15167. \f1 \'bb\'f1\'c8\'a1\'c8\'ba\'d6\'fa\'ca\'d6
  15168. \f0 \cf4 \
  15169. \f2\b \cf8 if
  15170. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_queryGroupHelper]) \{\
  15171. NSMutableArray *arr = [[NSMutableArray alloc] init];\
  15172. \f2\b \cf8 for
  15173. \f0\b0 \cf4 (
  15174. \f2\b \cf8 int
  15175. \f0\b0 \cf4 i = \cf7 0\cf4 ; i < array1.count; i++) \{\
  15176. JXGroupHeplerModel *model = [[JXGroupHeplerModel alloc] init];\
  15177. [model getDataWithDict:array1[i]];\
  15178. [arr addObject:model];\
  15179. \}\
  15180. [
  15181. \f2\b \cf8 self
  15182. \f0\b0 \cf4 setupMoreView:arr];\
  15183. \}\
  15184. \
  15185. \f2\b \cf8 if
  15186. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomGetRoom]) \{\
  15187. \
  15188. \f2\b \cf8 BOOL
  15189. \f0\b0 \cf4 isOpen = [g_default boolForKey:kgoucaiComePush];\
  15190. \
  15191. \f2\b \cf8 BOOL
  15192. \f0\b0 \cf4 isOpen2 = [g_default boolForKey:kGuanXinComePush];\
  15193. \
  15194. \f2\b \cf8 if
  15195. \f0\b0 \cf4 ([dict[\cf6 @"lottery"\cf4 ] intValue]==\cf7 1\cf4 ) \{\
  15196. \
  15197. \
  15198. _biaotishifoBC=\cf7 1111\cf4 ;\
  15199. \f2\b \cf8 if
  15200. \f0\b0 \cf4 (isOpen==\cf7 1\cf4 && isOpen2==\cf7 1\cf4 ) \{\
  15201. _noticeView2.hidden =
  15202. \f2\b \cf8 YES
  15203. \f0\b0 \cf4 ;\
  15204. _noticeViewScrollView.hidden =
  15205. \f2\b \cf8 YES
  15206. \f0\b0 \cf4 ;\
  15207. \
  15208. \}
  15209. \f2\b \cf8 else
  15210. \f0\b0 \cf4
  15211. \f2\b \cf8 if
  15212. \f0\b0 \cf4 (isOpen==\cf7 1\cf4 && isOpen2==\cf7 0\cf4 ) \{\
  15213. _noticeView2.hidden =
  15214. \f2\b \cf8 YES
  15215. \f0\b0 \cf4 ;\
  15216. _noticeViewScrollView.hidden =
  15217. \f2\b \cf8 NO
  15218. \f0\b0 \cf4 ;\
  15219. _noticeViewScrollView.frame=CGRectMake(\cf7 0\cf4 , JX_SCREEN_TOP, JX_SCREEN_WIDTH, \cf7 37\cf4 );\
  15220. \
  15221. \}
  15222. \f2\b \cf8 else
  15223. \f0\b0 \cf4
  15224. \f2\b \cf8 if
  15225. \f0\b0 \cf4 (isOpen==\cf7 0\cf4 && isOpen2==\cf7 1\cf4 )\{\
  15226. _noticeView2.hidden =
  15227. \f2\b \cf8 NO
  15228. \f0\b0 \cf4 ;\
  15229. \f2\b \cf8 self
  15230. \f0\b0 \cf4 .showTopView.xiaLineView.hidden=
  15231. \f2\b \cf8 YES
  15232. \f0\b0 \cf4 ;\
  15233. _noticeViewScrollView.hidden =
  15234. \f2\b \cf8 YES
  15235. \f0\b0 \cf4 ;\
  15236. \}
  15237. \f2\b \cf8 else
  15238. \f0\b0 \cf4
  15239. \f2\b \cf8 if
  15240. \f0\b0 \cf4 (isOpen==\cf7 0\cf4 && isOpen2==\cf7 0\cf4 ) \{\
  15241. _noticeViewScrollView.hidden =
  15242. \f2\b \cf8 NO
  15243. \f0\b0 \cf4 ;\
  15244. \
  15245. \f2\b \cf8 self
  15246. \f0\b0 \cf4 .showTopView.xiaLineView.hidden=
  15247. \f2\b \cf8 YES
  15248. \f0\b0 \cf4 ;\
  15249. _noticeView2.hidden =
  15250. \f2\b \cf8 NO
  15251. \f0\b0 \cf4 ;\
  15252. _noticeViewScrollView.frame=CGRectMake(\cf7 0\cf4 , \cf7 37\cf4 +JX_SCREEN_TOP, JX_SCREEN_WIDTH, \cf7 37\cf4 );\
  15253. \}\
  15254. \
  15255. \}
  15256. \f2\b \cf8 else
  15257. \f0\b0 \cf4 \{\
  15258. \
  15259. _noticeView2.hidden =
  15260. \f2\b \cf8 YES
  15261. \f0\b0 \cf4 ;\
  15262. \f2\b \cf8 if
  15263. \f0\b0 \cf4 (isOpen2==\cf7 1\cf4 ) \{\
  15264. \
  15265. _noticeViewScrollView.hidden =
  15266. \f2\b \cf8 YES
  15267. \f0\b0 \cf4 ;\
  15268. \}
  15269. \f2\b \cf8 else
  15270. \f0\b0 \cf4 \{\
  15271. \
  15272. _noticeViewScrollView.frame=CGRectMake(\cf7 0\cf4 , JX_SCREEN_TOP, JX_SCREEN_WIDTH, \cf7 37\cf4 );\
  15273. _noticeViewScrollView.hidden =
  15274. \f2\b \cf8 NO
  15275. \f0\b0 \cf4 ;\
  15276. \}\
  15277. \
  15278. \}\
  15279. \
  15280. \f2\b \cf8 self
  15281. \f0\b0 \cf4 .title = [NSString stringWithFormat:\cf6 @"%@(%ld)"\cf4 ,
  15282. \f2\b \cf8 self
  15283. \f0\b0 \cf4 .chatPerson.userNickname, [dict[\cf6 @"userSize"\cf4 ] integerValue]];\
  15284. [
  15285. \f2\b \cf8 self
  15286. \f0\b0 \cf4 setAudioIconFrame];\
  15287. \f2\b \cf8 if
  15288. \f0\b0 \cf4 ([dict objectForKey:\cf6 @"jid"\cf4 ]) \{\
  15289. \
  15290. \f2\b \cf8 if
  15291. \f0\b0 \cf4 (![dict objectForKey:\cf6 @"member"\cf4 ]) \{\
  15292. [JXMyTools showTipView:Localized(\cf6 @"JX_YouOutOfGroup"\cf4 )];\
  15293. \f2\b \cf8 self
  15294. \f0\b0 \cf4 .groupStatus = [NSNumber numberWithInt:\cf7 1\cf4 ];\
  15295. chatPerson.groupStatus = [NSNumber numberWithInt:\cf7 1\cf4 ];\
  15296. [chatPerson updateGroupInvalid];\
  15297. \}
  15298. \f2\b \cf8 else
  15299. \f0\b0 \cf4 \{\
  15300. \
  15301. \f2\b \cf8 if
  15302. \f0\b0 \cf4 ([[dict objectForKey:\cf6 @"s"\cf4 ] integerValue] != \cf7 1\cf4 ) \{\
  15303. [JXMyTools showTipView:Localized(\cf6 @"JX_GroupNotUse"\cf4 )];\
  15304. \f2\b \cf8 self
  15305. \f0\b0 \cf4 .isDisable =
  15306. \f2\b \cf8 YES
  15307. \f0\b0 \cf4 ;\
  15308. \f2\b \cf8 return
  15309. \f0\b0 \cf4 ;\
  15310. \}\
  15311. NSString *groupLevelName = [dict objectForKey:\cf6 @"groupLevelName"\cf4 ];\
  15312. _groupLevelNameArray = [groupLevelName componentsSeparatedByString:\cf6 @","\cf4 ];\
  15313. _isAttritionRecall = [[dict objectForKey:\cf6 @"isAttritionRecall"\cf4 ] boolValue];\
  15314. _isOpenIntegral = [[dict objectForKey:\cf6 @"isOpenIntegral"\cf4 ] boolValue];\
  15315. _disableSay = [[(NSDictionary *)[dict objectForKey:\cf6 @"member"\cf4 ]objectForKey:\cf6 @"talkTime"\cf4 ] longLongValue];\
  15316. \f2\b \cf8 self
  15317. \f0\b0 \cf4 .chatPerson.talkTime = [NSNumber numberWithLongLong:[[dict objectForKey:\cf6 @"talkTime"\cf4 ] longLongValue]];\
  15318. NSString *role = [(NSDictionary *)[dict objectForKey:\cf6 @"member"\cf4 ] objectForKey:\cf6 @"role"\cf4 ];\
  15319. \f2\b \cf8 if
  15320. \f0\b0 \cf4 ([role intValue] == \cf7 1\cf4 || [role intValue] == \cf7 2\cf4 ) \{\
  15321. _isAdmin =
  15322. \f2\b \cf8 YES
  15323. \f0\b0 \cf4 ;\
  15324. \}
  15325. \f2\b \cf8 else
  15326. \f0\b0 \cf4 \{\
  15327. _isAdmin =
  15328. \f2\b \cf8 NO
  15329. \f0\b0 \cf4 ;\
  15330. \}\
  15331. \f2\b \cf8 if
  15332. \f0\b0 \cf4 ([role intValue] == \cf7 1\cf4 || [role intValue] == \cf7 2\cf4 ) \{\
  15333. _isAdmin =
  15334. \f2\b \cf8 YES
  15335. \f0\b0 \cf4 ;\
  15336. \}
  15337. \f2\b \cf8 else
  15338. \f0\b0 \cf4 \{\
  15339. _isAdmin =
  15340. \f2\b \cf8 NO
  15341. \f0\b0 \cf4 ;\
  15342. \}\
  15343. \f2\b \cf8 if
  15344. \f0\b0 \cf4 (([
  15345. \f2\b \cf8 self
  15346. \f0\b0 \cf4 .chatPerson.talkTime longLongValue] > \cf7 0\cf4 && !_isAdmin) || [role intValue] == \cf7 4\cf4 ) \{\
  15347. _talkTimeLabel.hidden =
  15348. \f2\b \cf8 NO
  15349. \f0\b0 \cf4 ;\
  15350. _talkTimeLabel.text = Localized(\cf6 @"JX_TotalSilence"\cf4 );\
  15351. \f2\b \cf8 if
  15352. \f0\b0 \cf4 ([role intValue] == \cf7 4\cf4 ) \{\
  15353. _talkTimeLabel.text = Localized(\cf6 @"JX_ProhibitToSpeak"\cf4 );\
  15354. \}\
  15355. _messageText.userInteractionEnabled =
  15356. \f2\b \cf8 NO
  15357. \f0\b0 \cf4 ;\
  15358. _shareMore.enabled =
  15359. \f2\b \cf8 NO
  15360. \f0\b0 \cf4 ;\
  15361. _recordBtnLeft.enabled =
  15362. \f2\b \cf8 NO
  15363. \f0\b0 \cf4 ;\
  15364. _btnFace.enabled =
  15365. \f2\b \cf8 NO
  15366. \f0\b0 \cf4 ;\
  15367. _messageText.text =
  15368. \f2\b \cf8 nil
  15369. \f0\b0 \cf4 ;\
  15370. \}
  15371. \f2\b \cf8 else
  15372. \f0\b0 \cf4 \{\
  15373. _talkTimeLabel.hidden =
  15374. \f2\b \cf8 YES
  15375. \f0\b0 \cf4 ;\
  15376. _shareMore.enabled =
  15377. \f2\b \cf8 YES
  15378. \f0\b0 \cf4 ;\
  15379. _recordBtnLeft.enabled =
  15380. \f2\b \cf8 YES
  15381. \f0\b0 \cf4 ;\
  15382. _btnFace.enabled =
  15383. \f2\b \cf8 YES
  15384. \f0\b0 \cf4 ;\
  15385. _messageText.userInteractionEnabled =
  15386. \f2\b \cf8 YES
  15387. \f0\b0 \cf4 ;\
  15388. \}\
  15389. \
  15390. \f2\b \cf8 self
  15391. \f0\b0 \cf4 .chatPerson.showRead = [dict objectForKey:\cf6 @"showRead"\cf4 ];\
  15392. \f2\b \cf8 self
  15393. \f0\b0 \cf4 .room.showRead = [
  15394. \f2\b \cf8 self
  15395. \f0\b0 \cf4 .chatPerson.showRead boolValue];\
  15396. \f2\b \cf8 self
  15397. \f0\b0 \cf4 .chatPerson.allowSendCard = [dict objectForKey:\cf6 @"allowSendCard"\cf4 ];\
  15398. \f2\b \cf8 self
  15399. \f0\b0 \cf4 .room.allowSendCard = [
  15400. \f2\b \cf8 self
  15401. \f0\b0 \cf4 .chatPerson.allowSendCard boolValue];\
  15402. \f2\b \cf8 self
  15403. \f0\b0 \cf4 .chatPerson.allowConference = [dict objectForKey:\cf6 @"allowConference"\cf4 ];\
  15404. \f2\b \cf8 self
  15405. \f0\b0 \cf4 .room.allowConference = [
  15406. \f2\b \cf8 self
  15407. \f0\b0 \cf4 .chatPerson.allowConference boolValue];\
  15408. \f2\b \cf8 self
  15409. \f0\b0 \cf4 .chatPerson.allowSpeakCourse = [dict objectForKey:\cf6 @"allowSpeakCourse"\cf4 ];\
  15410. \f2\b \cf8 self
  15411. \f0\b0 \cf4 .room.allowSpeakCourse = [
  15412. \f2\b \cf8 self
  15413. \f0\b0 \cf4 .chatPerson.allowSpeakCourse boolValue];\
  15414. \f2\b \cf8 self
  15415. \f0\b0 \cf4 .chatPerson.allowUploadFile = [dict objectForKey:\cf6 @"allowUploadFile"\cf4 ];\
  15416. \f2\b \cf8 self
  15417. \f0\b0 \cf4 .room.allowUploadFile = [
  15418. \f2\b \cf8 self
  15419. \f0\b0 \cf4 .chatPerson.allowUploadFile boolValue];\
  15420. \f2\b \cf8 self
  15421. \f0\b0 \cf4 .chatPerson.isNeedVerify = [dict objectForKey:\cf6 @"isNeedVerify"\cf4 ];\
  15422. [
  15423. \f2\b \cf8 self
  15424. \f0\b0 \cf4 .chatPerson updateGroupSetting];\
  15425. \f2\b \cf8 self
  15426. \f0\b0 \cf4 .chatPerson.chatRecordTimeOut = [dict objectForKey:\cf6 @"chatRecordTimeOut"\cf4 ];\
  15427. \f2\b \cf8 self
  15428. \f0\b0 \cf4 .room.chatRecordTimeOut =
  15429. \f2\b \cf8 self
  15430. \f0\b0 \cf4 .chatPerson.chatRecordTimeOut;\
  15431. [
  15432. \f2\b \cf8 self
  15433. \f0\b0 \cf4 .chatPerson updateUserChatRecordTimeOut];\
  15434. \f2\b \cf8 self
  15435. \f0\b0 \cf4 .room.curCount = [[dict objectForKey:\cf6 @"userSize"\cf4 ] intValue];\
  15436. \f2\b \cf8 self
  15437. \f0\b0 \cf4 .room.maxCount = [[dict objectForKey:\cf6 @"maxUserSize"\cf4 ] intValue];\
  15438. \
  15439. \f2\b \cf8 if
  15440. \f0\b0 \cf4 (
  15441. \f2\b \cf8 self
  15442. \f0\b0 \cf4 .chatRoom.roomJid.length > \cf7 0\cf4 ) \{\
  15443. NSString *noticeStr = [(NSDictionary *)[dict objectForKey:\cf6 @"notice"\cf4 ] objectForKey:\cf6 @"text"\cf4 ];\
  15444. NSString *noticeTime = [(NSDictionary *)[dict objectForKey:\cf6 @"notice"\cf4 ] objectForKey:\cf6 @"time"\cf4 ];\
  15445. [
  15446. \f2\b \cf8 self
  15447. \f0\b0 \cf4 setupNoticeWithContent:noticeStr time:noticeTime];\
  15448. \f2\b \cf8 if
  15449. \f0\b0 \cf4 (noticeStr)\{\
  15450. \cf2 // [self showLatestBroadcastTitle:@"
  15451. \f1 \'d7\'ee\'d0\'c2\'b9\'ab\'b8\'e6
  15452. \f0 " message:noticeStr];\cf4 \
  15453. \}\
  15454. \}\
  15455. \
  15456. \cf2 //
  15457. \f1 \'b1\'a3\'b4\'e6\'d7\'d4\'bc\'ba
  15458. \f0 \cf4 \
  15459. NSDictionary* p = [dict objectForKey:\cf6 @"member"\cf4 ];\
  15460. memberData* option = [[memberData alloc] init];\
  15461. [option getDataFromDict:p];\
  15462. option.roomId =
  15463. \f2\b \cf8 self
  15464. \f0\b0 \cf4 .roomId;\
  15465. [option insert];\
  15466. \
  15467. \cf2 //
  15468. \f1 \'b1\'a3\'b4\'e6\'c8\'ba\'d6\'f7\'ba\'cd\'b9\'dc\'c0\'ed\'d4\'b1
  15469. \f0 \cf4 \
  15470. NSMutableArray *memb = [NSMutableArray array];\
  15471. NSArray *members = [dict objectForKey:\cf6 @"members"\cf4 ];\
  15472. \f2\b \cf8 for
  15473. \f0\b0 \cf4 (NSDictionary *member
  15474. \f2\b \cf8 in
  15475. \f0\b0 \cf4 members) \{\
  15476. memberData* option = [[memberData alloc] init];\
  15477. [option getDataFromDict:member];\
  15478. option.roomId =
  15479. \f2\b \cf8 self
  15480. \f0\b0 \cf4 .roomId;\
  15481. [option insert];\
  15482. [memb addObject:option];\
  15483. \}\
  15484. \f2\b \cf8 if
  15485. \f0\b0 \cf4 (_room.members.count <= \cf7 0\cf4 ) \{\
  15486. [_room.members addObjectsFromArray:memb];\
  15487. \}\
  15488. \
  15489. \}\
  15490. \
  15491. \cf2 //<<<<<<< .working\cf4 \
  15492. \cf2 // [_table reloadData];\cf4 \
  15493. \cf2 //\cf4 \
  15494. \cf2 //=======\cf4 \
  15495. \f2\b \cf8 if
  15496. \f0\b0 \cf4 (
  15497. \f2\b \cf8 self
  15498. \f0\b0 \cf4 .isSendRedPacket) \{\
  15499. \
  15500. JXSendRedPacketViewController * sendGiftVC = [[JXSendRedPacketViewController alloc] init];\
  15501. sendGiftVC.isRoom =
  15502. \f2\b \cf8 YES
  15503. \f0\b0 \cf4 ;\
  15504. sendGiftVC.delegate =
  15505. \f2\b \cf8 self
  15506. \f0\b0 \cf4 ;\
  15507. sendGiftVC.roomJid =
  15508. \f2\b \cf8 self
  15509. \f0\b0 \cf4 .roomJid;\
  15510. sendGiftVC.size =
  15511. \f2\b \cf8 self
  15512. \f0\b0 \cf4 .room.curCount;\
  15513. \cf2 // [g_window addSubview:sendGiftVC.view];\cf4 \
  15514. [g_navigation pushViewController:sendGiftVC animated:
  15515. \f2\b \cf8 YES
  15516. \f0\b0 \cf4 ];\
  15517. \
  15518. \f2\b \cf8 self
  15519. \f0\b0 \cf4 .isSendRedPacket =
  15520. \f2\b \cf8 NO
  15521. \f0\b0 \cf4 ;\
  15522. \}\
  15523. \}
  15524. \f2\b \cf8 else
  15525. \f0\b0 \cf4 \{\
  15526. [JXMyTools showTipView:Localized(\cf6 @"JX_GroupDissolved"\cf4 )];\
  15527. chatPerson.groupStatus = [NSNumber numberWithInt:\cf7 2\cf4 ];\
  15528. [chatPerson updateGroupInvalid];\
  15529. \
  15530. \}\
  15531. \
  15532. \}\
  15533. \
  15534. \f2\b \cf8 if
  15535. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UserGetByAccount]) \{\
  15536. JXUserInfoVC* vc = [JXUserInfoVC alloc];\
  15537. vc.userId = dict[\cf6 @"userId"\cf4 ];\
  15538. vc.fromAddType = \cf7 1\cf4 ;\
  15539. vc = [vc init];\
  15540. [g_navigation pushViewController:vc animated:
  15541. \f2\b \cf8 YES
  15542. \f0\b0 \cf4 ];\
  15543. \}\
  15544. \cf2 // [_table reloadData];\cf4 \
  15545. \}\
  15546. \
  15547. \
  15548. -(
  15549. \f2\b \cf8 int
  15550. \f0\b0 \cf4 ) \cf11 didServerResultFailed\cf4 :(JXConnection*)aDownload \cf11 dict\cf4 :(NSDictionary*)dict\{\
  15551. [
  15552. \f2\b \cf8 self
  15553. \f0\b0 \cf4 doUploadError:aDownload];\
  15554. [_wait stop];\
  15555. \f2\b \cf8 if
  15556. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomActivity]) \{\
  15557. \cf2 //
  15558. \f1 \'c3\'bb\'c7\'c0\'b5\'bd
  15559. \f0 \cf4 \
  15560. _activityModel.content = dict[\cf6 @"resultMsg"\cf4 ];\
  15561. _activityModel.success =
  15562. \f2\b \cf8 NO
  15563. \f0\b0 \cf4 ;\
  15564. [
  15565. \f2\b \cf8 self
  15566. \f0\b0 \cf4 showAdAlertViewImageString:\cf6 @"ad_box.gif"\cf4 linkUrl:
  15567. \f2\b \cf8 nil
  15568. \f0\b0 \cf4 audio:
  15569. \f2\b \cf8 nil
  15570. \f0\b0 \cf4 duration:\cf7 1\cf4 content:
  15571. \f2\b \cf8 nil
  15572. \f0\b0 \cf4 showCancelButton:
  15573. \f2\b \cf8 NO
  15574. \f0\b0 \cf4 type:(DYAdModelTypeGifttOpenAnimation) success:
  15575. \f2\b \cf8 NO
  15576. \f0\b0 \cf4 ];\
  15577. \}\
  15578. \cf2 //
  15579. \f1 \'d7\'d4\'bc\'ba\'b2\'e9\'bf\'b4\'ba\'ec\'b0\'fc\'bb\'f2\'d5\'df\'ba\'ec\'b0\'fc\'d2\'d1\'c1\'ec\'cd\'ea\'a3\'ac
  15580. \f0 resultCode
  15581. \f1 \'a3\'bd
  15582. \f0 0\cf4 \
  15583. \f2\b \cf8 if
  15584. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_getRedPacket]) \{\
  15585. \
  15586. [
  15587. \f2\b \cf8 self
  15588. \f0\b0 \cf4 changeMessageRedPacketStatus:dict[\cf6 @"data"\cf4 ][\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ]];\
  15589. [
  15590. \f2\b \cf8 self
  15591. \f0\b0 \cf4 changeMessageArrFileSize:dict[\cf6 @"data"\cf4 ][\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ]];\
  15592. \
  15593. JXredPacketDetailVC * redPacketDetailVC = [[JXredPacketDetailVC alloc]init];\
  15594. redPacketDetailVC.dataDict = [[NSDictionary alloc]initWithDictionary:dict];\
  15595. redPacketDetailVC.isGroup =
  15596. \f2\b \cf8 self
  15597. \f0\b0 \cf4 .room.roomId.length > \cf7 0\cf4 ;\
  15598. redPacketDetailVC.code = [[dict objectForKey:\cf6 @"resultCode"\cf4 ] intValue];\
  15599. \cf2 // [g_window addSubview:redPacketDetailVC.view];\cf4 \
  15600. [g_navigation pushViewController:redPacketDetailVC animated:
  15601. \f2\b \cf8 YES
  15602. \f0\b0 \cf4 ];\
  15603. \
  15604. \}\
  15605. \
  15606. \f2\b \cf8 if
  15607. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomGetRoom]) \{\
  15608. \
  15609. [JXMyTools showTipView:Localized(\cf6 @"JX_GroupDissolved"\cf4 )];\
  15610. chatPerson.groupStatus = [NSNumber numberWithInt:\cf7 2\cf4 ];\
  15611. [chatPerson updateGroupInvalid];\
  15612. \}\
  15613. \f2\b \cf8 if
  15614. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_userEmojiAdd]) \{\
  15615. \f2\b \cf8 return
  15616. \f0\b0 \cf4 show_error;\
  15617. \}\
  15618. \f2\b \cf8 if
  15619. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_openRedPacket]) \{\
  15620. \f2\b \cf8 self
  15621. \f0\b0 \cf4 .redPacketDict = dict;\
  15622. \f2\b \cf8 self
  15623. \f0\b0 \cf4 .openImgV.hidden =
  15624. \f2\b \cf8 YES
  15625. \f0\b0 \cf4 ;\
  15626. \f2\b \cf8 self
  15627. \f0\b0 \cf4 .seeLab.hidden =
  15628. \f2\b \cf8 NO
  15629. \f0\b0 \cf4 ;\
  15630. \f2\b \cf8 self
  15631. \f0\b0 \cf4 .tintLab.text = Localized(\cf6 @"JX_SlowHandNoRedPacket"\cf4 );\
  15632. \}\
  15633. \f2\b \cf8 if
  15634. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UploadFile]) \{\
  15635. \f2\b \cf8 if
  15636. \f0\b0 \cf4 (
  15637. \f2\b \cf8 self
  15638. \f0\b0 \cf4 .isGroupMessages) \{\
  15639. [
  15640. \f2\b \cf8 self
  15641. \f0\b0 \cf4 keepOnUplpadGroupSend];\
  15642. \f2\b \cf8 if
  15643. \f0\b0 \cf4 (_sendedNum ==
  15644. \f2\b \cf8 self
  15645. \f0\b0 \cf4 .userIds.count *
  15646. \f2\b \cf8 self
  15647. \f0\b0 \cf4 .groupUploadObjArray.count) \{\
  15648. \f2\b \cf8 if
  15649. \f0\b0 \cf4 (
  15650. \f2\b \cf8 self
  15651. \f0\b0 \cf4 .waitGroupSendView) \{\
  15652. [
  15653. \f2\b \cf8 self
  15654. \f0\b0 \cf4 .waitGroupSendView removeFromSuperview];\
  15655. [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
  15656. \}\
  15657. \}\
  15658. \}\
  15659. \}\
  15660. \
  15661. \f2\b \cf8 return
  15662. \f0\b0 \cf4 hide_error;\
  15663. \}\
  15664. \
  15665. -(
  15666. \f2\b \cf8 int
  15667. \f0\b0 \cf4 ) \cf11 didServerConnectError\cf4 :(JXConnection*)aDownload \cf11 error\cf4 :(NSError *)error\{\cf2 //error
  15668. \f1 \'ce\'aa\'bf\'d5\'ca\'b1\'a3\'ac\'b4\'fa\'b1\'ed\'b3\'ac\'ca\'b1
  15669. \f0 \cf4 \
  15670. [
  15671. \f2\b \cf8 self
  15672. \f0\b0 \cf4 doUploadError:aDownload];\
  15673. [_wait stop];\
  15674. \f2\b \cf8 return
  15675. \f0\b0 \cf4 hide_error;\
  15676. \}\
  15677. \
  15678. -(
  15679. \f2\b \cf8 void
  15680. \f0\b0 \cf4 ) \cf11 didServerConnectStart\cf4 :(JXConnection*)aDownload\{\
  15681. \f2\b \cf8 if
  15682. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UploadFile] || [aDownload.action isEqualToString:act_publicMenuList] || [aDownload.action isEqualToString:act_tigaseMsgs] || [aDownload.action isEqualToString:act_tigaseMucMsgs])\
  15683. \f2\b \cf8 return
  15684. \f0\b0 \cf4 ;\
  15685. \f2\b \cf8 if
  15686. \f0\b0 \cf4 ([aDownload.action isEqualToString:act_tigaseDeleteMsg]) \{\
  15687. \cf2 //
  15688. \f1 \'b3\'b7\'bb\'d8\'bc\'d3\'b5\'c8\'b4\'fd\'b7\'fb\'a3\'a8\'b3\'b7\'bb\'d8\'bd\'d3\'bf\'da\'b5\'f7\'d3\'c3\'ba\'dc\'c2\'fd\'a3\'a9
  15689. \f0 \cf4 \
  15690. \cf2 //[_wait start];\cf4 \
  15691. \}\
  15692. \}\
  15693. \
  15694. \
  15695. - (
  15696. \f2\b \cf8 void
  15697. \f0\b0 \cf4 )\cf11 collectionMsgSend\cf4 :(NSString *)content \cf11 isFile\cf4 :(
  15698. \f2\b \cf8 BOOL
  15699. \f0\b0 \cf4 )isFile\{\
  15700. NSString *userId =
  15701. \f2\b \cf8 self
  15702. \f0\b0 \cf4 .userIds[
  15703. \f2\b \cf8 self
  15704. \f0\b0 \cf4 .groupMessagesIndex];\
  15705. \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
  15706. \
  15707. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  15708. msg.timeSend = [NSDate date];\
  15709. msg.fromUserId = MY_USER_ID;\
  15710. \f2\b \cf8 if
  15711. \f0\b0 \cf4 ([
  15712. \f2\b \cf8 self
  15713. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  15714. msg.toUserId =
  15715. \f2\b \cf8 self
  15716. \f0\b0 \cf4 .roomJid;\
  15717. msg.isGroup =
  15718. \f2\b \cf8 YES
  15719. \f0\b0 \cf4 ;\
  15720. msg.fromUserName = _userNickName;\
  15721. \}\
  15722. \f2\b \cf8 else
  15723. \f0\b0 \cf4 \{\
  15724. \f2\b \cf8 if
  15725. \f0\b0 \cf4 (
  15726. \f2\b \cf8 self
  15727. \f0\b0 \cf4 .isGroupMessages) \{\
  15728. msg.toUserId = userId;\
  15729. \}
  15730. \f2\b \cf8 else
  15731. \f0\b0 \cf4 \{\
  15732. msg.toUserId = chatPerson.userId;\
  15733. \}\
  15734. msg.isGroup =
  15735. \f2\b \cf8 NO
  15736. \f0\b0 \cf4 ;\
  15737. \}\
  15738. msg.content = content;\
  15739. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  15740. msg.isRead = [NSNumber numberWithBool:
  15741. \f2\b \cf8 NO
  15742. \f0\b0 \cf4 ];\
  15743. msg.isReadDel = [NSNumber numberWithInt:
  15744. \f2\b \cf8 self
  15745. \f0\b0 \cf4 .isReadDelete];\
  15746. \
  15747. \f2\b \cf8 switch
  15748. \f0\b0 \cf4 (_collectionData.type) \{\
  15749. \f2\b \cf8 case
  15750. \f0\b0 \cf4 \cf7 2\cf4 :\
  15751. msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\
  15752. \f2\b \cf8 break
  15753. \f0\b0 \cf4 ;\
  15754. \f2\b \cf8 case
  15755. \f0\b0 \cf4 \cf7 3\cf4 :\{\
  15756. msg.type = [NSNumber numberWithInt:kWCMessageTypeVoice];\
  15757. ObjUrlData *obj = _collectionData.audios.firstObject;\
  15758. msg.timeLen = obj.timeLen;\
  15759. \}\
  15760. \f2\b \cf8 break
  15761. \f0\b0 \cf4 ;\
  15762. \f2\b \cf8 case
  15763. \f0\b0 \cf4 \cf7 4\cf4 :\
  15764. msg.type = [NSNumber numberWithInt:kWCMessageTypeVideo];\
  15765. \f2\b \cf8 break
  15766. \f0\b0 \cf4 ;\
  15767. \f2\b \cf8 case
  15768. \f0\b0 \cf4 \cf7 5\cf4 :\{\
  15769. msg.fileName = ((ObjUrlData *)_collectionData.files.firstObject).name;\
  15770. msg.type = [NSNumber numberWithInt:kWCMessageTypeFile];\
  15771. \}\
  15772. \f2\b \cf8 break
  15773. \f0\b0 \cf4 ;\
  15774. \f2\b \cf8 case
  15775. \f0\b0 \cf4 \cf7 11\cf4 :\
  15776. msg.type = [NSNumber numberWithInt:kWCMessageTypeCustomFace];\
  15777. \f2\b \cf8 break
  15778. \f0\b0 \cf4 ;\
  15779. \f2\b \cf8 case
  15780. \f0\b0 \cf4 \cf7 12\cf4 :\
  15781. msg.type = [NSNumber numberWithInt:kWCMessageTypeEmoji];\
  15782. \f2\b \cf8 break
  15783. \f0\b0 \cf4 ;\
  15784. \f2\b \cf8 default
  15785. \f0\b0 \cf4 :\
  15786. \f2\b \cf8 break
  15787. \f0\b0 \cf4 ;\
  15788. \}\
  15789. \f2\b \cf8 if
  15790. \f0\b0 \cf4 (!isFile) \{\
  15791. msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
  15792. \}\
  15793. \
  15794. \f2\b \cf8 if
  15795. \f0\b0 \cf4 (!isFile) \{\
  15796. msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
  15797. \}\
  15798. \
  15799. \cf2 //
  15800. \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
  15801. \f0 \cf4 \
  15802. [msg insert:
  15803. \f2\b \cf8 self
  15804. \f0\b0 \cf4 .roomJid];\
  15805. \
  15806. [g_xmpp sendMessage:msg roomName:
  15807. \f2\b \cf8 self
  15808. \f0\b0 \cf4 .roomJid];\cf2 //
  15809. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  15810. \f0 \cf4 \
  15811. \
  15812. \f2\b \cf8 if
  15813. \f0\b0 \cf4 (
  15814. \f2\b \cf8 self
  15815. \f0\b0 \cf4 .isGroupMessages) \{\
  15816. \f2\b \cf8 self
  15817. \f0\b0 \cf4 .groupMessagesIndex ++;\
  15818. \f2\b \cf8 if
  15819. \f0\b0 \cf4 (msg.isLastGroupSend) \{\
  15820. \f2\b \cf8 return
  15821. \f0\b0 \cf4 ;\
  15822. \}\
  15823. \f2\b \cf8 if
  15824. \f0\b0 \cf4 (
  15825. \f2\b \cf8 self
  15826. \f0\b0 \cf4 .groupMessagesIndex <
  15827. \f2\b \cf8 self
  15828. \f0\b0 \cf4 .userIds.count) \{\
  15829. [
  15830. \f2\b \cf8 self
  15831. \f0\b0 \cf4 collectionMsgSend:content isFile:isFile];\
  15832. \}
  15833. \f2\b \cf8 else
  15834. \f0\b0 \cf4
  15835. \f2\b \cf8 if
  15836. \f0\b0 \cf4 (
  15837. \f2\b \cf8 self
  15838. \f0\b0 \cf4 .userIds)\{\
  15839. \f2\b \cf8 self
  15840. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  15841. [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
  15842. \f2\b \cf8 return
  15843. \f0\b0 \cf4 ;\
  15844. \}\
  15845. \f2\b \cf8 return
  15846. \f0\b0 \cf4 ;\
  15847. \}\
  15848. [
  15849. \f2\b \cf8 self
  15850. \f0\b0 \cf4 showOneMsg:msg];\
  15851. \}\
  15852. \
  15853. -(
  15854. \f2\b \cf8 void
  15855. \f0\b0 \cf4 )\cf11 showAtSelectMemberView\cf4 \{\
  15856. [
  15857. \f2\b \cf8 self
  15858. \f0\b0 \cf4 hideKeyboard:
  15859. \f2\b \cf8 NO
  15860. \f0\b0 \cf4 ];\
  15861. \f2\b \cf8 self
  15862. \f0\b0 \cf4 .isShowAT =
  15863. \f2\b \cf8 NO
  15864. \f0\b0 \cf4 ;\
  15865. \f2\b \cf8 if
  15866. \f0\b0 \cf4 (_room.members.count >\cf7 0\cf4 ) \{\
  15867. JXSelFriendVC * selVC = [[JXSelFriendVC alloc] init];\
  15868. \cf2 // selVC.chatRoom = chatRoom;\cf4 \
  15869. _room.roomJid = _roomJid;\
  15870. selVC.room = _room;\
  15871. selVC.type = JXSelUserTypeGroupAT;\
  15872. selVC.delegate =
  15873. \f2\b \cf8 self
  15874. \f0\b0 \cf4 ;\
  15875. selVC.didSelect =
  15876. \f2\b \cf8 @selector
  15877. \f0\b0 \cf4 (atSelectMemberDelegate:);\
  15878. \
  15879. \cf2 // [g_window addSubview:selVC.view];\cf4 \
  15880. [g_navigation pushViewController:selVC animated:
  15881. \f2\b \cf8 YES
  15882. \f0\b0 \cf4 ];\
  15883. \}
  15884. \f2\b \cf8 else
  15885. \f0\b0 \cf4 \{\
  15886. \cf2 //
  15887. \f1 \'b5\'f7\'bd\'d3\'bf\'da
  15888. \f0 \cf4 \
  15889. [g_App showAlert:Localized(\cf6 @"JX_NoGetMemberList"\cf4 )];\
  15890. \}\
  15891. \}\
  15892. \
  15893. -(
  15894. \f2\b \cf8 void
  15895. \f0\b0 \cf4 )\cf11 removeAllAt\cf4 \{\
  15896. \f2\b \cf8 for
  15897. \f0\b0 \cf4 (
  15898. \f2\b \cf8 int
  15899. \f0\b0 \cf4 i = \cf7 0\cf4 ; i<_atMemberArray.count; i++) \{\
  15900. [
  15901. \f2\b \cf8 self
  15902. \f0\b0 \cf4 removeAtTextString:_atMemberArray[i]];\
  15903. \}\
  15904. [_atMemberArray removeAllObjects];\
  15905. \}\
  15906. \
  15907. -(
  15908. \f2\b \cf8 void
  15909. \f0\b0 \cf4 )\cf11 removeAtTextString\cf4 :(memberData *)member\{\
  15910. NSString * atStr = [NSString stringWithFormat:\cf6 @"@%@"\cf4 ,member.userNickName];\
  15911. NSRange atRange = [[_messageText.textStorage string] rangeOfString:atStr];\
  15912. \f2\b \cf8 if
  15913. \f0\b0 \cf4 (atRange.location != NSNotFound) \{\
  15914. [_messageText.textStorage deleteCharactersInRange:atRange];\
  15915. \}\
  15916. \
  15917. \}\
  15918. \
  15919. -(
  15920. \f2\b \cf8 BOOL
  15921. \f0\b0 \cf4 )\cf11 hasMember\cf4 :(NSString*)theUserId\{\
  15922. \f2\b \cf8 for
  15923. \f0\b0 \cf4 (
  15924. \f2\b \cf8 int
  15925. \f0\b0 \cf4 i=\cf7 0\cf4 ;i<[_atMemberArray count];i++)\{\
  15926. memberData* p = [_atMemberArray objectAtIndex:i];\
  15927. \f2\b \cf8 if
  15928. \f0\b0 \cf4 ([theUserId intValue] == p.userId)\
  15929. \f2\b \cf8 return
  15930. \f0\b0 \cf4
  15931. \f2\b \cf8 YES
  15932. \f0\b0 \cf4 ;\
  15933. \}\
  15934. \f2\b \cf8 return
  15935. \f0\b0 \cf4
  15936. \f2\b \cf8 NO
  15937. \f0\b0 \cf4 ;\
  15938. \}\
  15939. \
  15940. -(
  15941. \f2\b \cf8 void
  15942. \f0\b0 \cf4 )\cf11 atSelectMemberDelegate\cf4 :(memberData *)member\{\
  15943. \
  15944. \
  15945. \f2\b \cf8 if
  15946. \f0\b0 \cf4 (member.idStr) \{\
  15947. [
  15948. \f2\b \cf8 self
  15949. \f0\b0 \cf4 removeAllAt];\
  15950. [_atMemberArray addObject:member];\
  15951. \}
  15952. \f2\b \cf8 else
  15953. \f0\b0 \cf4
  15954. \f2\b \cf8 if
  15955. \f0\b0 \cf4 ([
  15956. \f2\b \cf8 self
  15957. \f0\b0 \cf4 hasMember:[NSString stringWithFormat:\cf6 @"%ld"\cf4 ,member.userId]])\{\
  15958. \f2\b \cf8 if
  15959. \f0\b0 \cf4 (_messageText.selectedRange.location >=\cf7 1\cf4 && [[[_messageText.textStorage string] substringWithRange:NSMakeRange(_messageText.selectedRange.location-\cf7 1\cf4 , \cf7 1\cf4 )] isEqualToString:\cf6 @"@"\cf4 ]) \{\
  15960. [_messageText.textStorage deleteCharactersInRange:NSMakeRange(_messageText.selectedRange.location-\cf7 1\cf4 , \cf7 1\cf4 )];\
  15961. \}\
  15962. \f2\b \cf8 return
  15963. \f0\b0 \cf4 ;\
  15964. \}
  15965. \f2\b \cf8 else
  15966. \f0\b0 \cf4 \{\
  15967. \f2\b \cf8 for
  15968. \f0\b0 \cf4 (
  15969. \f2\b \cf8 int
  15970. \f0\b0 \cf4 i=\cf7 0\cf4 ; i<_atMemberArray.count; i++) \{\
  15971. memberData * member = _atMemberArray[i];\
  15972. \f2\b \cf8 if
  15973. \f0\b0 \cf4 (member.idStr)\{\
  15974. [
  15975. \f2\b \cf8 self
  15976. \f0\b0 \cf4 removeAllAt];\
  15977. \f2\b \cf8 break
  15978. \f0\b0 \cf4 ;\
  15979. \}\
  15980. \}\
  15981. [_atMemberArray addObject:member];\
  15982. \}\
  15983. \
  15984. \cf2 // [_messageText.textStorage replaceCharactersInRange:NSMakeRange(_messageText.selectedRange.location-1, 1) withString:@""];\cf4 \
  15985. \f2\b \cf8 if
  15986. \f0\b0 \cf4 (_messageText.selectedRange.location >=\cf7 1\cf4 && [[[_messageText.textStorage string] substringWithRange:NSMakeRange(_messageText.selectedRange.location-\cf7 1\cf4 , \cf7 1\cf4 )] isEqualToString:\cf6 @"@"\cf4 ]) \{\
  15987. [_messageText.textStorage deleteCharactersInRange:NSMakeRange(_messageText.selectedRange.location-\cf7 1\cf4 , \cf7 1\cf4 )];\
  15988. \}\
  15989. \
  15990. \
  15991. NSString * atStr = [NSString stringWithFormat:\cf6 @"@%@"\cf4 ,member.userNickName];\
  15992. NSMutableAttributedString* tncString = [[NSMutableAttributedString alloc] initWithString:atStr];\
  15993. [tncString addAttribute:NSBackgroundColorAttributeName value:[UIColor yellowColor] range:NSMakeRange(\cf7 0\cf4 ,atStr.length)];\
  15994. [tncString addAttribute:NSFontAttributeName value:SYSFONT(\cf7 18\cf4 ) range:NSMakeRange(\cf7 0\cf4 ,atStr.length)];\
  15995. \cf2 // if (_messageText.selectedRange.length > 0) \{\cf4 \
  15996. \cf2 // [_messageText.textStorage deleteCharactersInRange:_messageText.selectedRange];\cf4 \
  15997. \cf2 // \}\cf4 \
  15998. [_messageText.textStorage insertAttributedString:tncString atIndex:_messageText.selectedRange.location];\
  15999. tncString =
  16000. \f2\b \cf8 nil
  16001. \f0\b0 \cf4 ;\
  16002. NSRange newRange = NSMakeRange(_messageText.selectedRange.location + atStr.length, \cf7 0\cf4 );\
  16003. _messageText.selectedRange = newRange;\
  16004. \
  16005. \
  16006. NSMutableAttributedString* spaceString = [[NSMutableAttributedString alloc] initWithString:\cf6 @" "\cf4 ];\
  16007. [_messageText.textStorage insertAttributedString:spaceString atIndex:_messageText.selectedRange.location];\
  16008. newRange = NSMakeRange(_messageText.selectedRange.location + spaceString.length, \cf7 0\cf4 );\
  16009. _messageText.selectedRange = newRange;\
  16010. \cf2 // attachment.emojiSize = CGSizeMake(_messageText.font.lineHeight, _messageText.font.lineHeight);\cf4 \
  16011. \
  16012. \cf2 //\cf4 \
  16013. \cf2 //\cf4 \
  16014. \cf2 //\cf4 \
  16015. \cf2 // [_messageText.textStorage insertAttributedString:[NSAttributedString attributedStringWithAttachment:attachment] atIndex:_messageText.selectedRange.location];\cf4 \
  16016. \
  16017. \cf2 // _messageText.selectedRange = newRange;\cf4 \
  16018. _messageText.font = SYSFONT(\cf7 18\cf4 );\
  16019. \
  16020. \cf2 // [_messageText scrollRangeToVisible:NSMakeRange(_messageText.text.length, 1)];\cf4 \
  16021. \
  16022. \cf2 // [_messageText becomeFirstResponder];\cf4 \
  16023. [_messageText performSelector:
  16024. \f2\b \cf8 @selector
  16025. \f0\b0 \cf4 (becomeFirstResponder) withObject:
  16026. \f2\b \cf8 nil
  16027. \f0\b0 \cf4 afterDelay:\cf7 0.7\cf4 ];\
  16028. \}\
  16029. \
  16030. -(
  16031. \f2\b \cf8 void
  16032. \f0\b0 \cf4 )\cf11 onSelMedia\cf4 :(JXMediaObject*)p\{\
  16033. \f2\b \cf8 if
  16034. \f0\b0 \cf4 (
  16035. \f2\b \cf8 self
  16036. \f0\b0 \cf4 .isGroupMessages) \{\
  16037. \f2\b \cf8 for
  16038. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
  16039. \f2\b \cf8 self
  16040. \f0\b0 \cf4 .userIds.count; i ++) \{\
  16041. NSString *userId =
  16042. \f2\b \cf8 self
  16043. \f0\b0 \cf4 .userIds[i];\
  16044. \
  16045. [
  16046. \f2\b \cf8 self
  16047. \f0\b0 \cf4 sendMedia:p userId:userId];\
  16048. \cf2 // [g_server uploadFile:p.fileName validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
  16049. \}\
  16050. \}
  16051. \f2\b \cf8 else
  16052. \f0\b0 \cf4 \{\
  16053. [
  16054. \f2\b \cf8 self
  16055. \f0\b0 \cf4 sendMedia:p userId:
  16056. \f2\b \cf8 nil
  16057. \f0\b0 \cf4 ];\
  16058. \cf2 // [g_server uploadFile:p.fileName validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
  16059. \}\
  16060. \}\
  16061. \
  16062. -(
  16063. \f2\b \cf8 void
  16064. \f0\b0 \cf4 )\cf11 pickVideo\cf4 \{\
  16065. \
  16066. [
  16067. \f2\b \cf8 self
  16068. \f0\b0 \cf4 hideKeyboard:
  16069. \f2\b \cf8 YES
  16070. \f0\b0 \cf4 ];\
  16071. \f2\b \cf8 if
  16072. \f0\b0 \cf4 (![
  16073. \f2\b \cf8 self
  16074. \f0\b0 \cf4 checkCameraLimits]) \{\
  16075. \f2\b \cf8 return
  16076. \f0\b0 \cf4 ;\
  16077. \}\
  16078. \f2\b \cf8 if
  16079. \f0\b0 \cf4 ([
  16080. \f2\b \cf8 self
  16081. \f0\b0 \cf4 showDisableSay])\
  16082. \f2\b \cf8 return
  16083. \f0\b0 \cf4 ;\
  16084. \f2\b \cf8 if
  16085. \f0\b0 \cf4 ([
  16086. \f2\b \cf8 self
  16087. \f0\b0 \cf4 sendMsgCheck])\{\
  16088. \f2\b \cf8 return
  16089. \f0\b0 \cf4 ;\
  16090. \}\
  16091. \
  16092. JXCameraVC *vc = [[JXCameraVC alloc] init];\
  16093. vc.cameraDelegate =
  16094. \f2\b \cf8 self
  16095. \f0\b0 \cf4 ;\
  16096. \cf2 // vc.maxTime = 30;\cf4 \
  16097. [
  16098. \f2\b \cf8 self
  16099. \f0\b0 \cf4 presentViewController:vc animated:
  16100. \f2\b \cf8 YES
  16101. \f0\b0 \cf4 completion:
  16102. \f2\b \cf8 nil
  16103. \f0\b0 \cf4 ];\
  16104. \
  16105. \cf2 // if ([[JXMediaObject sharedInstance] fetch].count <= 0) \{\cf4 \
  16106. \cf2 //\cf4 \
  16107. \cf2 // myMediaVC* vc = [[myMediaVC alloc]init];\cf4 \
  16108. \cf2 // vc.delegate = self;\cf4 \
  16109. \cf2 // vc.didSelect = @selector(onSelMedia:);\cf4 \
  16110. \cf12 ///
  16111. \f3 \cf2 / [g_window addSubview:vc.view];
  16112. \f0 \cf4 \
  16113. \cf2 // [g_navigation pushViewController:vc animated:YES];\cf4 \
  16114. \cf2 // [vc onAddVideo];\cf4 \
  16115. \cf2 // \}else \{\cf4 \
  16116. \cf2 // myMediaVC* vc = [[myMediaVC alloc]init];\cf4 \
  16117. \cf2 // vc.delegate = self;\cf4 \
  16118. \cf2 // vc.didSelect = @selector(onSelMedia:);\cf4 \
  16119. \cf12 ///
  16120. \f3 \cf2 / [g_window addSubview:vc.view];
  16121. \f0 \cf4 \
  16122. \cf2 // [g_navigation pushViewController:vc animated:YES];\cf4 \
  16123. \cf2 // \}\cf4 \
  16124. \}\
  16125. \
  16126. \cf5 #pragma mark
  16127. \f2\b \cf16 -
  16128. \f4 \'d2\'95\'c6\'c1\'e4\'9b\'d1\'75\'bb\'d8\'d5\'7b
  16129. \f0\b0 \cf4 \
  16130. - (
  16131. \f2\b \cf8 void
  16132. \f0\b0 \cf4 )\cf11 cameraVC\cf4 :(JXCameraVC *)vc \cf11 didFinishWithVideoPath\cf4 :(NSString *)filePath \cf11 timeLen\cf4 :(NSInteger)timeLen \{\
  16133. \f2\b \cf8 if
  16134. \f0\b0 \cf4 ( ![[NSFileManager defaultManager] fileExistsAtPath:filePath] )\
  16135. \f2\b \cf8 return
  16136. \f0\b0 \cf4 ;\
  16137. NSString* file = filePath;\
  16138. \
  16139. JXMediaObject* p = [[JXMediaObject alloc]init];\
  16140. p.userId = g_server.myself.userId;\
  16141. p.fileName = file;\
  16142. p.isVideo = [NSNumber numberWithBool:
  16143. \f2\b \cf8 YES
  16144. \f0\b0 \cf4 ];\
  16145. p.timeLen = [NSNumber numberWithInteger:timeLen];\
  16146. \f2\b \cf8 if
  16147. \f0\b0 \cf4 (
  16148. \f2\b \cf8 self
  16149. \f0\b0 \cf4 .isGroupMessages) \{\
  16150. \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
  16151. \cf2 // NSString *userId = self.userIds[i];\cf4 \
  16152. \cf2 //\cf4 \
  16153. \cf2 // [self sendMedia:p userId:userId];\cf4 \
  16154. \cf12 ///
  16155. \f3 \cf2 / [g_server uploadFile:p.fileName validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];
  16156. \f0 \cf4 \
  16157. \cf2 // [self saveVideo:file];\cf4 \
  16158. \cf2 // \}\cf4 \
  16159. [
  16160. \f2\b \cf8 self
  16161. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_video];\
  16162. \f2\b \cf8 self
  16163. \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:p];\
  16164. _onceSendNum = \cf7 1\cf4 ;\
  16165. _isOriginal =
  16166. \f2\b \cf8 YES
  16167. \f0\b0 \cf4 ;\
  16168. [
  16169. \f2\b \cf8 self
  16170. \f0\b0 \cf4 sendMedias:
  16171. \f2\b \cf8 self
  16172. \f0\b0 \cf4 .groupUploadObjArray isSave:
  16173. \f2\b \cf8 YES
  16174. \f0\b0 \cf4 ];\
  16175. \}
  16176. \f2\b \cf8 else
  16177. \f0\b0 \cf4 \{\
  16178. [
  16179. \f2\b \cf8 self
  16180. \f0\b0 \cf4 sendMedia:p userId:
  16181. \f2\b \cf8 nil
  16182. \f0\b0 \cf4 ];\
  16183. \cf2 // [g_server uploadFile:p.fileName validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
  16184. [
  16185. \f2\b \cf8 self
  16186. \f0\b0 \cf4 saveVideo:file];\
  16187. \}\
  16188. \}\
  16189. - (
  16190. \f2\b \cf8 void
  16191. \f0\b0 \cf4 )\cf11 saveVideo\cf4 :(NSString *)videoPath\{\
  16192. \
  16193. \f2\b \cf8 if
  16194. \f0\b0 \cf4 (videoPath) \{\
  16195. NSURL *url = [NSURL URLWithString:videoPath];\
  16196. \f2\b \cf8 BOOL
  16197. \f0\b0 \cf4 compatible = UIVideoAtPathIsCompatibleWithSavedPhotosAlbum([url path]);\
  16198. \f2\b \cf8 if
  16199. \f0\b0 \cf4 (compatible) \{\
  16200. \cf2 //
  16201. \f1 \'b1\'a3\'b4\'e6\'cf\'e0\'b2\'e1\'ba\'cb\'d0\'c4\'b4\'fa\'c2\'eb
  16202. \f0 \cf4 \
  16203. UISaveVideoAtPathToSavedPhotosAlbum([url path],
  16204. \f2\b \cf8 self
  16205. \f0\b0 \cf4 ,
  16206. \f2\b \cf8 @selector
  16207. \f0\b0 \cf4 (savedPhotoImage:didFinishSavingWithError:contextInfo:),
  16208. \f2\b \cf8 nil
  16209. \f0\b0 \cf4 );\
  16210. \}\
  16211. \}\
  16212. \}\
  16213. \
  16214. \
  16215. \cf2 //
  16216. \f1 \'b1\'a3\'b4\'e6\'ca\'d3\'c6\'b5\'cd\'ea\'b3\'c9\'d6\'ae\'ba\'f3\'b5\'c4\'bb\'d8\'b5\'f7
  16217. \f0 \cf4 \
  16218. - (
  16219. \f2\b \cf8 void
  16220. \f0\b0 \cf4 ) \cf11 savedPhotoImage\cf4 :(UIImage*)image \cf11 didFinishSavingWithError\cf4 : (NSError *)error \cf11 contextInfo\cf4 : (
  16221. \f2\b \cf8 void
  16222. \f0\b0 \cf4 *)contextInfo \{\
  16223. \f2\b \cf8 if
  16224. \f0\b0 \cf4 (error) \{\
  16225. NSLog(\cf6 @"
  16226. \f1 \'b1\'a3\'b4\'e6\'ca\'d3\'c6\'b5\'ca\'a7\'b0\'dc
  16227. \f0 %@"\cf4 , error.localizedDescription);\
  16228. \}\
  16229. \f2\b \cf8 else
  16230. \f0\b0 \cf4 \{\
  16231. NSLog(\cf6 @"
  16232. \f1 \'b1\'a3\'b4\'e6\'ca\'d3\'c6\'b5\'b3\'c9\'b9\'a6
  16233. \f0 "\cf4 );\
  16234. \}\
  16235. \}\
  16236. \
  16237. -(
  16238. \f2\b \cf8 void
  16239. \f0\b0 \cf4 )\cf11 onChatSip\cf4 \{\
  16240. [
  16241. \f2\b \cf8 self
  16242. \f0\b0 \cf4 hideKeyboard:
  16243. \f2\b \cf8 YES
  16244. \f0\b0 \cf4 ];\
  16245. \cf2 // if (![self checkCameraLimits]) \{\cf4 \
  16246. \cf2 // return;\cf4 \
  16247. \cf2 // \}\cf4 \
  16248. \f2\b \cf8 if
  16249. \f0\b0 \cf4 ([
  16250. \f2\b \cf8 self
  16251. \f0\b0 \cf4 showDisableSay])\
  16252. \f2\b \cf8 return
  16253. \f0\b0 \cf4 ;\
  16254. \f2\b \cf8 if
  16255. \f0\b0 \cf4 ([
  16256. \f2\b \cf8 self
  16257. \f0\b0 \cf4 sendMsgCheck])\{\
  16258. \f2\b \cf8 return
  16259. \f0\b0 \cf4 ;\
  16260. \}\
  16261. \
  16262. NSString *str1;\
  16263. NSString *str2;\
  16264. NSString *str3;\
  16265. JXActionSheetVC *actionVC;\
  16266. \f2\b \cf8 if
  16267. \f0\b0 \cf4 (
  16268. \f2\b \cf8 self
  16269. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
  16270. memberData *data = [
  16271. \f2\b \cf8 self
  16272. \f0\b0 \cf4 .room getMember:g_myself.userId];\
  16273. \
  16274. \f2\b \cf8 if
  16275. \f0\b0 \cf4 (!_isAdmin && ![
  16276. \f2\b \cf8 self
  16277. \f0\b0 \cf4 .chatPerson.allowConference boolValue]) \{\
  16278. [g_App showAlert:Localized(\cf6 @"JX_DisabledAudioAndVideo"\cf4 )];\
  16279. \f2\b \cf8 return
  16280. \f0\b0 \cf4 ;\
  16281. \}\
  16282. str1 = Localized(\cf6 @"JXSettingVC_VideoMeeting"\cf4 );\
  16283. str2 = Localized(\cf6 @"JX_Meeting"\cf4 );\
  16284. str3 = Localized(\cf6 @"JX_WalkieTalkie"\cf4 );\
  16285. actionVC = [[JXActionSheetVC alloc] initWithImages:\cf7 @[\cf6 @"meeting_talk"\cf4 ,\cf6 @"meeting_tel"\cf4 ,\cf6 @"meeting_video"\cf7 ]\cf4 names:\cf7 @[\cf4 str3,str2,str1\cf7 ]\cf4 ];\
  16286. \
  16287. \}
  16288. \f2\b \cf8 else
  16289. \f0\b0 \cf4 \{\
  16290. str1 = Localized(\cf6 @"JX_VideoChat"\cf4 );\
  16291. str2 = Localized(\cf6 @"JX_VoiceChat"\cf4 );\
  16292. actionVC = [[JXActionSheetVC alloc] initWithImages:\cf7 @[\cf6 @"meeting_tel"\cf4 ,\cf6 @"meeting_video"\cf7 ]\cf4 names:\cf7 @[\cf4 str2,str1\cf7 ]\cf4 ];\
  16293. \}\
  16294. \
  16295. actionVC.delegate =
  16296. \f2\b \cf8 self
  16297. \f0\b0 \cf4 ;\
  16298. [
  16299. \f2\b \cf8 self
  16300. \f0\b0 \cf4 presentViewController:actionVC animated:
  16301. \f2\b \cf8 NO
  16302. \f0\b0 \cf4 completion:
  16303. \f2\b \cf8 nil
  16304. \f0\b0 \cf4 ];\
  16305. \}\
  16306. \
  16307. - (
  16308. \f2\b \cf8 void
  16309. \f0\b0 \cf4 )\cf11 actionSheet\cf4 :(JXActionSheetVC *)actionSheet \cf11 didButtonWithIndex\cf4 :(NSInteger)index \{\
  16310. \f2\b \cf8 if
  16311. \f0\b0 \cf4 (actionSheet.tag == \cf7 2457\cf4 ) \{\
  16312. \f2\b \cf8 if
  16313. \f0\b0 \cf4 (index == \cf7 0\cf4 ) \{\
  16314. \
  16315. \f2\b \cf8 BOOL
  16316. \f0\b0 \cf4 flag =
  16317. \f2\b \cf8 NO
  16318. \f0\b0 \cf4 ;\
  16319. \f2\b \cf8 for
  16320. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
  16321. \f2\b \cf8 self
  16322. \f0\b0 \cf4 .selectMoreArr.count; i ++) \{\
  16323. JXMessageObject *msg = [
  16324. \f2\b \cf8 self
  16325. \f0\b0 \cf4 .selectMoreArr[i] copy];\
  16326. \f2\b \cf8 if
  16327. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeRedPacket || [msg.type intValue] == kWCMessageTypeTransfer) \{\
  16328. flag =
  16329. \f2\b \cf8 YES
  16330. \f0\b0 \cf4 ;\
  16331. \f2\b \cf8 break
  16332. \f0\b0 \cf4 ;\
  16333. \}\
  16334. \}\
  16335. \
  16336. \f2\b \cf8 if
  16337. \f0\b0 \cf4 (flag) \{\
  16338. \
  16339. UIAlertView *alert = [[UIAlertView alloc] initWithTitle:
  16340. \f2\b \cf8 nil
  16341. \f0\b0 \cf4 message:\cf6 @"
  16342. \f1 \'b6\'e0\'d1\'a1\'cf\'fb\'cf\'a2\'d6\'d0\'a3\'ac\'ba\'ec\'b0\'fc\'ba\'cd\'d7\'aa\'d5\'cb\'cf\'fb\'cf\'a2\'b2\'bb\'c4\'dc\'b1\'bb\'d7\'aa\'b7\'a2
  16343. \f0 "\cf4 delegate:
  16344. \f2\b \cf8 self
  16345. \f0\b0 \cf4 cancelButtonTitle:\cf6 @"
  16346. \f1 \'c8\'a1\'cf\'fb
  16347. \f0 "\cf4 otherButtonTitles:\cf6 @"
  16348. \f1 \'d7\'aa\'b7\'a2
  16349. \f0 "\cf4 ,
  16350. \f2\b \cf8 nil
  16351. \f0\b0 \cf4 ];\
  16352. alert.tag = \cf7 3457\cf4 ;\
  16353. [alert show];\
  16354. \}
  16355. \f2\b \cf8 else
  16356. \f0\b0 \cf4 \{\
  16357. \
  16358. JXRelayVC *vc = [[JXRelayVC alloc] init];\
  16359. vc.relayMsgArray = [NSMutableArray arrayWithArray:
  16360. \f2\b \cf8 self
  16361. \f0\b0 \cf4 .selectMoreArr];\
  16362. [g_navigation pushViewController:vc animated:
  16363. \f2\b \cf8 YES
  16364. \f0\b0 \cf4 ];\
  16365. \}\
  16366. \}
  16367. \f2\b \cf8 else
  16368. \f0\b0 \cf4
  16369. \f2\b \cf8 if
  16370. \f0\b0 \cf4 (index == \cf7 1\cf4 ) \{\
  16371. JXRelayVC *vc = [[JXRelayVC alloc] init];\
  16372. \
  16373. NSMutableArray *contentArr = [NSMutableArray array];\
  16374. \f2\b \cf8 for
  16375. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
  16376. \f2\b \cf8 self
  16377. \f0\b0 \cf4 .selectMoreArr.count; i ++) \{\
  16378. JXMessageObject *msg = [
  16379. \f2\b \cf8 self
  16380. \f0\b0 \cf4 .selectMoreArr[i] copy];\
  16381. \
  16382. \f2\b \cf8 if
  16383. \f0\b0 \cf4 ([msg.type intValue] != kWCMessageTypeText && [msg.type intValue] != kWCMessageTypeLocation && [msg.type intValue] != kWCMessageTypeGif && [msg.type intValue] != kWCMessageTypeVideo && [msg.type intValue] != kWCMessageTypeImage && [msg.type intValue] != kWCMessageTypeCustomFace && [msg.type intValue] != kWCMessageTypeEmoji) \{\
  16384. msg.content = [msg getLastContent];\
  16385. \f2\b \cf8 switch
  16386. \f0\b0 \cf4 ([msg.type intValue]) \{\
  16387. \f2\b \cf8 case
  16388. \f0\b0 \cf4 kWCMessageTypeRedPacket: \{\
  16389. msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JXredPacket"\cf4 )];\
  16390. \}\
  16391. \f2\b \cf8 break
  16392. \f0\b0 \cf4 ;\
  16393. \f2\b \cf8 case
  16394. \f0\b0 \cf4 kWCMessageTypeAudioMeetingInvite:\
  16395. \f2\b \cf8 case
  16396. \f0\b0 \cf4 kWCMessageTypeVideoMeetingInvite:\
  16397. \f2\b \cf8 case
  16398. \f0\b0 \cf4 kWCMessageTypeAudioChatCancel:\
  16399. \f2\b \cf8 case
  16400. \f0\b0 \cf4 kWCMessageTypeAudioChatEnd:\
  16401. \f2\b \cf8 case
  16402. \f0\b0 \cf4 kWCMessageTypeVideoChatCancel:\
  16403. \f2\b \cf8 case
  16404. \f0\b0 \cf4 kWCMessageTypeVideoChatEnd:\
  16405. \f2\b \cf8 case
  16406. \f0\b0 \cf4 kWCMessageTypeAVBusy:\{\
  16407. msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JX_AudioAndVideoCalls"\cf4 )];;\
  16408. \}\
  16409. \f2\b \cf8 break
  16410. \f0\b0 \cf4 ;\
  16411. \f2\b \cf8 case
  16412. \f0\b0 \cf4 kWCMessageTypeSystemImage1:\
  16413. \f2\b \cf8 case
  16414. \f0\b0 \cf4 kWCMessageTypeSystemImage2: \{\
  16415. msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JXGraphic"\cf4 )];\
  16416. \}\
  16417. \f2\b \cf8 break
  16418. \f0\b0 \cf4 ;\
  16419. \f2\b \cf8 case
  16420. \f0\b0 \cf4 kWCMessageTypeMergeRelay:\
  16421. msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JX_ChatRecord"\cf4 )];\
  16422. \f2\b \cf8 break
  16423. \f0\b0 \cf4 ;\
  16424. \f2\b \cf8 default
  16425. \f0\b0 \cf4 :\
  16426. \f2\b \cf8 break
  16427. \f0\b0 \cf4 ;\
  16428. \}\
  16429. msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
  16430. msg.fileName = \cf6 @""\cf4 ;\
  16431. \}\
  16432. \
  16433. SBJsonWriter * OderJsonwriter = [SBJsonWriter
  16434. \f2\b \cf8 new
  16435. \f0\b0 \cf4 ];\
  16436. NSString * jsonString = [OderJsonwriter stringWithObject:[msg toDictionary]];\
  16437. [contentArr addObject:jsonString];\
  16438. \}\
  16439. \
  16440. JXMessageObject *relayMsg = [[JXMessageObject alloc] init];\
  16441. relayMsg.type = [NSNumber numberWithInt:kWCMessageTypeMergeRelay];\
  16442. \f2\b \cf8 if
  16443. \f0\b0 \cf4 (
  16444. \f2\b \cf8 self
  16445. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
  16446. relayMsg.objectId = Localized(\cf6 @"JX_GroupChatLogs"\cf4 );\
  16447. \}
  16448. \f2\b \cf8 else
  16449. \f0\b0 \cf4 \{\
  16450. relayMsg.objectId = [NSString stringWithFormat:Localized(\cf6 @"JX_GroupChat%@And%@"\cf4 ),
  16451. \f2\b \cf8 self
  16452. \f0\b0 \cf4 .chatPerson.userNickname, g_myself.userNickname];\
  16453. \}\
  16454. NSData *jsonData = [NSJSONSerialization dataWithJSONObject:contentArr options:NSJSONWritingPrettyPrinted error:
  16455. \f2\b \cf8 nil
  16456. \f0\b0 \cf4 ];\
  16457. NSString *jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];\
  16458. relayMsg.content = jsonStr;\
  16459. \
  16460. \
  16461. vc.relayMsgArray = [NSMutableArray arrayWithObject:relayMsg];\
  16462. [g_navigation pushViewController:vc animated:
  16463. \f2\b \cf8 YES
  16464. \f0\b0 \cf4 ];\
  16465. \}\
  16466. \}
  16467. \f2\b \cf8 else
  16468. \f0\b0 \cf4
  16469. \f2\b \cf8 if
  16470. \f0\b0 \cf4 (actionSheet.tag == \cf7 2458\cf4 ) \{\
  16471. \f2\b \cf8 if
  16472. \f0\b0 \cf4 (index == \cf7 0\cf4 ) \{\
  16473. UIAlertView *alert = [[UIAlertView alloc] initWithTitle:
  16474. \f2\b \cf8 nil
  16475. \f0\b0 \cf4 message:Localized(\cf6 @"JX_SaveOnlyPictureMessages"\cf4 ) delegate:
  16476. \f2\b \cf8 self
  16477. \f0\b0 \cf4 cancelButtonTitle:Localized(\cf6 @"JX_Cencal"\cf4 ) otherButtonTitles:Localized(\cf6 @"JX_Save"\cf4 ),
  16478. \f2\b \cf8 nil
  16479. \f0\b0 \cf4 ];\
  16480. alert.tag = \cf7 2458\cf4 ;\
  16481. [alert show];\
  16482. \}\
  16483. \}
  16484. \f2\b \cf8 else
  16485. \f0\b0 \cf4
  16486. \f2\b \cf8 if
  16487. \f0\b0 \cf4 (actionSheet.tag == \cf7 1111\cf4 ) \{\
  16488. \f2\b \cf8 if
  16489. \f0\b0 \cf4 (index == \cf7 0\cf4 )\
  16490. [g_notify postNotificationName:kCellDeleteMsgNotifaction object:[NSNumber numberWithInt:
  16491. \f2\b \cf8 self
  16492. \f0\b0 \cf4 .indexNum]];\
  16493. \f2\b \cf8 if
  16494. \f0\b0 \cf4 (index == \cf7 1\cf4 )\
  16495. [g_notify postNotificationName:kCellResendMsgNotifaction object:[NSNumber numberWithInt:
  16496. \f2\b \cf8 self
  16497. \f0\b0 \cf4 .indexNum]];\
  16498. \}
  16499. \f2\b \cf8 else
  16500. \f0\b0 \cf4 \{\
  16501. \
  16502. \f2\b \cf8 if
  16503. \f0\b0 \cf4 (
  16504. \f2\b \cf8 self
  16505. \f0\b0 \cf4 .roomJid || [g_config.isOpenCluster integerValue] != \cf7 1\cf4 ) \{\
  16506. \
  16507. \f2\b \cf8 if
  16508. \f0\b0 \cf4 (
  16509. \f2\b \cf8 self
  16510. \f0\b0 \cf4 .roomJid) \{\
  16511. \
  16512. \f2\b \cf8 if
  16513. \f0\b0 \cf4 (index == \cf7 0\cf4 ) \{\
  16514. [
  16515. \f2\b \cf8 self
  16516. \f0\b0 \cf4 onChatTalk:
  16517. \f2\b \cf8 nil
  16518. \f0\b0 \cf4 ];\
  16519. \}
  16520. \f2\b \cf8 else
  16521. \f0\b0 \cf4
  16522. \f2\b \cf8 if
  16523. \f0\b0 \cf4 (index == \cf7 1\cf4 )\{\
  16524. [
  16525. \f2\b \cf8 self
  16526. \f0\b0 \cf4 onChatAudio:
  16527. \f2\b \cf8 nil
  16528. \f0\b0 \cf4 ];\
  16529. \}
  16530. \f2\b \cf8 else
  16531. \f0\b0 \cf4
  16532. \f2\b \cf8 if
  16533. \f0\b0 \cf4 (index == \cf7 2\cf4 )\{\
  16534. [
  16535. \f2\b \cf8 self
  16536. \f0\b0 \cf4 onChatVideo:
  16537. \f2\b \cf8 nil
  16538. \f0\b0 \cf4 ];\
  16539. \}\
  16540. \}
  16541. \f2\b \cf8 else
  16542. \f0\b0 \cf4 \{\
  16543. \
  16544. \f2\b \cf8 if
  16545. \f0\b0 \cf4 (index == \cf7 0\cf4 ) \{\
  16546. [
  16547. \f2\b \cf8 self
  16548. \f0\b0 \cf4 onChatAudio:
  16549. \f2\b \cf8 nil
  16550. \f0\b0 \cf4 ];\
  16551. \}
  16552. \f2\b \cf8 else
  16553. \f0\b0 \cf4
  16554. \f2\b \cf8 if
  16555. \f0\b0 \cf4 (index == \cf7 1\cf4 )\{\
  16556. [
  16557. \f2\b \cf8 self
  16558. \f0\b0 \cf4 onChatVideo:
  16559. \f2\b \cf8 nil
  16560. \f0\b0 \cf4 ];\
  16561. \}\
  16562. \}\
  16563. \}
  16564. \f2\b \cf8 else
  16565. \f0\b0 \cf4 \{\
  16566. \f2\b \cf8 if
  16567. \f0\b0 \cf4 (index == \cf7 0\cf4 ) \{\
  16568. \f2\b \cf8 self
  16569. \f0\b0 \cf4 .isAudioMeeting =
  16570. \f2\b \cf8 YES
  16571. \f0\b0 \cf4 ;\
  16572. \}
  16573. \f2\b \cf8 else
  16574. \f0\b0 \cf4
  16575. \f2\b \cf8 if
  16576. \f0\b0 \cf4 (index == \cf7 1\cf4 )\{\
  16577. \f2\b \cf8 self
  16578. \f0\b0 \cf4 .isAudioMeeting =
  16579. \f2\b \cf8 NO
  16580. \f0\b0 \cf4 ;\
  16581. \}\
  16582. [g_server userOpenMeetWithToUserId:chatPerson.userId toView:
  16583. \f2\b \cf8 self
  16584. \f0\b0 \cf4 ];\
  16585. \}\
  16586. \
  16587. \}\
  16588. \
  16589. \}\
  16590. \
  16591. \
  16592. \cf5 #if TAR_IM\cf4 \
  16593. \cf5 #ifdef Meeting_Version\cf4 \
  16594. -(
  16595. \f2\b \cf8 void
  16596. \f0\b0 \cf4 )\cf11 onGroupAudioMeeting\cf4 :(JXMessageObject*)msg\{\
  16597. NSString* no;\
  16598. NSString* s;\
  16599. \f2\b \cf8 if
  16600. \f0\b0 \cf4 (msg !=
  16601. \f2\b \cf8 nil
  16602. \f0\b0 \cf4 )\{\
  16603. no = msg.fileName;\
  16604. s = msg.objectId;\
  16605. \}
  16606. \f2\b \cf8 else
  16607. \f0\b0 \cf4 \{\
  16608. no = _audioMeetingNo;\
  16609. s =
  16610. \f2\b \cf8 self
  16611. \f0\b0 \cf4 .roomJid;\
  16612. \}\
  16613. \cf2 // if(!no)\{\cf4 \
  16614. \cf2 // [g_App showAlert:Localized(@"JXMeeting_numberNULL")];\cf4 \
  16615. \cf2 // return;\cf4 \
  16616. \cf2 // \}\cf4 \
  16617. \f2\b \cf8 self
  16618. \f0\b0 \cf4 .meetingNo = no;\
  16619. \f2\b \cf8 self
  16620. \f0\b0 \cf4 .isAudioMeeting =
  16621. \f2\b \cf8 YES
  16622. \f0\b0 \cf4 ;\
  16623. \f2\b \cf8 self
  16624. \f0\b0 \cf4 .isTalkMeeting =
  16625. \f2\b \cf8 NO
  16626. \f0\b0 \cf4 ;\
  16627. [
  16628. \f2\b \cf8 self
  16629. \f0\b0 \cf4 onInvite];\
  16630. \cf2 // [g_meeting startAudioMeeting:no roomJid:s];\cf4 \
  16631. \}\
  16632. \
  16633. -(
  16634. \f2\b \cf8 void
  16635. \f0\b0 \cf4 )\cf11 onGroupVideoMeeting\cf4 :(JXMessageObject*)msg\{\
  16636. NSString* no;\
  16637. NSString* s;\
  16638. \f2\b \cf8 if
  16639. \f0\b0 \cf4 (msg !=
  16640. \f2\b \cf8 nil
  16641. \f0\b0 \cf4 )\{\
  16642. no = msg.fileName;\
  16643. s = msg.objectId;\
  16644. \}
  16645. \f2\b \cf8 else
  16646. \f0\b0 \cf4 \{\
  16647. no = _videoMeetingNo;\
  16648. s =
  16649. \f2\b \cf8 self
  16650. \f0\b0 \cf4 .roomJid;\
  16651. \}\
  16652. \cf2 // if(!no)\{\cf4 \
  16653. \cf2 // [g_App showAlert:Localized(@"JXMeeting_numberNULL")];\cf4 \
  16654. \cf2 // return;\cf4 \
  16655. \cf2 // \}\cf4 \
  16656. \f2\b \cf8 self
  16657. \f0\b0 \cf4 .isAudioMeeting =
  16658. \f2\b \cf8 NO
  16659. \f0\b0 \cf4 ;\
  16660. \f2\b \cf8 self
  16661. \f0\b0 \cf4 .meetingNo = no;\
  16662. \f2\b \cf8 self
  16663. \f0\b0 \cf4 .isTalkMeeting =
  16664. \f2\b \cf8 NO
  16665. \f0\b0 \cf4 ;\
  16666. [
  16667. \f2\b \cf8 self
  16668. \f0\b0 \cf4 onInvite];\
  16669. \cf2 // [g_meeting startVideoMeeting:no roomJid:s];\cf4 \
  16670. \}\
  16671. \
  16672. - (
  16673. \f2\b \cf8 void
  16674. \f0\b0 \cf4 )\cf11 onGroupTalkMeeting\cf4 :(JXMessageObject *)msg \{\
  16675. NSString* no;\
  16676. NSString* s;\
  16677. \f2\b \cf8 if
  16678. \f0\b0 \cf4 (msg !=
  16679. \f2\b \cf8 nil
  16680. \f0\b0 \cf4 )\{\
  16681. no = msg.fileName;\
  16682. s = msg.objectId;\
  16683. \}
  16684. \f2\b \cf8 else
  16685. \f0\b0 \cf4 \{\
  16686. no = _audioMeetingNo;\
  16687. s =
  16688. \f2\b \cf8 self
  16689. \f0\b0 \cf4 .roomJid;\
  16690. \}\
  16691. \cf2 // if(!no)\{\cf4 \
  16692. \cf2 // [g_App showAlert:Localized(@"JXMeeting_numberNULL")];\cf4 \
  16693. \cf2 // return;\cf4 \
  16694. \cf2 // \}\cf4 \
  16695. \f2\b \cf8 self
  16696. \f0\b0 \cf4 .meetingNo = no;\
  16697. \f2\b \cf8 self
  16698. \f0\b0 \cf4 .isAudioMeeting =
  16699. \f2\b \cf8 YES
  16700. \f0\b0 \cf4 ;\
  16701. \f2\b \cf8 self
  16702. \f0\b0 \cf4 .isTalkMeeting =
  16703. \f2\b \cf8 YES
  16704. \f0\b0 \cf4 ;\
  16705. [
  16706. \f2\b \cf8 self
  16707. \f0\b0 \cf4 onInvite];\
  16708. \}\
  16709. \
  16710. -(
  16711. \f2\b \cf8 void
  16712. \f0\b0 \cf4 )\cf11 onInvite\cf4 \{\
  16713. \
  16714. \f2\b \cf8 if
  16715. \f0\b0 \cf4 (!_room.roomId) \{\
  16716. \f2\b \cf8 return
  16717. \f0\b0 \cf4 ;\
  16718. \}\
  16719. \
  16720. NSMutableSet* p = [[NSMutableSet alloc]init];\
  16721. \
  16722. JXSelectFriendsVC* vc = [JXSelectFriendsVC alloc];\
  16723. vc.isNewRoom =
  16724. \f2\b \cf8 NO
  16725. \f0\b0 \cf4 ;\
  16726. vc.isShowMySelf =
  16727. \f2\b \cf8 NO
  16728. \f0\b0 \cf4 ;\
  16729. vc.type = JXSelectFriendTypeSelMembers;\
  16730. vc.room = _room;\
  16731. vc.existSet = p;\
  16732. vc.delegate =
  16733. \f2\b \cf8 self
  16734. \f0\b0 \cf4 ;\
  16735. vc.didSelect =
  16736. \f2\b \cf8 @selector
  16737. \f0\b0 \cf4 (meetingAddMember:);\
  16738. vc = [vc init];\
  16739. \cf2 // [g_window addSubview:vc.view];\cf4 \
  16740. [g_navigation pushViewController:vc animated:
  16741. \f2\b \cf8 YES
  16742. \f0\b0 \cf4 ];\
  16743. \}\
  16744. \
  16745. -(
  16746. \f2\b \cf8 void
  16747. \f0\b0 \cf4 )\cf11 meetingAddMember\cf4 :(JXSelectFriendsVC*)vc\{\
  16748. \f2\b \cf8 int
  16749. \f0\b0 \cf4 type;\
  16750. \f2\b \cf8 if
  16751. \f0\b0 \cf4 (
  16752. \f2\b \cf8 self
  16753. \f0\b0 \cf4 .isAudioMeeting) \{\
  16754. type = kWCMessageTypeAudioMeetingInvite;\
  16755. \}
  16756. \f2\b \cf8 else
  16757. \f0\b0 \cf4 \{\
  16758. type = kWCMessageTypeVideoMeetingInvite;\
  16759. \}\
  16760. \f2\b \cf8 if
  16761. \f0\b0 \cf4 (
  16762. \f2\b \cf8 self
  16763. \f0\b0 \cf4 .isTalkMeeting) \{\
  16764. type = kWCMessageTypeTalkInvite;\
  16765. \}\
  16766. \f2\b \cf8 for
  16767. \f0\b0 \cf4 (NSNumber* n
  16768. \f2\b \cf8 in
  16769. \f0\b0 \cf4 vc.set)\{\
  16770. memberData *user;\
  16771. \f2\b \cf8 if
  16772. \f0\b0 \cf4 (vc.seekTextField.text.length > \cf7 0\cf4 ) \{\
  16773. user = vc.searchArray[[n intValue] % \cf7 100000\cf4 -\cf7 1\cf4 ];\
  16774. \}
  16775. \f2\b \cf8 else
  16776. \f0\b0 \cf4 \{\
  16777. user = [[vc.letterResultArr objectAtIndex:[n intValue] / \cf7 100000\cf4 -\cf7 1\cf4 ] objectAtIndex:[n intValue] % \cf7 100000\cf4 -\cf7 1\cf4 ];\
  16778. \}\
  16779. NSString* s = [NSString stringWithFormat:\cf6 @"%ld"\cf4 ,user.userId];\
  16780. [g_meeting sendMeetingInvite:s toUserName:user.userName roomJid:
  16781. \f2\b \cf8 self
  16782. \f0\b0 \cf4 .roomJid callId:
  16783. \f2\b \cf8 self
  16784. \f0\b0 \cf4 .meetingNo type:type];\
  16785. \}\
  16786. \
  16787. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 .5\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
  16788. \f2\b \cf8 if
  16789. \f0\b0 \cf4 (g_meeting.isMeeting) \{\
  16790. \f2\b \cf8 return
  16791. \f0\b0 \cf4 ;\
  16792. \}\
  16793. JXAVCallViewController *avVC = [[JXAVCallViewController alloc] init];\
  16794. avVC.roomNum =
  16795. \f2\b \cf8 self
  16796. \f0\b0 \cf4 .roomJid;\
  16797. avVC.isAudio =
  16798. \f2\b \cf8 self
  16799. \f0\b0 \cf4 .isAudioMeeting;\
  16800. avVC.isTalk =
  16801. \f2\b \cf8 self
  16802. \f0\b0 \cf4 .isTalkMeeting;\
  16803. avVC.isGroup =
  16804. \f2\b \cf8 YES
  16805. \f0\b0 \cf4 ;\
  16806. avVC.toUserName =
  16807. \f2\b \cf8 self
  16808. \f0\b0 \cf4 .chatRoom.roomTitle;\
  16809. avVC.view.frame = [UIScreen mainScreen].bounds;\
  16810. \cf2 // [self presentViewController:avVC animated:YES completion:nil];\cf4 \
  16811. [g_window addSubview:avVC.view];\
  16812. \
  16813. \});\
  16814. \
  16815. \}\
  16816. \cf5 #endif\cf4 \
  16817. \cf5 #endif\cf4 \
  16818. \
  16819. -(
  16820. \f2\b \cf8 void
  16821. \f0\b0 \cf4 )\cf11 onChatAudio\cf4 :(JXMessageObject*)msg\{\
  16822. \cf5 #if TAR_IM\cf4 \
  16823. \cf5 #ifdef Meeting_Version\cf4 \
  16824. \f2\b \cf8 if
  16825. \f0\b0 \cf4 ([
  16826. \f2\b \cf8 self
  16827. \f0\b0 \cf4 sendMsgCheck])\{\
  16828. \f2\b \cf8 return
  16829. \f0\b0 \cf4 ;\
  16830. \}\
  16831. \
  16832. \cf2 //
  16833. \f1 \'d1\'e9\'d6\'a4
  16834. \f0 XMPP
  16835. \f1 \'ca\'c7\'b7\'f1\'d4\'da\'cf\'df
  16836. \f0 \cf4 \
  16837. \f2\b \cf8 if
  16838. \f0\b0 \cf4 (g_xmpp.isLogined != login_status_yes)\{\
  16839. [
  16840. \f2\b \cf8 self
  16841. \f0\b0 \cf4 hideKeyboard:
  16842. \f2\b \cf8 NO
  16843. \f0\b0 \cf4 ];\
  16844. [g_xmpp showXmppOfflineAlert];\
  16845. \f2\b \cf8 return
  16846. \f0\b0 \cf4 ;\
  16847. \}\
  16848. \
  16849. \cf2 // if(!g_meeting.connected)\{\cf4 \
  16850. \cf2 // [g_meeting showAutoConnect];\cf4 \
  16851. \cf2 // return;\cf4 \
  16852. \cf2 // \}\cf4 \
  16853. \
  16854. [
  16855. \f2\b \cf8 self
  16856. \f0\b0 \cf4 hideKeyboard:
  16857. \f2\b \cf8 YES
  16858. \f0\b0 \cf4 ];\
  16859. \f2\b \cf8 if
  16860. \f0\b0 \cf4 ((
  16861. \f2\b \cf8 self
  16862. \f0\b0 \cf4 .roomJid || msg.objectId.length > \cf7 0\cf4 ) && [msg.type intValue] != kWCMessageTypeAVBusy)\{\
  16863. [
  16864. \f2\b \cf8 self
  16865. \f0\b0 \cf4 onGroupAudioMeeting:msg];\
  16866. \}
  16867. \f2\b \cf8 else
  16868. \f0\b0 \cf4 \{\
  16869. AskCallViewController* vc = [AskCallViewController alloc];\
  16870. vc.toUserId = chatPerson.userId;\
  16871. vc.toUserName = chatPerson.userNickname;\
  16872. vc.type = kWCMessageTypeAudioChatAsk;\
  16873. vc.meetUrl =
  16874. \f2\b \cf8 self
  16875. \f0\b0 \cf4 .meetUrl;\
  16876. vc = [vc init];\
  16877. \cf2 // [g_window addSubview:vc.view];\cf4 \
  16878. [g_navigation pushViewController:vc animated:
  16879. \f2\b \cf8 NO
  16880. \f0\b0 \cf4 ];\
  16881. \}\
  16882. \
  16883. \cf5 #endif\cf4 \
  16884. \cf5 #endif\cf4 \
  16885. \}\
  16886. \
  16887. -(
  16888. \f2\b \cf8 void
  16889. \f0\b0 \cf4 )\cf11 onChatVideo\cf4 :(JXMessageObject*)msg\{\
  16890. \cf5 #if TAR_IM\cf4 \
  16891. \cf5 #ifdef Meeting_Version\cf4 \
  16892. \f2\b \cf8 if
  16893. \f0\b0 \cf4 ([
  16894. \f2\b \cf8 self
  16895. \f0\b0 \cf4 sendMsgCheck])\{\
  16896. \f2\b \cf8 return
  16897. \f0\b0 \cf4 ;\
  16898. \}\
  16899. \
  16900. \cf2 //
  16901. \f1 \'d1\'e9\'d6\'a4
  16902. \f0 XMPP
  16903. \f1 \'ca\'c7\'b7\'f1\'d4\'da\'cf\'df
  16904. \f0 \cf4 \
  16905. \f2\b \cf8 if
  16906. \f0\b0 \cf4 (g_xmpp.isLogined != login_status_yes)\{\
  16907. [
  16908. \f2\b \cf8 self
  16909. \f0\b0 \cf4 hideKeyboard:
  16910. \f2\b \cf8 NO
  16911. \f0\b0 \cf4 ];\
  16912. [g_xmpp showXmppOfflineAlert];\
  16913. \f2\b \cf8 return
  16914. \f0\b0 \cf4 ;\
  16915. \}\
  16916. \
  16917. \cf2 // if(!g_meeting.connected)\{\cf4 \
  16918. \cf2 // [g_meeting showAutoConnect];\cf4 \
  16919. \cf2 // return;\cf4 \
  16920. \cf2 // \}\cf4 \
  16921. \
  16922. [
  16923. \f2\b \cf8 self
  16924. \f0\b0 \cf4 hideKeyboard:
  16925. \f2\b \cf8 YES
  16926. \f0\b0 \cf4 ];\
  16927. \f2\b \cf8 if
  16928. \f0\b0 \cf4 ((
  16929. \f2\b \cf8 self
  16930. \f0\b0 \cf4 .roomJid || msg.objectId.length > \cf7 0\cf4 ) && [msg.type intValue] != kWCMessageTypeAVBusy)\{\
  16931. [
  16932. \f2\b \cf8 self
  16933. \f0\b0 \cf4 onGroupVideoMeeting:msg];\
  16934. \}
  16935. \f2\b \cf8 else
  16936. \f0\b0 \cf4 \{\
  16937. AskCallViewController* vc = [AskCallViewController alloc];\
  16938. vc.toUserId = chatPerson.userId;\
  16939. vc.toUserName = chatPerson.userNickname;\
  16940. vc.type = kWCMessageTypeVideoChatAsk;\
  16941. vc.meetUrl =
  16942. \f2\b \cf8 self
  16943. \f0\b0 \cf4 .meetUrl;\
  16944. vc = [vc init];\
  16945. \cf2 // [g_window addSubview:vc.view];\cf4 \
  16946. [g_navigation pushViewController:vc animated:
  16947. \f2\b \cf8 NO
  16948. \f0\b0 \cf4 ];\
  16949. \}\
  16950. \cf5 #endif\cf4 \
  16951. \cf5 #endif\cf4 \
  16952. \}\
  16953. \
  16954. - (
  16955. \f2\b \cf8 void
  16956. \f0\b0 \cf4 )\cf11 onChatTalk\cf4 :(JXMessageObject*)msg \{\
  16957. \cf5 #if TAR_IM\cf4 \
  16958. \cf5 #ifdef Meeting_Version\cf4 \
  16959. \f2\b \cf8 if
  16960. \f0\b0 \cf4 ([
  16961. \f2\b \cf8 self
  16962. \f0\b0 \cf4 sendMsgCheck])\{\
  16963. \f2\b \cf8 return
  16964. \f0\b0 \cf4 ;\
  16965. \}\
  16966. \
  16967. \cf2 //
  16968. \f1 \'d1\'e9\'d6\'a4
  16969. \f0 XMPP
  16970. \f1 \'ca\'c7\'b7\'f1\'d4\'da\'cf\'df
  16971. \f0 \cf4 \
  16972. \f2\b \cf8 if
  16973. \f0\b0 \cf4 (g_xmpp.isLogined != login_status_yes)\{\
  16974. [
  16975. \f2\b \cf8 self
  16976. \f0\b0 \cf4 hideKeyboard:
  16977. \f2\b \cf8 NO
  16978. \f0\b0 \cf4 ];\
  16979. [g_xmpp showXmppOfflineAlert];\
  16980. \f2\b \cf8 return
  16981. \f0\b0 \cf4 ;\
  16982. \}\
  16983. \
  16984. \cf2 // if(!g_meeting.connected)\{\cf4 \
  16985. \cf2 // [g_meeting showAutoConnect];\cf4 \
  16986. \cf2 // return;\cf4 \
  16987. \cf2 // \}\cf4 \
  16988. \
  16989. [
  16990. \f2\b \cf8 self
  16991. \f0\b0 \cf4 hideKeyboard:
  16992. \f2\b \cf8 YES
  16993. \f0\b0 \cf4 ];\
  16994. [
  16995. \f2\b \cf8 self
  16996. \f0\b0 \cf4 onGroupTalkMeeting:msg];\
  16997. \
  16998. \cf5 #endif\cf4 \
  16999. \cf5 #endif\cf4 \
  17000. \}\
  17001. \
  17002. \
  17003. -(
  17004. \f2\b \cf8 void
  17005. \f0\b0 \cf4 )\cf11 onHeadImage\cf4 :(UIView*)sender\{\
  17006. [
  17007. \f2\b \cf8 self
  17008. \f0\b0 \cf4 hideKeyboard:
  17009. \f2\b \cf8 NO
  17010. \f0\b0 \cf4 ];\
  17011. \
  17012. JXMessageObject *msg=[_array objectAtIndex:sender.tag];\
  17013. [g_server getUser:msg.fromUserId toView:
  17014. \f2\b \cf8 self
  17015. \f0\b0 \cf4 ];\
  17016. msg =
  17017. \f2\b \cf8 nil
  17018. \f0\b0 \cf4 ;\
  17019. \}\
  17020. \
  17021. -(
  17022. \f2\b \cf8 void
  17023. \f0\b0 \cf4 )\cf11 onMember\cf4 \{\
  17024. \f2\b \cf8 if
  17025. \f0\b0 \cf4 (recording) \{\
  17026. \f2\b \cf8 return
  17027. \f0\b0 \cf4 ;\
  17028. \}\
  17029. [
  17030. \f2\b \cf8 self
  17031. \f0\b0 \cf4 hideKeyboard:
  17032. \f2\b \cf8 YES
  17033. \f0\b0 \cf4 ];\
  17034. NSString *s;\
  17035. \f2\b \cf8 switch
  17036. \f0\b0 \cf4 ([
  17037. \f2\b \cf8 self
  17038. \f0\b0 \cf4 .groupStatus intValue]) \{\
  17039. \f2\b \cf8 case
  17040. \f0\b0 \cf4 \cf7 0\cf4 :\
  17041. s =
  17042. \f2\b \cf8 nil
  17043. \f0\b0 \cf4 ;\
  17044. \f2\b \cf8 break
  17045. \f0\b0 \cf4 ;\
  17046. \f2\b \cf8 case
  17047. \f0\b0 \cf4 \cf7 1\cf4 :\
  17048. s = Localized(\cf6 @"JX_OutOfTheGroup1"\cf4 );\
  17049. \f2\b \cf8 break
  17050. \f0\b0 \cf4 ;\
  17051. \f2\b \cf8 case
  17052. \f0\b0 \cf4 \cf7 2\cf4 :\
  17053. s = Localized(\cf6 @"JX_DissolutionGroup1"\cf4 );\
  17054. \f2\b \cf8 break
  17055. \f0\b0 \cf4 ;\
  17056. \
  17057. \f2\b \cf8 default
  17058. \f0\b0 \cf4 :\
  17059. \f2\b \cf8 break
  17060. \f0\b0 \cf4 ;\
  17061. \}\
  17062. \
  17063. \f2\b \cf8 if
  17064. \f0\b0 \cf4 (s.length > \cf7 0\cf4 ) \{\
  17065. [
  17066. \f2\b \cf8 self
  17067. \f0\b0 \cf4 hideKeyboard:
  17068. \f2\b \cf8 NO
  17069. \f0\b0 \cf4 ];\
  17070. [g_server showMsg:s];\
  17071. \}
  17072. \f2\b \cf8 else
  17073. \f0\b0 \cf4 \{\
  17074. \cf2 // [_wait start];\cf4 \
  17075. \
  17076. JXRoomMemberVC* vc = [JXRoomMemberVC alloc];\
  17077. \cf2 // vc.chatRoom = [[JXXMPP sharedInstance].roomPool joinRoom:roomdata.roomJid title:roomdata.name isNew:NO];\cf4 \
  17078. \cf2 // vc.room = roomdata;\cf4 \
  17079. vc.roomId = roomId;\
  17080. vc.room =
  17081. \f2\b \cf8 self
  17082. \f0\b0 \cf4 .room;\
  17083. vc.delegate =
  17084. \f2\b \cf8 self
  17085. \f0\b0 \cf4 ;\
  17086. vc = [vc init];\
  17087. \cf2 // [g_window addSubview:vc.view];\cf4 \
  17088. [g_navigation pushViewController:vc animated:
  17089. \f2\b \cf8 YES
  17090. \f0\b0 \cf4 ];\
  17091. \cf2 // [g_server getRoom:roomId toView:self];\cf4 \
  17092. \}\
  17093. \}\
  17094. \
  17095. -(
  17096. \f2\b \cf8 void
  17097. \f0\b0 \cf4 )\cf11 onQuitRoom\cf4 :(NSNotification *)notifacation\cf2 //
  17098. \f1 \'b3\'ac\'ca\'b1\'ce\'b4\'ca\'d5\'b5\'bd\'bb\'d8\'d6\'b4
  17099. \f0 \cf4 \
  17100. \{\
  17101. JXRoomObject* p = (JXRoomObject *)notifacation.object;\
  17102. \f2\b \cf8 if
  17103. \f0\b0 \cf4 (p == chatRoom)\
  17104. [
  17105. \f2\b \cf8 self
  17106. \f0\b0 \cf4 actionQuit];\
  17107. p =
  17108. \f2\b \cf8 nil
  17109. \f0\b0 \cf4 ;\
  17110. \}\
  17111. \
  17112. \cf5 #pragma mark
  17113. \f2\b \cf16 -
  17114. \f4 \'bf\'d8\'d6\'c6\'cf\'fb\'cf\'a2\'b4\'a6\'c0\'ed
  17115. \f0\b0 \cf4 \
  17116. -(
  17117. \f2\b \cf8 void
  17118. \f0\b0 \cf4 )\cf11 onReceiveRoomRemind\cf4 :(NSNotification *)notifacation\
  17119. \{\
  17120. JXRoomRemind* p = (JXRoomRemind *)notifacation.object;\
  17121. \
  17122. \f2\b \cf8 if
  17123. \f0\b0 \cf4 ([p.objectId isEqualToString:
  17124. \f2\b \cf8 self
  17125. \f0\b0 \cf4 .roomJid])\{\
  17126. \f2\b \cf8 if
  17127. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomName)\{\
  17128. \f2\b \cf8 self
  17129. \f0\b0 \cf4 .title = [NSString stringWithFormat:\cf6 @"%@(%ld)"\cf4 ,p.content,_room.curCount];\
  17130. [
  17131. \f2\b \cf8 self
  17132. \f0\b0 \cf4 setAudioIconFrame];\
  17133. \}\
  17134. \f2\b \cf8 if
  17135. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_DisableSay)\{\
  17136. \f2\b \cf8 if
  17137. \f0\b0 \cf4 ([p.toUserId isEqualToString:MY_USER_ID])\
  17138. _disableSay = [p.content longLongValue];\
  17139. \}\
  17140. \f2\b \cf8 if
  17141. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_DelMember)\{\
  17142. \f2\b \cf8 if
  17143. \f0\b0 \cf4 ([p.toUserId isEqualToString:MY_USER_ID])\
  17144. \f2\b \cf8 self
  17145. \f0\b0 \cf4 .groupStatus = [NSNumber numberWithInt:\cf7 1\cf4 ];\
  17146. \cf2 // [self actionQuit];\cf4 \
  17147. \
  17148. NSArray * memberArray = [memberData fetchAllMembers:_room.roomId];\
  17149. \f2\b \cf8 self
  17150. \f0\b0 \cf4 .title = [NSString stringWithFormat:\cf6 @"%@(%ld)"\cf4 ,
  17151. \f2\b \cf8 self
  17152. \f0\b0 \cf4 .chatPerson.userNickname, memberArray.count];\
  17153. [
  17154. \f2\b \cf8 self
  17155. \f0\b0 \cf4 setAudioIconFrame];\
  17156. \
  17157. \}\
  17158. \f2\b \cf8 if
  17159. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_NewNotice)\{\
  17160. NSArray *noticeArr = [p.content componentsSeparatedByString:Localized(\cf6 @"JXMessageObject_AddNewAdv"\cf4 )];\
  17161. [
  17162. \f2\b \cf8 self
  17163. \f0\b0 \cf4 setupNoticeWithContent:[noticeArr lastObject] time:[NSString stringWithFormat:\cf6 @"%lf"\cf4 ,[[NSDate date] timeIntervalSince1970]]];\
  17164. \}\
  17165. \f2\b \cf8 if
  17166. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_DelRoom)\{\
  17167. \f2\b \cf8 if
  17168. \f0\b0 \cf4 ([p.toUserId isEqualToString:MY_USER_ID] || IS_OTHER_DEVICE(p.toUserId))\
  17169. \f2\b \cf8 self
  17170. \f0\b0 \cf4 .groupStatus = [NSNumber numberWithInt:\cf7 2\cf4 ];\
  17171. \cf2 // [self actionQuit];\cf4 \
  17172. \}\
  17173. \f2\b \cf8 if
  17174. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_AddMember)\{\
  17175. \f2\b \cf8 if
  17176. \f0\b0 \cf4 ([p.toUserId isEqualToString:MY_USER_ID])\{\
  17177. \f2\b \cf8 self
  17178. \f0\b0 \cf4 .groupStatus = [NSNumber numberWithInt:\cf7 0\cf4 ];\
  17179. chatRoom.isConnected =
  17180. \f2\b \cf8 YES
  17181. \f0\b0 \cf4 ;\
  17182. \}\
  17183. NSArray * memberArray = [memberData fetchAllMembers:_room.roomId];\
  17184. \f2\b \cf8 self
  17185. \f0\b0 \cf4 .title = [NSString stringWithFormat:\cf6 @"%@(%ld)"\cf4 ,
  17186. \f2\b \cf8 self
  17187. \f0\b0 \cf4 .chatPerson.userNickname, memberArray.count];\
  17188. [
  17189. \f2\b \cf8 self
  17190. \f0\b0 \cf4 setAudioIconFrame];\
  17191. \cf2 // [self actionQuit];\cf4 \
  17192. \}\
  17193. \f2\b \cf8 if
  17194. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_NickName)\{\
  17195. \
  17196. memberData *data = [[memberData alloc] init];\
  17197. data.roomId = roomId;\
  17198. data.userNickName = p.content;\
  17199. data.userId = [p.toUserId longLongValue];\
  17200. [data updateUserNickName];\
  17201. \
  17202. \cf2 // for (int i = 0; i < [_array count] ; i++) \{\cf4 \
  17203. \cf2 // JXMessageObject *msg=[_array objectAtIndex:i];\cf4 \
  17204. \cf2 // if ([msg.fromUserId isEqualToString:p.userId]) \{\cf4 \
  17205. \cf2 // msg.fromUserName = p.content;\cf4 \
  17206. \cf2 // \}\cf4 \
  17207. \cf2 // \}\cf4 \
  17208. \
  17209. [_table reloadData];\
  17210. \
  17211. \cf2 // for(int i=0;i<[_room.members count];i++)\{\cf4 \
  17212. \cf2 // memberData* m = [_room.members objectAtIndex:i];\cf4 \
  17213. \cf2 // if(m.userId == [p.toUserId intValue])\{\cf4 \
  17214. \cf2 // m.userNickName = p.content;\cf4 \
  17215. \cf2 // break;\cf4 \
  17216. \cf2 // \}\cf4 \
  17217. \cf2 // m = nil;\cf4 \
  17218. \cf2 // \}\cf4 \
  17219. \}\
  17220. \
  17221. \f2\b \cf8 if
  17222. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_SetManage) \{\
  17223. \cf2 //
  17224. \f1 \'c9\'e8\'d6\'c3\'c8\'ba\'d7\'e9\'b9\'dc\'c0\'ed\'d4\'b1
  17225. \f0 \cf4 \
  17226. \
  17227. JXUserObject *user = [[JXUserObject sharedInstance] getUserById:p.objectId];\
  17228. \
  17229. NSDictionary * groupDict = [user toDictionary];\
  17230. roomData * roomdata = [[roomData alloc] init];\
  17231. [roomdata getDataFromDict:groupDict];\
  17232. NSArray * allMem = [memberData fetchAllMembers:user.roomId];\
  17233. roomdata.members = [allMem mutableCopy];\
  17234. \
  17235. memberData *member = [roomdata getMember:p.toUserId];\
  17236. \f2\b \cf8 if
  17237. \f0\b0 \cf4 ([member.role intValue] == \cf7 2\cf4 ) \{\
  17238. member.role = [NSNumber numberWithInt:\cf7 2\cf4 ];\
  17239. \}
  17240. \f2\b \cf8 else
  17241. \f0\b0 \cf4 \{\
  17242. member.role = [NSNumber numberWithInt:\cf7 3\cf4 ];\
  17243. \}\
  17244. [member updateRole];\
  17245. _room = roomdata;\
  17246. \
  17247. \f2\b \cf8 if
  17248. \f0\b0 \cf4 ([p.toUserId isEqualToString:g_myself.userId]) \{\
  17249. \f2\b \cf8 if
  17250. \f0\b0 \cf4 ([member.role intValue] == \cf7 2\cf4 ) \{\
  17251. _isAdmin =
  17252. \f2\b \cf8 YES
  17253. \f0\b0 \cf4 ;\
  17254. \
  17255. _shareMore.enabled =
  17256. \f2\b \cf8 YES
  17257. \f0\b0 \cf4 ;\
  17258. _recordBtnLeft.enabled =
  17259. \f2\b \cf8 YES
  17260. \f0\b0 \cf4 ;\
  17261. _btnFace.enabled =
  17262. \f2\b \cf8 YES
  17263. \f0\b0 \cf4 ;\
  17264. _messageText.userInteractionEnabled =
  17265. \f2\b \cf8 YES
  17266. \f0\b0 \cf4 ;\
  17267. _talkTimeLabel.hidden =
  17268. \f2\b \cf8 YES
  17269. \f0\b0 \cf4 ;\
  17270. \}
  17271. \f2\b \cf8 else
  17272. \f0\b0 \cf4 \{\
  17273. _isAdmin =
  17274. \f2\b \cf8 NO
  17275. \f0\b0 \cf4 ;\
  17276. \f2\b \cf8 if
  17277. \f0\b0 \cf4 ([
  17278. \f2\b \cf8 self
  17279. \f0\b0 \cf4 .chatPerson.talkTime longLongValue] > \cf7 0\cf4 ) \{\
  17280. _talkTimeLabel.hidden =
  17281. \f2\b \cf8 NO
  17282. \f0\b0 \cf4 ;\
  17283. _talkTimeLabel.text = Localized(\cf6 @"JX_TotalSilence"\cf4 );\
  17284. _shareMore.enabled =
  17285. \f2\b \cf8 NO
  17286. \f0\b0 \cf4 ;\
  17287. _recordBtnLeft.enabled =
  17288. \f2\b \cf8 NO
  17289. \f0\b0 \cf4 ;\
  17290. _btnFace.enabled =
  17291. \f2\b \cf8 NO
  17292. \f0\b0 \cf4 ;\
  17293. _messageText.userInteractionEnabled =
  17294. \f2\b \cf8 NO
  17295. \f0\b0 \cf4 ;\
  17296. _messageText.text =
  17297. \f2\b \cf8 nil
  17298. \f0\b0 \cf4 ;\
  17299. \}
  17300. \f2\b \cf8 else
  17301. \f0\b0 \cf4 \{\
  17302. \
  17303. _shareMore.enabled =
  17304. \f2\b \cf8 YES
  17305. \f0\b0 \cf4 ;\
  17306. _recordBtnLeft.enabled =
  17307. \f2\b \cf8 YES
  17308. \f0\b0 \cf4 ;\
  17309. _btnFace.enabled =
  17310. \f2\b \cf8 YES
  17311. \f0\b0 \cf4 ;\
  17312. _messageText.userInteractionEnabled =
  17313. \f2\b \cf8 YES
  17314. \f0\b0 \cf4 ;\
  17315. _talkTimeLabel.hidden =
  17316. \f2\b \cf8 YES
  17317. \f0\b0 \cf4 ;\
  17318. \}\
  17319. \}\
  17320. \}\
  17321. \
  17322. [
  17323. \f2\b \cf8 self
  17324. \f0\b0 \cf4 refresh:
  17325. \f2\b \cf8 nil
  17326. \f0\b0 \cf4 ];\
  17327. [_table reloadData];\
  17328. \}\
  17329. \
  17330. \f2\b \cf8 if
  17331. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_ShowRead)\{\
  17332. \cf2 //BOOL b = [self.chatPerson.showRead boolValue];\cf4 \
  17333. \f2\b \cf8 self
  17334. \f0\b0 \cf4 .chatPerson.showRead = [NSNumber numberWithInt:[p.content intValue]];\
  17335. \cf2 //if(b != [self.chatPerson.showRead boolValue])\cf4 \
  17336. \
  17337. \cf2 // [self refresh:nil];\cf4 \
  17338. [_table reloadData];\
  17339. \
  17340. \}\
  17341. \f2\b \cf8 if
  17342. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_ShowMember)\{\
  17343. \
  17344. \f2\b \cf8 self
  17345. \f0\b0 \cf4 .chatPerson.showMember = [NSNumber numberWithInt:[p.content intValue]];\
  17346. \
  17347. [
  17348. \f2\b \cf8 self
  17349. \f0\b0 \cf4 refresh:
  17350. \f2\b \cf8 nil
  17351. \f0\b0 \cf4 ];\
  17352. \}\
  17353. \f2\b \cf8 if
  17354. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_allowSendCard)\{\
  17355. \
  17356. \f2\b \cf8 self
  17357. \f0\b0 \cf4 .chatPerson.allowSendCard = [NSNumber numberWithInt:[p.content intValue]];\
  17358. \f2\b \cf8 self
  17359. \f0\b0 \cf4 .room.allowSendCard = [p.content boolValue];\
  17360. \
  17361. [
  17362. \f2\b \cf8 self
  17363. \f0\b0 \cf4 refresh:
  17364. \f2\b \cf8 nil
  17365. \f0\b0 \cf4 ];\
  17366. \cf2 //
  17367. \f1 \'bd\'fb\'d6\'b9\'cb\'bd\'c1\'c4\'a3\'ac\'cb\'f9\'d3\'d0\'c3\'fb\'d7\'d6\'d7\'ee\'ba\'f3\'d2\'bb\'ce\'bb\'b8\'c4\'ce\'aa
  17368. \f0 *
  17369. \f1 \'a3\'ac\'d0\'e8\'d2\'aa\'cb\'a2\'d0\'c2\'bd\'e7\'c3\'e6\'a3\'ac\'b1\'a3\'d6\'a4\'d5\'fb\'b8\'f6\'c1\'d0\'b1\'ed\'bc\'b4\'ca\'b1\'b8\'fc\'d0\'c2
  17370. \f0 \cf4 \
  17371. [_table reloadData];\
  17372. \}\
  17373. \f2\b \cf8 if
  17374. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomAllowInviteFriend)\{\
  17375. \
  17376. \f2\b \cf8 self
  17377. \f0\b0 \cf4 .chatPerson.allowInviteFriend = [NSNumber numberWithInt:[p.content intValue]];\
  17378. \
  17379. \}\
  17380. \f2\b \cf8 if
  17381. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomAllowUploadFile)\{\
  17382. \
  17383. \f2\b \cf8 self
  17384. \f0\b0 \cf4 .chatPerson.allowUploadFile = [NSNumber numberWithInt:[p.content intValue]];\
  17385. \
  17386. \}\
  17387. \f2\b \cf8 if
  17388. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomAllowConference)\{\
  17389. \
  17390. \f2\b \cf8 self
  17391. \f0\b0 \cf4 .chatPerson.allowConference = [NSNumber numberWithInt:[p.content intValue]];\
  17392. \
  17393. \}\
  17394. \f2\b \cf8 if
  17395. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomAllowSpeakCourse)\{\
  17396. \
  17397. \f2\b \cf8 self
  17398. \f0\b0 \cf4 .chatPerson.allowSpeakCourse = [NSNumber numberWithInt:[p.content intValue]];\
  17399. [
  17400. \f2\b \cf8 self
  17401. \f0\b0 \cf4 refresh:
  17402. \f2\b \cf8 nil
  17403. \f0\b0 \cf4 ];\
  17404. \}\
  17405. \f2\b \cf8 if
  17406. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomAllBanned)\{\
  17407. [
  17408. \f2\b \cf8 self
  17409. \f0\b0 \cf4 hideKeyboard:
  17410. \f2\b \cf8 YES
  17411. \f0\b0 \cf4 ];\
  17412. \
  17413. \f2\b \cf8 self
  17414. \f0\b0 \cf4 .chatPerson.talkTime = [NSNumber numberWithInt:[p.content intValue]];\
  17415. _disableSay = [
  17416. \f2\b \cf8 self
  17417. \f0\b0 \cf4 .chatPerson.talkTime longLongValue];\
  17418. \
  17419. \
  17420. \cf2 // memberData *data = [self.room getMember:g_myself.userId];\cf4 \
  17421. \cf2 // if ([data.role intValue] == 1 || [data.role intValue] == 2) \{\cf4 \
  17422. \cf2 // _isAdmin = YES;\cf4 \
  17423. \cf2 // \}else \{\cf4 \
  17424. \cf2 // _isAdmin = NO;\cf4 \
  17425. \cf2 // \}\cf4 \
  17426. \
  17427. \f2\b \cf8 if
  17428. \f0\b0 \cf4 ([
  17429. \f2\b \cf8 self
  17430. \f0\b0 \cf4 .chatPerson.talkTime longLongValue] > \cf7 0\cf4 && !_isAdmin) \{\
  17431. _talkTimeLabel.text = Localized(\cf6 @"JX_TotalSilence"\cf4 );\
  17432. _shareMore.enabled =
  17433. \f2\b \cf8 NO
  17434. \f0\b0 \cf4 ;\
  17435. _recordBtnLeft.enabled =
  17436. \f2\b \cf8 NO
  17437. \f0\b0 \cf4 ;\
  17438. _btnFace.enabled =
  17439. \f2\b \cf8 NO
  17440. \f0\b0 \cf4 ;\
  17441. _messageText.userInteractionEnabled =
  17442. \f2\b \cf8 NO
  17443. \f0\b0 \cf4 ;\
  17444. _talkTimeLabel.hidden =
  17445. \f2\b \cf8 NO
  17446. \f0\b0 \cf4 ;\
  17447. _messageText.text =
  17448. \f2\b \cf8 nil
  17449. \f0\b0 \cf4 ;\
  17450. \}
  17451. \f2\b \cf8 else
  17452. \f0\b0 \cf4 \{\
  17453. _shareMore.enabled =
  17454. \f2\b \cf8 YES
  17455. \f0\b0 \cf4 ;\
  17456. _recordBtnLeft.enabled =
  17457. \f2\b \cf8 YES
  17458. \f0\b0 \cf4 ;\
  17459. _btnFace.enabled =
  17460. \f2\b \cf8 YES
  17461. \f0\b0 \cf4 ;\
  17462. _messageText.userInteractionEnabled =
  17463. \f2\b \cf8 YES
  17464. \f0\b0 \cf4 ;\
  17465. _talkTimeLabel.hidden =
  17466. \f2\b \cf8 YES
  17467. \f0\b0 \cf4 ;\
  17468. \}\
  17469. \cf2 // [self refresh:nil];\cf4 \
  17470. \}\
  17471. \f2\b \cf8 if
  17472. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_SetInvisible)\{\
  17473. JXUserObject *user = [[JXUserObject sharedInstance] getUserById:p.objectId];\
  17474. \
  17475. NSDictionary * groupDict = [user toDictionary];\
  17476. roomData * roomdata = [[roomData alloc] init];\
  17477. [roomdata getDataFromDict:groupDict];\
  17478. NSArray * allMem = [memberData fetchAllMembers:user.roomId];\
  17479. roomdata.members = [allMem mutableCopy];\
  17480. \
  17481. memberData *member = [roomdata getMember:p.toUserId];\
  17482. \f2\b \cf8 if
  17483. \f0\b0 \cf4 ([p.content intValue] == \cf7 1\cf4 ) \{\
  17484. [member updateRoleByUserId:[p.toUserId longLongValue] role:[NSNumber numberWithInt:\cf7 4\cf4 ]];\
  17485. \}
  17486. \f2\b \cf8 else
  17487. \f0\b0 \cf4 \{\
  17488. [member updateRoleByUserId:[p.toUserId longLongValue] role:[NSNumber numberWithInt:\cf7 3\cf4 ]];\
  17489. \}\
  17490. \f2\b \cf8 if
  17491. \f0\b0 \cf4 ([p.toUserId isEqualToString:MY_USER_ID]) \{\
  17492. \f2\b \cf8 if
  17493. \f0\b0 \cf4 ([p.content intValue] == \cf7 1\cf4 ) \{\
  17494. _talkTimeLabel.text = Localized(\cf6 @"JX_ProhibitToSpeak"\cf4 );\
  17495. _messageText.userInteractionEnabled =
  17496. \f2\b \cf8 NO
  17497. \f0\b0 \cf4 ;\
  17498. _shareMore.enabled =
  17499. \f2\b \cf8 NO
  17500. \f0\b0 \cf4 ;\
  17501. _recordBtnLeft.enabled =
  17502. \f2\b \cf8 NO
  17503. \f0\b0 \cf4 ;\
  17504. _btnFace.enabled =
  17505. \f2\b \cf8 NO
  17506. \f0\b0 \cf4 ;\
  17507. _talkTimeLabel.hidden =
  17508. \f2\b \cf8 NO
  17509. \f0\b0 \cf4 ;\
  17510. _messageText.text =
  17511. \f2\b \cf8 nil
  17512. \f0\b0 \cf4 ;\
  17513. member.role = [NSNumber numberWithInt:\cf7 4\cf4 ];\
  17514. \}
  17515. \f2\b \cf8 else
  17516. \f0\b0 \cf4 \{\
  17517. _talkTimeLabel.hidden =
  17518. \f2\b \cf8 YES
  17519. \f0\b0 \cf4 ;\
  17520. _shareMore.enabled =
  17521. \f2\b \cf8 YES
  17522. \f0\b0 \cf4 ;\
  17523. _recordBtnLeft.enabled =
  17524. \f2\b \cf8 YES
  17525. \f0\b0 \cf4 ;\
  17526. _btnFace.enabled =
  17527. \f2\b \cf8 YES
  17528. \f0\b0 \cf4 ;\
  17529. _messageText.userInteractionEnabled =
  17530. \f2\b \cf8 YES
  17531. \f0\b0 \cf4 ;\
  17532. member.role = [NSNumber numberWithInt:\cf7 3\cf4 ];\
  17533. \}\
  17534. [member updateRole];\
  17535. _room = roomdata;\
  17536. \}\
  17537. \}\
  17538. \f2\b \cf8 if
  17539. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomTransfer)\{\
  17540. \f2\b \cf8 if
  17541. \f0\b0 \cf4 ([p.fromUserId isEqualToString:MY_USER_ID] || [p.toUserId isEqualToString:MY_USER_ID]) \{\
  17542. \
  17543. \f2\b \cf8 if
  17544. \f0\b0 \cf4 ([p.fromUserId isEqualToString:MY_USER_ID]) \{\
  17545. _isAdmin =
  17546. \f2\b \cf8 NO
  17547. \f0\b0 \cf4 ;\
  17548. \}
  17549. \f2\b \cf8 else
  17550. \f0\b0 \cf4 \{\
  17551. _isAdmin =
  17552. \f2\b \cf8 YES
  17553. \f0\b0 \cf4 ;\
  17554. \}\
  17555. \
  17556. [
  17557. \f2\b \cf8 self
  17558. \f0\b0 \cf4 refresh:
  17559. \f2\b \cf8 nil
  17560. \f0\b0 \cf4 ];\
  17561. \}\
  17562. \}\
  17563. \
  17564. \f2\b \cf8 if
  17565. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomDisable) \{\
  17566. \f2\b \cf8 if
  17567. \f0\b0 \cf4 ([p.content integerValue] != \cf7 1\cf4 ) \{\
  17568. \f2\b \cf8 self
  17569. \f0\b0 \cf4 .isDisable =
  17570. \f2\b \cf8 YES
  17571. \f0\b0 \cf4 ;\
  17572. \}
  17573. \f2\b \cf8 else
  17574. \f0\b0 \cf4 \{\
  17575. \f2\b \cf8 self
  17576. \f0\b0 \cf4 .isDisable =
  17577. \f2\b \cf8 NO
  17578. \f0\b0 \cf4 ;\
  17579. \}\
  17580. \}\
  17581. \
  17582. \f2\b \cf8 if
  17583. \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_SetRecordTimeOut) \{\
  17584. \f2\b \cf8 if
  17585. \f0\b0 \cf4 ([p.objectId isEqualToString:
  17586. \f2\b \cf8 self
  17587. \f0\b0 \cf4 .roomJid]) \{\
  17588. \f2\b \cf8 self
  17589. \f0\b0 \cf4 .chatPerson.chatRecordTimeOut = p.content;\
  17590. [
  17591. \f2\b \cf8 self
  17592. \f0\b0 \cf4 .chatPerson updateUserChatRecordTimeOut];\
  17593. \}\
  17594. \}\
  17595. \
  17596. \cf2 //
  17597. \f1 \'c8\'ba\'c4\'da\'cc\'df\'c8\'cb\'a3\'ac\'c9\'be\'b3\'fd\'cb\'f9\'d3\'d0\'cf\'fb\'cf\'a2
  17598. \f0 \cf4 \
  17599. \f2\b \cf8 if
  17600. \f0\b0 \cf4 ([p.type integerValue] == kRoomRemind_RoomDeleteMsg) \{\
  17601. \cf2 // printf(<#const char *, ...#>)\cf4 \
  17602. \}\
  17603. \
  17604. \cf2 //
  17605. \f1 \'c8\'ba\'d7\'e9\'cf\'d4\'ca\'be\'cd\'b7\'cf\'ce
  17606. \f0 \cf4 \
  17607. \cf2 // if ([p.type integerValue] == kRoomRemind_RoomIsOpenIntegral) \{\cf4 \
  17608. \cf2 // if ([p.content intValue] == 0) \{\cf4 \
  17609. \cf2 // self.isOpenIntegral = NO;\cf4 \
  17610. \cf2 // \}else\{\cf4 \
  17611. \cf2 // self.isOpenIntegral = YES;\cf4 \
  17612. \cf2 // \}\cf4 \
  17613. \cf2 // // [self refresh:nil];\cf4 \
  17614. \cf2 // [_table reloadData];\cf4 \
  17615. \cf2 // \}\cf4 \
  17616. \
  17617. \cf2 //
  17618. \f1 \'c8\'ba\'d7\'e9\'cf\'fb\'cf\'a2\'b7\'c0\'b2\'e2\'bb\'d8
  17619. \f0 \cf4 \
  17620. \f2\b \cf8 if
  17621. \f0\b0 \cf4 ([p.type integerValue] == kRoomRemind_RoomIsAttritionRecall) \{\
  17622. \f2\b \cf8 if
  17623. \f0\b0 \cf4 ([p.content intValue] == \cf7 0\cf4 ) \{\
  17624. \f2\b \cf8 self
  17625. \f0\b0 \cf4 .isOpenIntegral =
  17626. \f2\b \cf8 NO
  17627. \f0\b0 \cf4 ;\
  17628. \}
  17629. \f2\b \cf8 else
  17630. \f0\b0 \cf4 \{\
  17631. \f2\b \cf8 self
  17632. \f0\b0 \cf4 .isOpenIntegral =
  17633. \f2\b \cf8 YES
  17634. \f0\b0 \cf4 ;\
  17635. \}\
  17636. \}\
  17637. \
  17638. \cf2 //
  17639. \f1 \'d7\'ee\'d0\'c2\'b9\'ab\'b8\'e6
  17640. \f0 \cf4 \
  17641. \f2\b \cf8 if
  17642. \f0\b0 \cf4 ([p.type integerValue] == kRoomRemind_editNotice) \{\
  17643. \cf2 // NSArray *noticeArr = [p.content componentsSeparatedByString:Localized(@"JXMessageObject_AddNewAdv")];\cf4 \
  17644. [
  17645. \f2\b \cf8 self
  17646. \f0\b0 \cf4 setupNoticeWithContent:p.content time:[NSString stringWithFormat:\cf6 @"%lf"\cf4 ,[[NSDate date] timeIntervalSince1970]]];\
  17647. [
  17648. \f2\b \cf8 self
  17649. \f0\b0 \cf4 showLatestBroadcastTitle:\cf6 @"
  17650. \f1 \'d7\'ee\'d0\'c2\'b9\'ab\'b8\'e6
  17651. \f0 "\cf4 message:p.content];\
  17652. \}\
  17653. \
  17654. \}\
  17655. \}\
  17656. \
  17657. \cf2 //
  17658. \f1 \'c8\'ba\'bb\'ee\'b6\'af\'cf\'fb\'cf\'a2
  17659. \f0 \cf4 \
  17660. - (
  17661. \f2\b \cf8 void
  17662. \f0\b0 \cf4 )\cf11 roomGroupActivityRefresh\cf4 :(NSNotification *)notifacation \{\
  17663. JLGroupActivityModel *model = (JLGroupActivityModel *)notifacation.object;\
  17664. _activityModel = model;\
  17665. \
  17666. \cf2 //
  17667. \f1 \'b7\'c0\'b3\'b7\'bb\'d8\'d0\'de\'b8\'c4
  17668. \f0 \cf4 \
  17669. [_container dismiss];\
  17670. \cf2 /**/\cf4 \
  17671. \f2\b \cf8 if
  17672. \f0\b0 \cf4 ([model.roomJid isEqualToString:
  17673. \f2\b \cf8 self
  17674. \f0\b0 \cf4 .roomJid]) \{\
  17675. \f2\b \cf8 if
  17676. \f0\b0 \cf4 (model.type == \cf7 1\cf4 ) \{\
  17677. JXLabelObject *obj = [JXLabelObject sharedInstance];\
  17678. obj.roomJid =
  17679. \f2\b \cf8 self
  17680. \f0\b0 \cf4 .roomJid;\
  17681. NSString *groupAnnouncement =
  17682. \f2\b \cf8 nil
  17683. \f0\b0 \cf4 ;\
  17684. NSString *selectItem = [obj fetchGroupAnnouncementSelectItemFromLocal];\
  17685. NSArray *response = [
  17686. \f2\b \cf8 self
  17687. \f0\b0 \cf4 dictionaryWithJsonString: model.content];\
  17688. NSMutableArray *modelArray = [NSMutableArray array];\
  17689. \f2\b \cf8 for
  17690. \f0\b0 \cf4 (NSDictionary *dict
  17691. \f2\b \cf8 in
  17692. \f0\b0 \cf4 response) \{\
  17693. [JLSelectModel mj_setupObjectClassInArray:^NSDictionary *\{\
  17694. \f2\b \cf8 return
  17695. \f0\b0 \cf4 \cf7 @\{\cf4 \
  17696. \cf6 @"data"\cf4 : \cf6 @"JLSelectItemModel"\cf4 \
  17697. \cf7 \}\cf4 ;\
  17698. \}];\
  17699. JLSelectModel *model = [JLSelectModel mj_objectWithKeyValues:dict];\
  17700. [modelArray addObject:model];\
  17701. \}\
  17702. \cf2 //
  17703. \f1 \'b2\'f0\'b7\'d6
  17704. \f0 \cf4 \
  17705. \f2\b \cf8 if
  17706. \f0\b0 \cf4 (selectItem) \{\
  17707. NSArray *temp = [selectItem componentsSeparatedByString:\cf6 @"-"\cf4 ];\
  17708. NSString *first = temp.firstObject;\
  17709. NSString *last = temp.lastObject;\
  17710. \
  17711. \f2\b \cf8 for
  17712. \f0\b0 \cf4 (JLSelectModel *model
  17713. \f2\b \cf8 in
  17714. \f0\b0 \cf4 modelArray) \{\
  17715. \f2\b \cf8 if
  17716. \f0\b0 \cf4 ([model.name isEqualToString:first]) \{\
  17717. \f2\b \cf8 for
  17718. \f0\b0 \cf4 (JLSelectItemModel *selectItemModel
  17719. \f2\b \cf8 in
  17720. \f0\b0 \cf4 model.data) \{\
  17721. \f2\b \cf8 if
  17722. \f0\b0 \cf4 ([selectItemModel.subName isEqualToString:last]) \{\
  17723. groupAnnouncement = selectItemModel.content;\
  17724. \cf2 // _leftLabel2.text = groupAnnouncement;\cf4 \
  17725. \
  17726. [_showTopView.caizongBtn setTitle:selectItemModel.subName forState:UIControlStateNormal];\
  17727. _showTopView.selectItemModel=selectItemModel;\
  17728. \}\
  17729. \}\
  17730. \}\
  17731. \
  17732. \}\
  17733. \
  17734. \}\
  17735. \
  17736. \
  17737. _noticeView2.hidden =
  17738. \f2\b \cf8 NO
  17739. \f0\b0 \cf4 ;\
  17740. \}\
  17741. \f2\b \cf8 if
  17742. \f0\b0 \cf4 (model.type == \cf7 0\cf4 ) \{\
  17743. \cf2 //
  17744. \f1 \'b5\'da\'d2\'bb\'b4\'ce\'c9\'e8\'d6\'c3
  17745. \f0 \cf4 \
  17746. \f2\b \cf8 if
  17747. \f0\b0 \cf4 ([g_default boolForKey:kLongComePushIsFirstSetUp] != \cf7 1\cf4 )\{\
  17748. [
  17749. \f2\b \cf8 self
  17750. \f0\b0 \cf4 showAdAlertViewImageString:\cf6 @"ad_long.gif"\cf4 linkUrl:model.link audio:\cf6 @"houjiao.mp3"\cf4 duration:\cf7 4\cf4 content:model.content showCancelButton:
  17751. \f2\b \cf8 NO
  17752. \f0\b0 \cf4 type:(DYAdModelTypeLongAnimation) success:
  17753. \f2\b \cf8 NO
  17754. \f0\b0 \cf4 ];\
  17755. \}
  17756. \f2\b \cf8 else
  17757. \f0\b0 \cf4 \{\
  17758. \f2\b \cf8 if
  17759. \f0\b0 \cf4 ([g_default boolForKey:kLongComePush] == \cf7 0\cf4 )\{\
  17760. [
  17761. \f2\b \cf8 self
  17762. \f0\b0 \cf4 showAdAlertViewImageString:\cf6 @"ad_long.gif"\cf4 linkUrl:model.link audio:\cf6 @"houjiao.mp3"\cf4 duration:\cf7 4\cf4 content:model.content showCancelButton:
  17763. \f2\b \cf8 NO
  17764. \f0\b0 \cf4 type:(DYAdModelTypeLongAnimation) success:
  17765. \f2\b \cf8 NO
  17766. \f0\b0 \cf4 ];\
  17767. \}\
  17768. \}\
  17769. \
  17770. \
  17771. \}\
  17772. \f2\b \cf8 if
  17773. \f0\b0 \cf4 (model.type == \cf7 3\cf4 ) \{\
  17774. [
  17775. \f2\b \cf8 self
  17776. \f0\b0 \cf4 showAdAlertViewImageString:\cf6 @"ad_treasureBox.png"\cf4 linkUrl:
  17777. \f2\b \cf8 nil
  17778. \f0\b0 \cf4 audio:
  17779. \f2\b \cf8 nil
  17780. \f0\b0 \cf4 duration:\cf7 0\cf4 content:\cf6 @"
  17781. \f1 \'b9\'a7\'cf\'b2\'c4\'fa\'bb\'f1\'b5\'c3\'d2\'bb\'b8\'f6\'b1\'a6\'cf\'e4
  17782. \f0 !"\cf4 showCancelButton:
  17783. \f2\b \cf8 YES
  17784. \f0\b0 \cf4 type:(DYAdModelTypeGiftOpen) success:
  17785. \f2\b \cf8 NO
  17786. \f0\b0 \cf4 ];\
  17787. \}\
  17788. \}\
  17789. \}\
  17790. \
  17791. \cf2 //
  17792. \f1 \'c8\'ba\'cd\'b7\'cf\'ce\'bf\'aa\'b9\'d8\'bf\'d8\'d6\'c6
  17793. \f0 \cf4 \
  17794. - (
  17795. \f2\b \cf8 void
  17796. \f0\b0 \cf4 )\cf11 roomIsOpenIntegral\cf4 :(NSNotification *)notifacation \{\
  17797. NSString* p = (NSString *)notifacation.object;\
  17798. \
  17799. \f2\b \cf8 if
  17800. \f0\b0 \cf4 ([p intValue] == \cf7 0\cf4 ) \{\
  17801. \f2\b \cf8 self
  17802. \f0\b0 \cf4 .isOpenIntegral =
  17803. \f2\b \cf8 NO
  17804. \f0\b0 \cf4 ;\
  17805. \}
  17806. \f2\b \cf8 else
  17807. \f0\b0 \cf4 \{\
  17808. \f2\b \cf8 self
  17809. \f0\b0 \cf4 .isOpenIntegral =
  17810. \f2\b \cf8 YES
  17811. \f0\b0 \cf4 ;\
  17812. \}\
  17813. [
  17814. \f2\b \cf8 self
  17815. \f0\b0 \cf4 refresh:
  17816. \f2\b \cf8 nil
  17817. \f0\b0 \cf4 ];\
  17818. [_table reloadData];\
  17819. \}\
  17820. \
  17821. \cf2 //
  17822. \f1 \'c8\'ba\'d7\'e9\'cf\'fb\'cf\'a2\'b7\'c0\'b2\'e2\'bb\'d8
  17823. \f0 \cf4 \
  17824. - (
  17825. \f2\b \cf8 void
  17826. \f0\b0 \cf4 )\cf11 roomIsisAttritionRecall\cf4 :(NSNotification *)notifacation \{\
  17827. NSString* p = (NSString *)notifacation.object;\
  17828. \cf2 //
  17829. \f1 \'c8\'ba\'d7\'e9\'cf\'fb\'cf\'a2\'b7\'c0\'b2\'e2\'bb\'d8
  17830. \f0 \cf4 \
  17831. \f2\b \cf8 if
  17832. \f0\b0 \cf4 ([p intValue] == \cf7 0\cf4 ) \{\
  17833. \f2\b \cf8 self
  17834. \f0\b0 \cf4 .isAttritionRecall =
  17835. \f2\b \cf8 NO
  17836. \f0\b0 \cf4 ;\
  17837. \}
  17838. \f2\b \cf8 else
  17839. \f0\b0 \cf4 \{\
  17840. \f2\b \cf8 self
  17841. \f0\b0 \cf4 .isAttritionRecall =
  17842. \f2\b \cf8 YES
  17843. \f0\b0 \cf4 ;\
  17844. \}\
  17845. \cf2 // [g_server roomGetRoom:self.roomId toView:self];\cf4 \
  17846. [
  17847. \f2\b \cf8 self
  17848. \f0\b0 \cf4 refresh:
  17849. \f2\b \cf8 nil
  17850. \f0\b0 \cf4 ];\
  17851. \}\
  17852. \
  17853. -(
  17854. \f2\b \cf8 BOOL
  17855. \f0\b0 \cf4 )\cf11 showDisableSay\cf4 \{\
  17856. \
  17857. memberData *data = [
  17858. \f2\b \cf8 self
  17859. \f0\b0 \cf4 .room getMember:g_myself.userId];\
  17860. \cf2 // if([[NSDate date] timeIntervalSince1970] <= _disableSay && [data.role intValue] != 1)\{\cf4 \
  17861. \f2\b \cf8 if
  17862. \f0\b0 \cf4 ([[NSDate date] timeIntervalSince1970] <= _disableSay && !_isAdmin)\{\
  17863. NSString* s = [TimeUtil formatDate:[NSDate dateWithTimeIntervalSince1970:_disableSay] format:\cf6 @"yyyy-MM-dd HH:mm"\cf4 ];\
  17864. [g_App showAlert:[NSString stringWithFormat:\cf6 @"%@%@"\cf4 ,s,Localized(\cf6 @"JXChatVC_GagTime"\cf4 )]];\
  17865. [
  17866. \f2\b \cf8 self
  17867. \f0\b0 \cf4 hideKeyboard:
  17868. \f2\b \cf8 NO
  17869. \f0\b0 \cf4 ];\
  17870. \f2\b \cf8 return
  17871. \f0\b0 \cf4
  17872. \f2\b \cf8 YES
  17873. \f0\b0 \cf4 ;\
  17874. \}\
  17875. \f2\b \cf8 return
  17876. \f0\b0 \cf4
  17877. \f2\b \cf8 NO
  17878. \f0\b0 \cf4 ;\
  17879. \}\
  17880. \
  17881. -(
  17882. \f2\b \cf8 void
  17883. \f0\b0 \cf4 )\cf11 onLocation\cf4 \{\
  17884. [
  17885. \f2\b \cf8 self
  17886. \f0\b0 \cf4 hideKeyboard:
  17887. \f2\b \cf8 YES
  17888. \f0\b0 \cf4 ];\
  17889. \f2\b \cf8 if
  17890. \f0\b0 \cf4 ([CLLocationManager locationServicesEnabled] && ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorizedWhenInUse || [CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined || [CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized)) \{\
  17891. \cf2 //
  17892. \f1 \'b6\'a8\'ce\'bb\'b9\'a6\'c4\'dc\'bf\'c9\'d3\'c3
  17893. \f0 \cf4 \
  17894. \f2\b \cf8 if
  17895. \f0\b0 \cf4 ([
  17896. \f2\b \cf8 self
  17897. \f0\b0 \cf4 showDisableSay])\
  17898. \f2\b \cf8 return
  17899. \f0\b0 \cf4 ;\
  17900. \f2\b \cf8 if
  17901. \f0\b0 \cf4 ([
  17902. \f2\b \cf8 self
  17903. \f0\b0 \cf4 sendMsgCheck])\{\
  17904. \f2\b \cf8 return
  17905. \f0\b0 \cf4 ;\
  17906. \}\
  17907. \
  17908. \f2\b \cf8 if
  17909. \f0\b0 \cf4 (g_server.latitude <= \cf7 0\cf4 && g_server.longitude <= \cf7 0\cf4 ) \{\
  17910. g_server.latitude = \cf7 22.6\cf4 ;\
  17911. g_server.longitude = \cf7 114.04\cf4 ;\
  17912. \}\
  17913. \
  17914. \f2\b \cf8 if
  17915. \f0\b0 \cf4 (g_config.isChina) \{\
  17916. _locVC = [JXLocationVC alloc];\
  17917. _locVC.isSend =
  17918. \f2\b \cf8 YES
  17919. \f0\b0 \cf4 ;\
  17920. _locVC.locationType = JXLocationTypeCurrentLocation;\
  17921. _locVC.delegate =
  17922. \f2\b \cf8 self
  17923. \f0\b0 \cf4 ;\
  17924. _locVC.didSelect =
  17925. \f2\b \cf8 @selector
  17926. \f0\b0 \cf4 (onSelLocation:);\
  17927. \cf2 // self.locationVC.locations = [[NSMutableArray alloc]init];\cf4 \
  17928. \
  17929. \cf2 // JXMapData* p = [[JXMapData alloc]init];\cf4 \
  17930. \cf2 // p.latitude = [NSString stringWithFormat:@"%f",g_server.latitude];\cf4 \
  17931. \cf2 // p.longitude = [NSString stringWithFormat:@"%f",g_server.longitude];\cf4 \
  17932. \cf2 // p.title = g_server.locationCity;\cf4 \
  17933. \cf2 // p.subtitle = g_server.locationAddress;\cf4 \
  17934. \cf2 // [self.locationVC.locations addObject:p];\cf4 \
  17935. \cf2 // [p release];\cf4 \
  17936. \
  17937. _locVC = [_locVC init];\
  17938. \cf2 // self.locationVC.locY = g_server.latitude;\cf4 \
  17939. \cf2 // self.locationVC.locX = g_server.longitude;\cf4 \
  17940. \cf2 // [g_window addSubview:_locVC.view];\cf4 \
  17941. [g_navigation pushViewController:_locVC animated:
  17942. \f2\b \cf8 YES
  17943. \f0\b0 \cf4 ];\
  17944. \}
  17945. \f2\b \cf8 else
  17946. \f0\b0 \cf4 \{\
  17947. _gooMap = [JXGoogleMapVC alloc];\
  17948. _gooMap.isSend =
  17949. \f2\b \cf8 YES
  17950. \f0\b0 \cf4 ;\
  17951. _gooMap.delegate =
  17952. \f2\b \cf8 self
  17953. \f0\b0 \cf4 ;\
  17954. _gooMap.locationType = JXGooLocationTypeCurrentLocation;\
  17955. _gooMap.didSelect =
  17956. \f2\b \cf8 @selector
  17957. \f0\b0 \cf4 (onSelLocation:);\
  17958. \
  17959. _gooMap = [_gooMap init];\
  17960. [g_navigation pushViewController:_gooMap animated:
  17961. \f2\b \cf8 YES
  17962. \f0\b0 \cf4 ];\
  17963. \}\
  17964. \
  17965. \}
  17966. \f2\b \cf8 else
  17967. \f0\b0 \cf4
  17968. \f2\b \cf8 if
  17969. \f0\b0 \cf4 ([CLLocationManager authorizationStatus] ==kCLAuthorizationStatusDenied) \{\
  17970. \cf2 //
  17971. \f1 \'b6\'a8\'ce\'bb\'b2\'bb\'c4\'dc\'d3\'c3
  17972. \f0 \cf4 \
  17973. [g_App showAlert:[NSString stringWithFormat:Localized(\cf6 @"JX_NoLocationPermissions"\cf4 ),APP_NAME]];\
  17974. \}\
  17975. \
  17976. \}\
  17977. \
  17978. \
  17979. -(
  17980. \f2\b \cf8 void
  17981. \f0\b0 \cf4 )\cf11 onSelLocation\cf4 :(JXMapData*)location\{\
  17982. \f2\b \cf8 if
  17983. \f0\b0 \cf4 (_isGroupSendCancel) \{\
  17984. \f2\b \cf8 return
  17985. \f0\b0 \cf4 ;\
  17986. \}\
  17987. \cf2 //
  17988. \f1 \'c9\'cf\'b4\'ab\'cd\'bc\'c6\'ac
  17989. \f0 \cf4 \
  17990. \f2\b \cf8 if
  17991. \f0\b0 \cf4 (location.imageUrl) \{\
  17992. \f2\b \cf8 self
  17993. \f0\b0 \cf4 .isMapMsg =
  17994. \f2\b \cf8 YES
  17995. \f0\b0 \cf4 ;\
  17996. \f2\b \cf8 self
  17997. \f0\b0 \cf4 .mapData = location;\
  17998. \f2\b \cf8 if
  17999. \f0\b0 \cf4 (
  18000. \f2\b \cf8 self
  18001. \f0\b0 \cf4 .isGroupMessages) \{\
  18002. \f2\b \cf8 if
  18003. \f0\b0 \cf4 (!
  18004. \f2\b \cf8 self
  18005. \f0\b0 \cf4 .waitGroupSendView) \{\
  18006. [
  18007. \f2\b \cf8 self
  18008. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_location];\
  18009. _onceSendNum = \cf7 10\cf4 ;\
  18010. \}\
  18011. \}\
  18012. [g_server uploadFile:location.imageUrl validTime:
  18013. \f2\b \cf8 self
  18014. \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:
  18015. \f2\b \cf8 nil
  18016. \f0\b0 \cf4 toView:
  18017. \f2\b \cf8 self
  18018. \f0\b0 \cf4 ];\
  18019. \}\
  18020. \}\
  18021. \
  18022. \cf2 //- (void)groupSendLocation:(NSMutableArray *)msgArray\{\cf4 \
  18023. \cf2 // NSDictionary *p = msgArray.lastObject;\cf4 \
  18024. \cf2 // if (_isGroupSendCancel) \{\cf4 \
  18025. \cf2 // return;\cf4 \
  18026. \cf2 // \}\cf4 \
  18027. \cf2 // NSString *userId = self.userIds[self.groupMessagesIndex];\cf4 \
  18028. \cf2 //\cf4 \
  18029. \cf2 // NSString* msgId = [dict objectForKey:@"oUrl"];\cf4 \
  18030. \cf2 // msgId = [[msgId lastPathComponent] stringByDeletingPathExtension];\cf4 \
  18031. \cf2 // NSString* oFileName = [dict objectForKey:@"oFileName"];\cf4 \
  18032. \cf2 //\cf4 \
  18033. \cf2 // // NSString *userId = self.userIds[self.groupMessagesIndex];\cf4 \
  18034. \cf2 // // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
  18035. \cf2 //\cf4 \
  18036. \cf2 // JXMessageObject* p=nil;\cf4 \
  18037. \cf2 // int found=-1;\cf4 \
  18038. \cf2 // for(int i=(int)[_array count]-1;i>=0;i--)\{\cf4 \
  18039. \cf2 // p = [_array objectAtIndex:i];\cf4 \
  18040. \cf2 // if([p.type intValue]==kWCMessageTypeLocation)\cf4 \
  18041. \cf2 // if([[p.fileName lastPathComponent] isEqualToString:[oFileName lastPathComponent]])\{\cf4 \
  18042. \cf2 // found = i;\cf4 \
  18043. \cf2 // break;\cf4 \
  18044. \cf2 // \}\cf4 \
  18045. \cf2 // if([p.type intValue]==kWCMessageTypeFile && ![p.isUpload boolValue])\cf4 \
  18046. \cf2 // if([[p.fileName lastPathComponent] isEqualToString:[oFileName lastPathComponent]])\{\cf4 \
  18047. \cf2 // found = i;\cf4 \
  18048. \cf2 // break;\cf4 \
  18049. \cf2 // \}\cf4 \
  18050. \cf2 // if (p.content.length > 0) \{\cf4 \
  18051. \cf2 // if ([oFileName rangeOfString:p.content].location != NSNotFound) \{\cf4 \
  18052. \cf2 // found = i;\cf4 \
  18053. \cf2 // break;\cf4 \
  18054. \cf2 // \}\cf4 \
  18055. \cf2 // \}\cf4 \
  18056. \cf2 // // if([p.content isEqualToString:msgId])\{\cf4 \
  18057. \cf2 // // found = i;\cf4 \
  18058. \cf2 // // break;\cf4 \
  18059. \cf2 // // \}\cf4 \
  18060. \cf2 // p = nil;\cf4 \
  18061. \cf2 // \}\cf4 \
  18062. \cf2 // if(found>=0)\{//
  18063. \f1 \'d5\'d2\'b5\'bd\'cf\'fb\'cf\'a2\'cc\'e5
  18064. \f0 \cf4 \
  18065. \cf2 // if([[dict objectForKey:@"status"] intValue] != 1)\{\cf4 \
  18066. \cf2 // NSLog(@"doUploadFaire");\cf4 \
  18067. \cf2 // [p updateIsSend:transfer_status_no];\cf4 \
  18068. \cf2 // JXBaseChatCell* cell = [self getCell:found];\cf4 \
  18069. \cf2 // [cell drawIsSend];\cf4 \
  18070. \cf2 // cell = nil;\cf4 \
  18071. \cf2 // return;\cf4 \
  18072. \cf2 // \}\cf4 \
  18073. \cf2 // if (self.isGroupMessages) \{\cf4 \
  18074. \cf2 // p.isGroupSend = YES;\cf4 \
  18075. \cf2 // \}\cf4 \
  18076. \cf2 // NSLog(@"doSendAfterUpload");\cf4 \
  18077. \cf2 // p.content = [dict objectForKey:@"oUrl"];\cf4 \
  18078. \cf2 // // if (self.isGroupMessages) \{\cf4 \
  18079. \cf2 // // p.toUserId = userId;\cf4 \
  18080. \cf2 // // \}\cf4 \
  18081. \cf2 // [p updateIsUpload:YES];\cf4 \
  18082. \cf2 // [g_xmpp sendMessage:p roomName:self.roomJid];//
  18083. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  18084. \f0 \cf4 \
  18085. \cf2 // // [self.tableView reloadData];\cf4 \
  18086. \cf2 // \}\cf4 \
  18087. \cf2 //\cf4 \
  18088. \cf2 // p = nil;\cf4 \
  18089. \cf2 // self.groupMessagesIndex ++;\cf4 \
  18090. \cf2 // if (self.groupMessagesIndex < self.userIds.count) \{\cf4 \
  18091. \cf2 // if (self.groupMessagesIndex % _onceSendNum == 0) \{\cf4 \
  18092. \cf2 // return;\cf4 \
  18093. \cf2 // \}else\{\cf4 \
  18094. \cf2 // [self collectionMsgSendAll:allArray];\cf4 \
  18095. \cf2 // \}\cf4 \
  18096. \cf2 // \}else if (self.userIds)\{\cf4 \
  18097. \cf2 // self.groupMessagesIndex = 0;\cf4 \
  18098. \cf2 // return;\cf4 \
  18099. \cf2 // \}\cf4 \
  18100. \cf2 // return;\cf4 \
  18101. \cf2 //\}\cf4 \
  18102. \
  18103. - (
  18104. \f2\b \cf8 void
  18105. \f0\b0 \cf4 )\cf11 sendMapMsgWithDict\cf4 :(NSDictionary *)dict \{\
  18106. NSString *userId =
  18107. \f2\b \cf8 self
  18108. \f0\b0 \cf4 .userIds[
  18109. \f2\b \cf8 self
  18110. \f0\b0 \cf4 .groupMessagesIndex];\
  18111. \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
  18112. \
  18113. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  18114. msg.timeSend = [NSDate date];\
  18115. msg.fromUserId = MY_USER_ID;\
  18116. msg.fromUserName = MY_USER_NAME;\
  18117. \f2\b \cf8 if
  18118. \f0\b0 \cf4 ([
  18119. \f2\b \cf8 self
  18120. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  18121. msg.toUserId =
  18122. \f2\b \cf8 self
  18123. \f0\b0 \cf4 .roomJid;\
  18124. msg.isGroup =
  18125. \f2\b \cf8 YES
  18126. \f0\b0 \cf4 ;\
  18127. msg.fromUserName = _userNickName;\
  18128. \}\
  18129. \f2\b \cf8 else
  18130. \f0\b0 \cf4 \{\
  18131. \f2\b \cf8 if
  18132. \f0\b0 \cf4 (
  18133. \f2\b \cf8 self
  18134. \f0\b0 \cf4 .isGroupMessages) \{\
  18135. msg.toUserId = userId;\
  18136. msg.isGroupSend =
  18137. \f2\b \cf8 YES
  18138. \f0\b0 \cf4 ;\
  18139. \f2\b \cf8 if
  18140. \f0\b0 \cf4 ((
  18141. \f2\b \cf8 self
  18142. \f0\b0 \cf4 .groupMessagesIndex+\cf7 1\cf4 ) % _onceSendNum == \cf7 0\cf4 ) \{\
  18143. msg.isLastGroupSend =
  18144. \f2\b \cf8 YES
  18145. \f0\b0 \cf4 ;\
  18146. \}\
  18147. \}
  18148. \f2\b \cf8 else
  18149. \f0\b0 \cf4 \{\
  18150. msg.toUserId = chatPerson.userId;\
  18151. \}\
  18152. msg.isGroup =
  18153. \f2\b \cf8 NO
  18154. \f0\b0 \cf4 ;\
  18155. \}\
  18156. msg.location_x = [NSNumber numberWithDouble:[
  18157. \f2\b \cf8 self
  18158. \f0\b0 \cf4 .mapData.latitude doubleValue]];\
  18159. msg.location_y = [NSNumber numberWithDouble:[
  18160. \f2\b \cf8 self
  18161. \f0\b0 \cf4 .mapData.longitude doubleValue]];\
  18162. msg.type = [NSNumber numberWithInt:kWCMessageTypeLocation];\
  18163. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  18164. msg.isRead = [NSNumber numberWithBool:
  18165. \f2\b \cf8 NO
  18166. \f0\b0 \cf4 ];\
  18167. \cf2 // msg.isUpload = [NSNumber numberWithBool:NO];\cf4 \
  18168. \cf2 // msg.content = [NSString stringWithFormat:@"%@",location.subtitle];\cf4 \
  18169. msg.objectId = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,
  18170. \f2\b \cf8 self
  18171. \f0\b0 \cf4 .mapData.subtitle];\
  18172. \
  18173. msg.isReadDel = [NSNumber numberWithInt:
  18174. \f2\b \cf8 NO
  18175. \f0\b0 \cf4 ];\
  18176. \
  18177. \cf2 //
  18178. \f1 \'c9\'cf\'b4\'ab\'cd\'bc\'c6\'ac
  18179. \f0 \cf4 \
  18180. \cf2 // if (location.imageUrl) \{\cf4 \
  18181. \cf2 // [g_server uploadFile:location.imageUrl toView:self];\cf4 \
  18182. \cf2 // msg.fileName = location.imageUrl;\cf4 \
  18183. \cf2 // \}else\{\cf4 \
  18184. msg.content = [dict objectForKey:\cf6 @"oUrl"\cf4 ];\
  18185. \cf2 // BOOL isShowGoo = [g_myself.isUseGoogleMap intValue] > 0 ? YES : NO;\cf4 \
  18186. \cf2 // if (isShowGoo) \{\cf4 \
  18187. \cf2 // msg.content = [[NSString stringWithFormat:@"\cf17 http://maps.googleapis.com/maps/api/staticmap?center=%@,%@&size=640x480&markers=color:blue%7Clabel:S%7C62.107733,-145.541936&zoom=15\cf2 ",location.latitude, location.longitude] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];\cf4 \
  18188. \cf2 // \} else \{\cf4 \
  18189. \cf2 // msg.content = [NSString stringWithFormat:@"\cf17 http://api.map.baidu.com/staticimage?width=640&height=480&center=%@,%@&zoom=15\cf2 ",location.longitude, location.latitude];\cf4 \
  18190. \cf2 // \}\cf4 \
  18191. msg.fileName = msg.content;\
  18192. [g_xmpp sendMessage:msg roomName:
  18193. \f2\b \cf8 self
  18194. \f0\b0 \cf4 .roomJid];\cf2 //
  18195. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  18196. \f0 \cf4 \
  18197. \cf2 // \}\cf4 \
  18198. [msg insert:
  18199. \f2\b \cf8 self
  18200. \f0\b0 \cf4 .roomJid];\
  18201. [
  18202. \f2\b \cf8 self
  18203. \f0\b0 \cf4 showOneMsg:msg];\
  18204. \
  18205. \f2\b \cf8 if
  18206. \f0\b0 \cf4 (
  18207. \f2\b \cf8 self
  18208. \f0\b0 \cf4 .isGroupMessages) \{\
  18209. \f2\b \cf8 self
  18210. \f0\b0 \cf4 .groupMessagesIndex ++;\
  18211. \f2\b \cf8 if
  18212. \f0\b0 \cf4 (
  18213. \f2\b \cf8 self
  18214. \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
  18215. \f2\b \cf8 return
  18216. \f0\b0 \cf4 ;\
  18217. \}\
  18218. \f2\b \cf8 if
  18219. \f0\b0 \cf4 (
  18220. \f2\b \cf8 self
  18221. \f0\b0 \cf4 .groupMessagesIndex <
  18222. \f2\b \cf8 self
  18223. \f0\b0 \cf4 .userIds.count) \{\
  18224. [
  18225. \f2\b \cf8 self
  18226. \f0\b0 \cf4 onSelLocation:
  18227. \f2\b \cf8 self
  18228. \f0\b0 \cf4 .mapData];\
  18229. \}
  18230. \f2\b \cf8 else
  18231. \f0\b0 \cf4
  18232. \f2\b \cf8 if
  18233. \f0\b0 \cf4 (
  18234. \f2\b \cf8 self
  18235. \f0\b0 \cf4 .userIds)\{\
  18236. \f2\b \cf8 self
  18237. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  18238. \f2\b \cf8 return
  18239. \f0\b0 \cf4 ;\
  18240. \}\
  18241. \f2\b \cf8 return
  18242. \f0\b0 \cf4 ;\
  18243. \}\
  18244. \f2\b \cf8 self
  18245. \f0\b0 \cf4 .isMapMsg =
  18246. \f2\b \cf8 NO
  18247. \f0\b0 \cf4 ;\
  18248. \}\
  18249. \
  18250. -(
  18251. \f2\b \cf8 void
  18252. \f0\b0 \cf4 )\cf11 onCard\cf4 \{\
  18253. \
  18254. [
  18255. \f2\b \cf8 self
  18256. \f0\b0 \cf4 hideKeyboard:
  18257. \f2\b \cf8 YES
  18258. \f0\b0 \cf4 ];\
  18259. \f2\b \cf8 if
  18260. \f0\b0 \cf4 (
  18261. \f2\b \cf8 self
  18262. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 && ![
  18263. \f2\b \cf8 self
  18264. \f0\b0 \cf4 .chatPerson.allowSendCard boolValue] && !_isAdmin) \{\
  18265. [g_App showAlert:Localized(\cf6 @"JX_GroupDisableSendCard"\cf4 )];\
  18266. \f2\b \cf8 return
  18267. \f0\b0 \cf4 ;\
  18268. \}\
  18269. \
  18270. \f2\b \cf8 if
  18271. \f0\b0 \cf4 ([
  18272. \f2\b \cf8 self
  18273. \f0\b0 \cf4 showDisableSay])\
  18274. \f2\b \cf8 return
  18275. \f0\b0 \cf4 ;\
  18276. \f2\b \cf8 if
  18277. \f0\b0 \cf4 ([
  18278. \f2\b \cf8 self
  18279. \f0\b0 \cf4 sendMsgCheck])\{\
  18280. \f2\b \cf8 return
  18281. \f0\b0 \cf4 ;\
  18282. \}\
  18283. \
  18284. JXSelectFriendsVC* vc = [JXSelectFriendsVC alloc];\
  18285. vc.isNewRoom =
  18286. \f2\b \cf8 NO
  18287. \f0\b0 \cf4 ;\
  18288. vc.chatRoom =
  18289. \f2\b \cf8 nil
  18290. \f0\b0 \cf4 ;\
  18291. vc.room =
  18292. \f2\b \cf8 nil
  18293. \f0\b0 \cf4 ;\
  18294. vc.isShowMySelf =
  18295. \f2\b \cf8 YES
  18296. \f0\b0 \cf4 ;\
  18297. vc.delegate =
  18298. \f2\b \cf8 self
  18299. \f0\b0 \cf4 ;\
  18300. vc.didSelect =
  18301. \f2\b \cf8 @selector
  18302. \f0\b0 \cf4 (onAfterAddMember:);\
  18303. vc = [vc init];\
  18304. \cf2 // [g_window addSubview:vc.view];\cf4 \
  18305. [g_navigation pushViewController:vc animated:
  18306. \f2\b \cf8 YES
  18307. \f0\b0 \cf4 ];\
  18308. \
  18309. \}\
  18310. \
  18311. -(
  18312. \f2\b \cf8 void
  18313. \f0\b0 \cf4 )\cf11 onAfterAddMember\cf4 :(JXSelectFriendsVC*)vc\{\
  18314. \
  18315. NSString *userId =
  18316. \f2\b \cf8 self
  18317. \f0\b0 \cf4 .userIds[
  18318. \f2\b \cf8 self
  18319. \f0\b0 \cf4 .groupMessagesIndex];\
  18320. \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
  18321. \
  18322. \f2\b \cf8 if
  18323. \f0\b0 \cf4 (
  18324. \f2\b \cf8 self
  18325. \f0\b0 \cf4 .isGroupMessages) \{\
  18326. \f2\b \cf8 if
  18327. \f0\b0 \cf4 (_isGroupSendCancel) \{\
  18328. \f2\b \cf8 return
  18329. \f0\b0 \cf4 ;\
  18330. \}\
  18331. \f2\b \cf8 if
  18332. \f0\b0 \cf4 (
  18333. \f2\b \cf8 self
  18334. \f0\b0 \cf4 .groupMessagesIndex == \cf7 0\cf4 ) \{\
  18335. [
  18336. \f2\b \cf8 self
  18337. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:vc.set.count withType:groupsend_msgType_card];\
  18338. \f2\b \cf8 self
  18339. \f0\b0 \cf4 .groupSendMsgArray = [NSMutableArray arrayWithObject:vc];\
  18340. _onceSendNum = \cf7 20\cf4 ;\
  18341. \}\
  18342. \}\
  18343. NSInteger i = \cf7 0\cf4 ;\
  18344. \f2\b \cf8 BOOL
  18345. \f0\b0 \cf4 isLastGroupSend =
  18346. \f2\b \cf8 NO
  18347. \f0\b0 \cf4 ;\
  18348. \f2\b \cf8 for
  18349. \f0\b0 \cf4 (NSNumber* n
  18350. \f2\b \cf8 in
  18351. \f0\b0 \cf4 vc.set)\{\
  18352. i++;\
  18353. JXUserObject *user;\
  18354. \f2\b \cf8 if
  18355. \f0\b0 \cf4 (vc.seekTextField.text.length > \cf7 0\cf4 ) \{\
  18356. user = vc.searchArray[[n intValue] % \cf7 100000\cf4 -\cf7 1\cf4 ];\
  18357. \}
  18358. \f2\b \cf8 else
  18359. \f0\b0 \cf4 \{\
  18360. user = [[vc.letterResultArr objectAtIndex:[n intValue] / \cf7 100000\cf4 -\cf7 1\cf4 ] objectAtIndex:[n intValue] % \cf7 100000\cf4 -\cf7 1\cf4 ];\
  18361. \}\
  18362. \
  18363. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  18364. msg.timeSend = [NSDate date];\
  18365. msg.fromUserId = MY_USER_ID;\
  18366. \f2\b \cf8 if
  18367. \f0\b0 \cf4 ([
  18368. \f2\b \cf8 self
  18369. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  18370. msg.toUserId =
  18371. \f2\b \cf8 self
  18372. \f0\b0 \cf4 .roomJid;\
  18373. msg.isGroup =
  18374. \f2\b \cf8 YES
  18375. \f0\b0 \cf4 ;\
  18376. msg.fromUserName = _userNickName;\
  18377. \}\
  18378. \f2\b \cf8 else
  18379. \f0\b0 \cf4 \{\
  18380. \f2\b \cf8 if
  18381. \f0\b0 \cf4 (
  18382. \f2\b \cf8 self
  18383. \f0\b0 \cf4 .isGroupMessages) \{\
  18384. msg.toUserId = userId;\
  18385. msg.isGroupSend =
  18386. \f2\b \cf8 YES
  18387. \f0\b0 \cf4 ;\
  18388. \f2\b \cf8 if
  18389. \f0\b0 \cf4 ((
  18390. \f2\b \cf8 self
  18391. \f0\b0 \cf4 .groupMessagesIndex + \cf7 1\cf4 ) % _onceSendNum == \cf7 0\cf4 ) \{\
  18392. \f2\b \cf8 if
  18393. \f0\b0 \cf4 (i == vc.set.count) \{\
  18394. msg.isLastGroupSend =
  18395. \f2\b \cf8 YES
  18396. \f0\b0 \cf4 ;\
  18397. isLastGroupSend =
  18398. \f2\b \cf8 YES
  18399. \f0\b0 \cf4 ;\
  18400. \}\
  18401. \}\
  18402. \}
  18403. \f2\b \cf8 else
  18404. \f0\b0 \cf4 \{\
  18405. msg.toUserId = chatPerson.userId;\
  18406. \}\
  18407. msg.isGroup =
  18408. \f2\b \cf8 NO
  18409. \f0\b0 \cf4 ;\
  18410. \}\
  18411. msg.content = user.userNickname;\
  18412. msg.objectId = user.userId;\
  18413. msg.type = [NSNumber numberWithInt:kWCMessageTypeCard];\
  18414. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  18415. msg.isRead = [NSNumber numberWithBool:
  18416. \f2\b \cf8 NO
  18417. \f0\b0 \cf4 ];\
  18418. msg.isReadDel = [NSNumber numberWithInt:
  18419. \f2\b \cf8 NO
  18420. \f0\b0 \cf4 ];\
  18421. \
  18422. [msg insert:
  18423. \f2\b \cf8 self
  18424. \f0\b0 \cf4 .roomJid];\
  18425. [g_xmpp sendMessage:msg roomName:
  18426. \f2\b \cf8 self
  18427. \f0\b0 \cf4 .roomJid];\cf2 //
  18428. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  18429. \f0 \cf4 \
  18430. [
  18431. \f2\b \cf8 self
  18432. \f0\b0 \cf4 showOneMsg:msg];\
  18433. \cf2 // [msg release];\cf4 \
  18434. user =
  18435. \f2\b \cf8 nil
  18436. \f0\b0 \cf4 ;\
  18437. \}\
  18438. \
  18439. \f2\b \cf8 if
  18440. \f0\b0 \cf4 (
  18441. \f2\b \cf8 self
  18442. \f0\b0 \cf4 .isGroupMessages) \{\
  18443. \f2\b \cf8 self
  18444. \f0\b0 \cf4 .groupMessagesIndex ++;\
  18445. \f2\b \cf8 if
  18446. \f0\b0 \cf4 (isLastGroupSend) \{\
  18447. \f2\b \cf8 return
  18448. \f0\b0 \cf4 ;\
  18449. \}\
  18450. \f2\b \cf8 if
  18451. \f0\b0 \cf4 (
  18452. \f2\b \cf8 self
  18453. \f0\b0 \cf4 .groupMessagesIndex <
  18454. \f2\b \cf8 self
  18455. \f0\b0 \cf4 .userIds.count) \{\
  18456. [
  18457. \f2\b \cf8 self
  18458. \f0\b0 \cf4 onAfterAddMember:vc];\
  18459. \}
  18460. \f2\b \cf8 else
  18461. \f0\b0 \cf4
  18462. \f2\b \cf8 if
  18463. \f0\b0 \cf4 (
  18464. \f2\b \cf8 self
  18465. \f0\b0 \cf4 .userIds)\{\
  18466. \f2\b \cf8 self
  18467. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  18468. \f2\b \cf8 return
  18469. \f0\b0 \cf4 ;\
  18470. \}\
  18471. \f2\b \cf8 return
  18472. \f0\b0 \cf4 ;\
  18473. \}\
  18474. \}\
  18475. \
  18476. -(
  18477. \f2\b \cf8 void
  18478. \f0\b0 \cf4 )\cf11 sendFile\cf4 :(NSString*)file \cf11 userId\cf4 :(NSString *)userId\
  18479. \{\
  18480. \cf2 // NSString *userId = self.userIds[self.groupMessagesIndex];\cf4 \
  18481. \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
  18482. \
  18483. \f2\b \cf8 if
  18484. \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
  18485. JXMessageObject *msg=[[JXMessageObject alloc] init];\
  18486. msg.timeSend = [NSDate date];\
  18487. msg.fromUserId = MY_USER_ID;\
  18488. \f2\b \cf8 if
  18489. \f0\b0 \cf4 ([
  18490. \f2\b \cf8 self
  18491. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  18492. msg.toUserId =
  18493. \f2\b \cf8 self
  18494. \f0\b0 \cf4 .roomJid;\
  18495. msg.isGroup =
  18496. \f2\b \cf8 YES
  18497. \f0\b0 \cf4 ;\
  18498. msg.fromUserName = _userNickName;\
  18499. \}\
  18500. \f2\b \cf8 else
  18501. \f0\b0 \cf4 \{\
  18502. \f2\b \cf8 if
  18503. \f0\b0 \cf4 (
  18504. \f2\b \cf8 self
  18505. \f0\b0 \cf4 .isGroupMessages) \{\
  18506. msg.toUserId = userId;\
  18507. \}
  18508. \f2\b \cf8 else
  18509. \f0\b0 \cf4 \{\
  18510. msg.toUserId = chatPerson.userId;\
  18511. \}\
  18512. msg.isGroup =
  18513. \f2\b \cf8 NO
  18514. \f0\b0 \cf4 ;\
  18515. \}\
  18516. msg.fileName = file;\
  18517. msg.content = file;\
  18518. msg.type = [NSNumber numberWithInt:kWCMessageTypeFile];\
  18519. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  18520. msg.isRead = [NSNumber numberWithBool:
  18521. \f2\b \cf8 NO
  18522. \f0\b0 \cf4 ];\
  18523. msg.isUpload = [NSNumber numberWithBool:
  18524. \f2\b \cf8 NO
  18525. \f0\b0 \cf4 ];\
  18526. \
  18527. msg.isReadDel = [NSNumber numberWithInt:
  18528. \f2\b \cf8 NO
  18529. \f0\b0 \cf4 ];\
  18530. \
  18531. [msg insert:
  18532. \f2\b \cf8 self
  18533. \f0\b0 \cf4 .roomJid];\
  18534. [
  18535. \f2\b \cf8 self
  18536. \f0\b0 \cf4 showOneMsg:msg];\
  18537. \
  18538. \cf2 // if (self.isGroupMessages) \{\cf4 \
  18539. \cf2 // self.groupMessagesIndex ++;\cf4 \
  18540. \cf2 // if (self.groupMessagesIndex < self.userIds.count) \{\cf4 \
  18541. \cf2 // [self sendFile:file];\cf4 \
  18542. \cf2 // \}else if (self.userIds)\{\cf4 \
  18543. \cf2 // self.groupMessagesIndex = 0;\cf4 \
  18544. \cf2 // return;\cf4 \
  18545. \cf2 // \}\cf4 \
  18546. \cf2 // return;\cf4 \
  18547. \cf2 // \}\cf4 \
  18548. \cf2 // [msg release];\cf4 \
  18549. [g_server uploadFile:file validTime:
  18550. \f2\b \cf8 self
  18551. \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:msg.messageId toView:
  18552. \f2\b \cf8 self
  18553. \f0\b0 \cf4 ];\
  18554. \}\
  18555. \}\
  18556. \cf2 //
  18557. \f1 \'b7\'a2\'ba\'ec\'b0\'fc
  18558. \f0 \cf4 \
  18559. -(
  18560. \f2\b \cf8 void
  18561. \f0\b0 \cf4 )\cf11 sendRedPacket\cf4 :(NSDictionary*)redPacketDict \cf11 withGreet\cf4 :(NSString *)greet\
  18562. \{\
  18563. [
  18564. \f2\b \cf8 self
  18565. \f0\b0 \cf4 hideKeyboard:
  18566. \f2\b \cf8 NO
  18567. \f0\b0 \cf4 ];\
  18568. \f2\b \cf8 if
  18569. \f0\b0 \cf4 ([redPacketDict[\cf6 @"id"\cf4 ] length]>\cf7 0\cf4 ) \{\
  18570. JXMessageObject *msg=[[JXMessageObject alloc] init];\
  18571. msg.timeSend = [NSDate date];\
  18572. msg.fromUserId = MY_USER_ID;\
  18573. \f2\b \cf8 if
  18574. \f0\b0 \cf4 ([
  18575. \f2\b \cf8 self
  18576. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  18577. msg.toUserId =
  18578. \f2\b \cf8 self
  18579. \f0\b0 \cf4 .roomJid;\
  18580. msg.isGroup =
  18581. \f2\b \cf8 YES
  18582. \f0\b0 \cf4 ;\
  18583. msg.fromUserName = _userNickName;\
  18584. \}\
  18585. \f2\b \cf8 else
  18586. \f0\b0 \cf4 \{\
  18587. msg.toUserId = chatPerson.userId;\
  18588. msg.isGroup =
  18589. \f2\b \cf8 NO
  18590. \f0\b0 \cf4 ;\
  18591. \}\
  18592. \
  18593. msg.content = greet;\
  18594. msg.type = [NSNumber numberWithInt:kWCMessageTypeRedPacket];\
  18595. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  18596. msg.isRead = [NSNumber numberWithBool:
  18597. \f2\b \cf8 NO
  18598. \f0\b0 \cf4 ];\
  18599. \cf2 // msg.isUpload = [NSNumber numberWithBool:NO];\cf4 \
  18600. msg.fileName = redPacketDict[\cf6 @"type"\cf4 ];\
  18601. msg.objectId = redPacketDict[\cf6 @"id"\cf4 ];\
  18602. msg.isReadDel = [NSNumber numberWithInt:
  18603. \f2\b \cf8 NO
  18604. \f0\b0 \cf4 ];\
  18605. \
  18606. [msg insert:
  18607. \f2\b \cf8 self
  18608. \f0\b0 \cf4 .roomJid];\
  18609. \
  18610. \cf2 // if (![_orderRedPacketArray containsObject:msg]) \{\cf4 \
  18611. \cf2 // [_orderRedPacketArray addObject:msg];\cf4 \
  18612. \cf2 // \}\cf4 \
  18613. [g_xmpp sendMessage:msg roomName:
  18614. \f2\b \cf8 self
  18615. \f0\b0 \cf4 .roomJid];\cf2 //
  18616. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  18617. \f0 \cf4 \
  18618. [
  18619. \f2\b \cf8 self
  18620. \f0\b0 \cf4 showOneMsg:msg];\
  18621. \cf2 // [msg release];\cf4 \
  18622. \}\
  18623. \cf2 //
  18624. \f1 \'bb\'f1\'c8\'a1\'d3\'e0\'b6\'ee
  18625. \f0 \cf4 \
  18626. [g_server getUserMoenyToView:
  18627. \f2\b \cf8 self
  18628. \f0\b0 \cf4 ];\
  18629. \}\
  18630. \
  18631. -(
  18632. \f2\b \cf8 void
  18633. \f0\b0 \cf4 )\cf11 onSelFile\cf4 :(NSString*)file\{\
  18634. \f2\b \cf8 if
  18635. \f0\b0 \cf4 (
  18636. \f2\b \cf8 self
  18637. \f0\b0 \cf4 .isGroupMessages) \{\
  18638. \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
  18639. \cf2 // NSString *userId = self.userIds[i];\cf4 \
  18640. \cf2 //\cf4 \
  18641. \cf2 // //
  18642. \f1 \'b7\'a2\'cb\'cd\'ce\'c4\'bc\'fe\'a3\'ac
  18643. \f0 file
  18644. \f1 \'bd\'f6\'bd\'f6\'b0\'fc\'ba\'ac\'ce\'c4\'bc\'fe\'d4\'da\'b1\'be\'b5\'d8\'b5\'c4\'b5\'d8\'d6\'b7
  18645. \f0 \cf4 \
  18646. \cf2 // [self sendFile:file userId:userId];\cf4 \
  18647. \cf2 // //
  18648. \f1 \'c9\'cf\'b4\'ab\'ce\'c4\'bc\'fe\'b5\'bd\'b7\'fe\'ce\'f1\'c6\'f7
  18649. \f0 \cf4 \
  18650. \cf12 ///
  18651. \f3 \cf2 / [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:self.curMessageId toView:self];
  18652. \f0 \cf4 \
  18653. \cf2 // \}\cf4 \
  18654. [
  18655. \f2\b \cf8 self
  18656. \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_file];\
  18657. \f2\b \cf8 self
  18658. \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:file];\
  18659. _onceSendNum = \cf7 5\cf4 ;\
  18660. [
  18661. \f2\b \cf8 self
  18662. \f0\b0 \cf4 sendFiles:
  18663. \f2\b \cf8 self
  18664. \f0\b0 \cf4 .groupUploadObjArray];\
  18665. \}
  18666. \f2\b \cf8 else
  18667. \f0\b0 \cf4 \{\
  18668. \cf2 //
  18669. \f1 \'b7\'a2\'cb\'cd\'ce\'c4\'bc\'fe\'a3\'ac
  18670. \f0 file
  18671. \f1 \'bd\'f6\'bd\'f6\'b0\'fc\'ba\'ac\'ce\'c4\'bc\'fe\'d4\'da\'b1\'be\'b5\'d8\'b5\'c4\'b5\'d8\'d6\'b7
  18672. \f0 \cf4 \
  18673. [
  18674. \f2\b \cf8 self
  18675. \f0\b0 \cf4 sendFile:file userId:
  18676. \f2\b \cf8 nil
  18677. \f0\b0 \cf4 ];\
  18678. \cf2 //
  18679. \f1 \'c9\'cf\'b4\'ab\'ce\'c4\'bc\'fe\'b5\'bd\'b7\'fe\'ce\'f1\'c6\'f7
  18680. \f0 \cf4 \
  18681. \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:self.curMessageId toView:self];\cf4 \
  18682. \}\
  18683. \}\
  18684. \
  18685. - (
  18686. \f2\b \cf8 void
  18687. \f0\b0 \cf4 )\cf11 sendFiles\cf4 :(NSArray *)filesArray\{\
  18688. NSString *userId =
  18689. \f2\b \cf8 self
  18690. \f0\b0 \cf4 .userIds[
  18691. \f2\b \cf8 self
  18692. \f0\b0 \cf4 .groupMessagesIndex];\
  18693. NSString *file = filesArray.lastObject;\
  18694. [
  18695. \f2\b \cf8 self
  18696. \f0\b0 \cf4 sendFile:file userId:userId];\
  18697. \f2\b \cf8 self
  18698. \f0\b0 \cf4 .groupMessagesIndex ++;\
  18699. \f2\b \cf8 if
  18700. \f0\b0 \cf4 (
  18701. \f2\b \cf8 self
  18702. \f0\b0 \cf4 .groupMessagesIndex <
  18703. \f2\b \cf8 self
  18704. \f0\b0 \cf4 .userIds.count) \{\
  18705. \f2\b \cf8 if
  18706. \f0\b0 \cf4 (
  18707. \f2\b \cf8 self
  18708. \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
  18709. \f2\b \cf8 return
  18710. \f0\b0 \cf4 ;\
  18711. \}
  18712. \f2\b \cf8 else
  18713. \f0\b0 \cf4 \{\
  18714. [
  18715. \f2\b \cf8 self
  18716. \f0\b0 \cf4 sendFiles:filesArray];\
  18717. \}\
  18718. \}
  18719. \f2\b \cf8 else
  18720. \f0\b0 \cf4
  18721. \f2\b \cf8 if
  18722. \f0\b0 \cf4 (
  18723. \f2\b \cf8 self
  18724. \f0\b0 \cf4 .userIds)\{\
  18725. \f2\b \cf8 self
  18726. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  18727. \f2\b \cf8 return
  18728. \f0\b0 \cf4 ;\
  18729. \}\
  18730. \}\
  18731. \
  18732. -(
  18733. \f2\b \cf8 void
  18734. \f0\b0 \cf4 )\cf11 sendGift\cf4 \{\
  18735. [
  18736. \f2\b \cf8 self
  18737. \f0\b0 \cf4 hideKeyboard:
  18738. \f2\b \cf8 YES
  18739. \f0\b0 \cf4 ];\
  18740. \f2\b \cf8 if
  18741. \f0\b0 \cf4 ([
  18742. \f2\b \cf8 self
  18743. \f0\b0 \cf4 showDisableSay])\
  18744. \f2\b \cf8 return
  18745. \f0\b0 \cf4 ;\
  18746. \
  18747. \f2\b \cf8 if
  18748. \f0\b0 \cf4 ([
  18749. \f2\b \cf8 self
  18750. \f0\b0 \cf4 sendMsgCheck])\{\
  18751. \f2\b \cf8 return
  18752. \f0\b0 \cf4 ;\
  18753. \}\
  18754. JXSendRedPacketViewController * sendGiftVC = [[JXSendRedPacketViewController alloc] init];\
  18755. sendGiftVC.isRoom =
  18756. \f2\b \cf8 NO
  18757. \f0\b0 \cf4 ;\
  18758. sendGiftVC.toUserId = chatPerson.userId;\
  18759. sendGiftVC.delegate =
  18760. \f2\b \cf8 self
  18761. \f0\b0 \cf4 ;\
  18762. \cf2 // [g_window addSubview:sendGiftVC.view];\cf4 \
  18763. [g_navigation pushViewController:sendGiftVC animated:
  18764. \f2\b \cf8 YES
  18765. \f0\b0 \cf4 ];\
  18766. \}\
  18767. \
  18768. - (
  18769. \f2\b \cf8 void
  18770. \f0\b0 \cf4 )\cf11 onTransfer\cf4 \{\
  18771. JXTransferViewController *transferVC = [JXTransferViewController alloc];\
  18772. transferVC.user = chatPerson;\
  18773. transferVC.delegate =
  18774. \f2\b \cf8 self
  18775. \f0\b0 \cf4 ;\
  18776. transferVC = [transferVC init];\
  18777. [g_navigation pushViewController:transferVC animated:
  18778. \f2\b \cf8 YES
  18779. \f0\b0 \cf4 ];\
  18780. \}\
  18781. \
  18782. - (
  18783. \f2\b \cf8 void
  18784. \f0\b0 \cf4 )\cf11 sendGiftToRoom\cf4 \{\
  18785. [
  18786. \f2\b \cf8 self
  18787. \f0\b0 \cf4 hideKeyboard:
  18788. \f2\b \cf8 YES
  18789. \f0\b0 \cf4 ];\
  18790. \f2\b \cf8 if
  18791. \f0\b0 \cf4 ([
  18792. \f2\b \cf8 self
  18793. \f0\b0 \cf4 showDisableSay])\
  18794. \f2\b \cf8 return
  18795. \f0\b0 \cf4 ;\
  18796. \
  18797. \f2\b \cf8 if
  18798. \f0\b0 \cf4 ([
  18799. \f2\b \cf8 self
  18800. \f0\b0 \cf4 sendMsgCheck])\{\
  18801. \f2\b \cf8 return
  18802. \f0\b0 \cf4 ;\
  18803. \}\
  18804. \f2\b \cf8 if
  18805. \f0\b0 \cf4 (
  18806. \f2\b \cf8 self
  18807. \f0\b0 \cf4 .room.curCount == \cf7 1\cf4 ) \{\
  18808. \f2\b \cf8 self
  18809. \f0\b0 \cf4 .isSendRedPacket =
  18810. \f2\b \cf8 YES
  18811. \f0\b0 \cf4 ;\
  18812. [g_server roomGetRoom:
  18813. \f2\b \cf8 self
  18814. \f0\b0 \cf4 .roomId toView:
  18815. \f2\b \cf8 self
  18816. \f0\b0 \cf4 ];\
  18817. \}
  18818. \f2\b \cf8 else
  18819. \f0\b0 \cf4 \{\
  18820. \cf2 //
  18821. \f1 \'bb\'f1\'c8\'a1\'c8\'ba\'b3\'c9\'d4\'b1\'c1\'d0\'b1\'ed
  18822. \f0 \cf4 \
  18823. NSArray * memberArray = [memberData fetchAllMembers:_room.roomId];\
  18824. \
  18825. JXSendRedPacketViewController * sendGiftVC = [[JXSendRedPacketViewController alloc] init];\
  18826. sendGiftVC.isRoom =
  18827. \f2\b \cf8 YES
  18828. \f0\b0 \cf4 ;\
  18829. sendGiftVC.delegate =
  18830. \f2\b \cf8 self
  18831. \f0\b0 \cf4 ;\
  18832. sendGiftVC.roomJid =
  18833. \f2\b \cf8 self
  18834. \f0\b0 \cf4 .roomJid;\
  18835. sendGiftVC.size = memberArray.count;\
  18836. \cf2 // [g_window addSubview:sendGiftVC.view];\cf4 \
  18837. [g_navigation pushViewController:sendGiftVC animated:
  18838. \f2\b \cf8 YES
  18839. \f0\b0 \cf4 ];\
  18840. \}\
  18841. \}\
  18842. \
  18843. \cf5 #pragma mark
  18844. \f2\b \cf16 -
  18845. \f4 \'d7\'aa\'d5\'cb
  18846. \f2 delegate
  18847. \f0\b0 \cf4 \
  18848. - (
  18849. \f2\b \cf8 void
  18850. \f0\b0 \cf4 )\cf11 transferToUser\cf4 :(NSDictionary *)dict \{\
  18851. [
  18852. \f2\b \cf8 self
  18853. \f0\b0 \cf4 hideKeyboard:
  18854. \f2\b \cf8 NO
  18855. \f0\b0 \cf4 ];\
  18856. \f2\b \cf8 if
  18857. \f0\b0 \cf4 ([dict[\cf6 @"id"\cf4 ] length]>\cf7 0\cf4 ) \{\
  18858. JXMessageObject *msg=[[JXMessageObject alloc] init];\
  18859. msg.timeSend = [NSDate date];\
  18860. msg.fromUserId = MY_USER_ID;\
  18861. msg.toUserId = chatPerson.userId;\
  18862. msg.isGroup =
  18863. \f2\b \cf8 NO
  18864. \f0\b0 \cf4 ;\
  18865. \
  18866. msg.content = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,dict[\cf6 @"money"\cf4 ]];\
  18867. msg.type = [NSNumber numberWithInt:kWCMessageTypeTransfer];\
  18868. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  18869. msg.isRead = [NSNumber numberWithBool:
  18870. \f2\b \cf8 NO
  18871. \f0\b0 \cf4 ];\
  18872. \cf2 // msg.isUpload = [NSNumber numberWithBool:NO];\cf4 \
  18873. msg.fileName = dict[\cf6 @"remark"\cf4 ];\
  18874. msg.objectId = dict[\cf6 @"id"\cf4 ];\
  18875. msg.isReadDel = [NSNumber numberWithInt:
  18876. \f2\b \cf8 NO
  18877. \f0\b0 \cf4 ];\
  18878. \
  18879. [msg insert:
  18880. \f2\b \cf8 nil
  18881. \f0\b0 \cf4 ];\
  18882. \
  18883. [g_xmpp sendMessage:msg roomName:
  18884. \f2\b \cf8 nil
  18885. \f0\b0 \cf4 ];\cf2 //
  18886. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  18887. \f0 \cf4 \
  18888. [
  18889. \f2\b \cf8 self
  18890. \f0\b0 \cf4 showOneMsg:msg];\
  18891. \}\
  18892. \cf2 //
  18893. \f1 \'bb\'f1\'c8\'a1\'d3\'e0\'b6\'ee
  18894. \f0 \cf4 \
  18895. [g_server getUserMoenyToView:
  18896. \f2\b \cf8 self
  18897. \f0\b0 \cf4 ];\
  18898. \
  18899. \}\
  18900. \
  18901. -(
  18902. \f2\b \cf8 void
  18903. \f0\b0 \cf4 )\cf11 sendRedPacketDelegate\cf4 :(NSDictionary *)redpacketDict\{\
  18904. [
  18905. \f2\b \cf8 self
  18906. \f0\b0 \cf4 hideKeyboard:
  18907. \f2\b \cf8 NO
  18908. \f0\b0 \cf4 ];\
  18909. \f2\b \cf8 if
  18910. \f0\b0 \cf4 ([redpacketDict[\cf6 @"id"\cf4 ] length]>\cf7 0\cf4 ) \{\
  18911. JXMessageObject *msg=[[JXMessageObject alloc] init];\
  18912. msg.timeSend = [NSDate date];\
  18913. msg.fromUserId = MY_USER_ID;\
  18914. \f2\b \cf8 if
  18915. \f0\b0 \cf4 ([
  18916. \f2\b \cf8 self
  18917. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
  18918. msg.toUserId =
  18919. \f2\b \cf8 self
  18920. \f0\b0 \cf4 .roomJid;\
  18921. msg.isGroup =
  18922. \f2\b \cf8 YES
  18923. \f0\b0 \cf4 ;\
  18924. msg.fromUserName = _userNickName;\
  18925. \}\
  18926. \f2\b \cf8 else
  18927. \f0\b0 \cf4 \{\
  18928. msg.toUserId = chatPerson.userId;\
  18929. msg.isGroup =
  18930. \f2\b \cf8 NO
  18931. \f0\b0 \cf4 ;\
  18932. \}\
  18933. \
  18934. msg.content = redpacketDict[\cf6 @"greet"\cf4 ];\
  18935. msg.type = [NSNumber numberWithInt:kWCMessageTypeRedPacket];\
  18936. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  18937. msg.isRead = [NSNumber numberWithBool:
  18938. \f2\b \cf8 NO
  18939. \f0\b0 \cf4 ];\
  18940. msg.fileName = redpacketDict[\cf6 @"type"\cf4 ];\
  18941. msg.objectId = redpacketDict[\cf6 @"id"\cf4 ];\
  18942. msg.isReadDel = [NSNumber numberWithInt:
  18943. \f2\b \cf8 NO
  18944. \f0\b0 \cf4 ];\
  18945. \
  18946. [msg insert:
  18947. \f2\b \cf8 self
  18948. \f0\b0 \cf4 .roomJid];\
  18949. \
  18950. \cf2 // if (![_orderRedPacketArray containsObject:msg]) \{\cf4 \
  18951. \cf2 // [_orderRedPacketArray addObject:msg];\cf4 \
  18952. \cf2 // \}\cf4 \
  18953. [g_xmpp sendMessage:msg roomName:
  18954. \f2\b \cf8 self
  18955. \f0\b0 \cf4 .roomJid];\cf2 //
  18956. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  18957. \f0 \cf4 \
  18958. [
  18959. \f2\b \cf8 self
  18960. \f0\b0 \cf4 showOneMsg:msg];\
  18961. \cf2 // [msg release];\cf4 \
  18962. \}\
  18963. \cf2 //
  18964. \f1 \'bb\'f1\'c8\'a1\'d3\'e0\'b6\'ee
  18965. \f0 \cf4 \
  18966. [g_server getUserMoenyToView:
  18967. \f2\b \cf8 self
  18968. \f0\b0 \cf4 ];\
  18969. \}\
  18970. \
  18971. -(
  18972. \f2\b \cf8 void
  18973. \f0\b0 \cf4 )\cf11 onFile\cf4 \{\
  18974. [
  18975. \f2\b \cf8 self
  18976. \f0\b0 \cf4 hideKeyboard:
  18977. \f2\b \cf8 YES
  18978. \f0\b0 \cf4 ];\
  18979. \f2\b \cf8 if
  18980. \f0\b0 \cf4 ([
  18981. \f2\b \cf8 self
  18982. \f0\b0 \cf4 showDisableSay])\
  18983. \f2\b \cf8 return
  18984. \f0\b0 \cf4 ;\
  18985. \f2\b \cf8 if
  18986. \f0\b0 \cf4 ([
  18987. \f2\b \cf8 self
  18988. \f0\b0 \cf4 sendMsgCheck])\{\
  18989. \f2\b \cf8 return
  18990. \f0\b0 \cf4 ;\
  18991. \}\
  18992. \f2\b \cf8 if
  18993. \f0\b0 \cf4 (
  18994. \f2\b \cf8 self
  18995. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
  18996. \
  18997. \f2\b \cf8 if
  18998. \f0\b0 \cf4 (!_isAdmin && ![
  18999. \f2\b \cf8 self
  19000. \f0\b0 \cf4 .chatPerson.allowUploadFile boolValue]) \{\
  19001. [g_App showAlert:Localized(\cf6 @"JX_NotUploadSharedFiles"\cf4 )];\
  19002. \f2\b \cf8 return
  19003. \f0\b0 \cf4 ;\
  19004. \}\
  19005. \}\
  19006. JXMyFile* vc = [[JXMyFile alloc]init];\
  19007. vc.delegate =
  19008. \f2\b \cf8 self
  19009. \f0\b0 \cf4 ;\
  19010. vc.didSelect =
  19011. \f2\b \cf8 @selector
  19012. \f0\b0 \cf4 (onSelFile:);\
  19013. \cf2 // [g_window addSubview:vc.view];\cf4 \
  19014. [g_navigation pushViewController:vc animated:
  19015. \f2\b \cf8 YES
  19016. \f0\b0 \cf4 ];\
  19017. \}\
  19018. \
  19019. -(
  19020. \f2\b \cf8 void
  19021. \f0\b0 \cf4 )\cf11 onDidCard\cf4 :(JXMessageObject*)msg\{\
  19022. \cf2 // [g_server getUser:msg.objectId toView:self];\cf4 \
  19023. \
  19024. JXUserInfoVC* vc = [JXUserInfoVC alloc];\
  19025. vc.userId = msg.objectId;\
  19026. vc.isJustShow =
  19027. \f2\b \cf8 self
  19028. \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ;\
  19029. vc = [vc init];\
  19030. [g_navigation pushViewController:vc animated:
  19031. \f2\b \cf8 YES
  19032. \f0\b0 \cf4 ];\
  19033. \}\
  19034. \
  19035. \cf5 #pragma mark
  19036. \f2\b \cf16 ------cell
  19037. \f4 \'cd\'b7\'cf\'f1\'b5\'e3\'bb\'f7
  19038. \f0\b0 \cf4 \
  19039. -(
  19040. \f2\b \cf8 void
  19041. \f0\b0 \cf4 )\cf11 chatCellHeadIMG\cf4 :(JXMessageObject *)msgCell \cf11 audioPlayChangeIndexNum\cf4 :(NSInteger)indexNum\{\
  19042. \
  19043. \cf2 //-(void)onDidHeadImage:(NSNotification*)notification\{\cf4 \
  19044. \f2\b \cf8 if
  19045. \f0\b0 \cf4 (recording) \{\
  19046. \f2\b \cf8 return
  19047. \f0\b0 \cf4 ;\
  19048. \}\
  19049. \f2\b \cf8 if
  19050. \f0\b0 \cf4 ([chatPerson.userId rangeOfString:MY_USER_ID].location != NSNotFound) \{\
  19051. \f2\b \cf8 return
  19052. \f0\b0 \cf4 ;\
  19053. \}\
  19054. \cf2 //JXMessageObject *msg = notification.object;\cf4 \
  19055. JXMessageObject *msg = msgCell;\
  19056. \
  19057. \f2\b \cf8 if
  19058. \f0\b0 \cf4 ([msg.fromUserId isEqualToString:CALL_CENTER_USERID])\
  19059. \f2\b \cf8 return
  19060. \f0\b0 \cf4 ;\
  19061. \f2\b \cf8 if
  19062. \f0\b0 \cf4 (!
  19063. \f2\b \cf8 self
  19064. \f0\b0 \cf4 .roomJid) \{\
  19065. \cf2 //
  19066. \f1 \'bf\'b4\'cf\'ea\'c7\'e9
  19067. \f0 \cf4 \
  19068. \cf2 // [g_server getUser:msg.fromUserId toView:self];\cf4 \
  19069. \cf2 //JXUserDetialVc JXUserInfoVC\cf4 \
  19070. \cf2 // JXUserDetialVc* vc = [JXUserDetialVc alloc];\cf4 \
  19071. JXUserInfoVC* vc = [JXUserInfoVC alloc];\
  19072. vc.userId = msg.fromUserId;\
  19073. vc.isJustShow =
  19074. \f2\b \cf8 self
  19075. \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ;\
  19076. vc.fromAddType = \cf7 3\cf4 ;\
  19077. vc.chatVC2 =
  19078. \f2\b \cf8 self
  19079. \f0\b0 \cf4 ;\
  19080. vc = [vc init];\
  19081. [g_navigation pushViewController:vc animated:
  19082. \f2\b \cf8 YES
  19083. \f0\b0 \cf4 ];\
  19084. \}
  19085. \f2\b \cf8 else
  19086. \f0\b0 \cf4 \{\
  19087. \f2\b \cf8 if
  19088. \f0\b0 \cf4 (_isAdmin || [
  19089. \f2\b \cf8 self
  19090. \f0\b0 \cf4 .chatPerson.allowSendCard boolValue]) \{\
  19091. \
  19092. NSString *s;\
  19093. \f2\b \cf8 switch
  19094. \f0\b0 \cf4 ([
  19095. \f2\b \cf8 self
  19096. \f0\b0 \cf4 .groupStatus intValue]) \{\
  19097. \f2\b \cf8 case
  19098. \f0\b0 \cf4 \cf7 0\cf4 :\
  19099. s =
  19100. \f2\b \cf8 nil
  19101. \f0\b0 \cf4 ;\
  19102. \f2\b \cf8 break
  19103. \f0\b0 \cf4 ;\
  19104. \f2\b \cf8 case
  19105. \f0\b0 \cf4 \cf7 1\cf4 :\
  19106. s = Localized(\cf6 @"JX_OutOfTheGroup1"\cf4 );\
  19107. \f2\b \cf8 break
  19108. \f0\b0 \cf4 ;\
  19109. \f2\b \cf8 case
  19110. \f0\b0 \cf4 \cf7 2\cf4 :\
  19111. s = Localized(\cf6 @"JX_DissolutionGroup1"\cf4 );\
  19112. \f2\b \cf8 break
  19113. \f0\b0 \cf4 ;\
  19114. \
  19115. \f2\b \cf8 default
  19116. \f0\b0 \cf4 :\
  19117. \f2\b \cf8 break
  19118. \f0\b0 \cf4 ;\
  19119. \}\
  19120. \
  19121. \f2\b \cf8 if
  19122. \f0\b0 \cf4 (s.length > \cf7 0\cf4 ) \{\
  19123. [
  19124. \f2\b \cf8 self
  19125. \f0\b0 \cf4 hideKeyboard:
  19126. \f2\b \cf8 NO
  19127. \f0\b0 \cf4 ];\
  19128. [g_server showMsg:s];\
  19129. \f2\b \cf8 return
  19130. \f0\b0 \cf4 ;\
  19131. \}\
  19132. \
  19133. JXUserInfoVC* vc = [JXUserInfoVC alloc];\
  19134. vc.userId = msg.fromUserId;\
  19135. vc.isJustShow =
  19136. \f2\b \cf8 self
  19137. \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ;\
  19138. vc.fromAddType = \cf7 3\cf4 ;\
  19139. vc.chatVC2 =
  19140. \f2\b \cf8 self
  19141. \f0\b0 \cf4 ;\
  19142. vc = [vc init];\
  19143. [g_navigation pushViewController:vc animated:
  19144. \f2\b \cf8 YES
  19145. \f0\b0 \cf4 ];\
  19146. \}
  19147. \f2\b \cf8 else
  19148. \f0\b0 \cf4 \{\
  19149. [g_App showAlert:Localized(\cf6 @"JX_GroupNotTalk"\cf4 )];\
  19150. \}\
  19151. \}\
  19152. \
  19153. \}\
  19154. \
  19155. -(
  19156. \f2\b \cf8 void
  19157. \f0\b0 \cf4 )\cf11 longGesHeadImageNotification\cf4 :(NSNotification *)notification\{\
  19158. \
  19159. \f2\b \cf8 if
  19160. \f0\b0 \cf4 (!_messageText.userInteractionEnabled) \{\
  19161. \f2\b \cf8 return
  19162. \f0\b0 \cf4 ;\
  19163. \}\
  19164. \
  19165. JXMessageObject *msg = notification.object;\
  19166. \f2\b \cf8 if
  19167. \f0\b0 \cf4 (
  19168. \f2\b \cf8 self
  19169. \f0\b0 \cf4 .roomJid) \{\
  19170. \cf2 //@
  19171. \f1 \'c8\'ba\'b3\'c9\'d4\'b1
  19172. \f0 \cf4 \
  19173. \cf2 // [self performSelector:@selector(showAtSelectMemberView) withObject:nil afterDelay:0.35];\cf4 \
  19174. \cf2 // [self showAtSelectMemberView];\cf4 \
  19175. memberData * mem = [
  19176. \f2\b \cf8 self
  19177. \f0\b0 \cf4 .room getMember:msg.fromUserId];\
  19178. \f2\b \cf8 if
  19179. \f0\b0 \cf4 (mem) \{\
  19180. [
  19181. \f2\b \cf8 self
  19182. \f0\b0 \cf4 atSelectMemberDelegate:mem];\
  19183. \}\
  19184. \}\
  19185. \}\
  19186. \
  19187. \cf2 //
  19188. \f1 \'d6\'d8\'d0\'c2\'b7\'a2\'cb\'cd\'d7\'aa\'d5\'cb\'cf\'fb\'cf\'a2
  19189. \f0 \cf4 \
  19190. - (
  19191. \f2\b \cf8 void
  19192. \f0\b0 \cf4 )\cf11 onResend\cf4 :(JXMessageObject *)msg \{\
  19193. JXMessageObject *msg1 = [[JXMessageObject alloc]init];\
  19194. msg1 = [msg copy];\
  19195. msg1.messageId =
  19196. \f2\b \cf8 nil
  19197. \f0\b0 \cf4 ;\
  19198. msg1.timeSend = [NSDate date];\
  19199. msg1.fromId =
  19200. \f2\b \cf8 nil
  19201. \f0\b0 \cf4 ;\
  19202. msg1.isGroup =
  19203. \f2\b \cf8 NO
  19204. \f0\b0 \cf4 ;\
  19205. msg1.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  19206. msg1.isRead = [NSNumber numberWithBool:
  19207. \f2\b \cf8 NO
  19208. \f0\b0 \cf4 ];\
  19209. msg1.isReadDel = [NSNumber numberWithInt:
  19210. \f2\b \cf8 NO
  19211. \f0\b0 \cf4 ];\
  19212. [msg1 insert:
  19213. \f2\b \cf8 nil
  19214. \f0\b0 \cf4 ];\
  19215. [g_xmpp sendMessage:msg1 roomName:
  19216. \f2\b \cf8 nil
  19217. \f0\b0 \cf4 ];\cf2 //
  19218. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  19219. \f0 \cf4 \
  19220. [
  19221. \f2\b \cf8 self
  19222. \f0\b0 \cf4 showOneMsg:msg1];\
  19223. \}\
  19224. \
  19225. \cf5 #pragma mark
  19226. \f2\b \cf16 ------
  19227. \f4 \'d7\'aa\'d5\'cb\'b5\'e3\'bb\'f7
  19228. \f0\b0 \cf4 \
  19229. - (
  19230. \f2\b \cf8 void
  19231. \f0\b0 \cf4 )\cf11 onDidTransfer\cf4 :(NSNotification*)notification \{\
  19232. \f2\b \cf8 if
  19233. \f0\b0 \cf4 (recording) \{\
  19234. \f2\b \cf8 return
  19235. \f0\b0 \cf4 ;\
  19236. \}\
  19237. \
  19238. [
  19239. \f2\b \cf8 self
  19240. \f0\b0 \cf4 hideKeyboard:
  19241. \f2\b \cf8 NO
  19242. \f0\b0 \cf4 ];\
  19243. JXMessageObject *msg = notification.object;\
  19244. JXTransferDeatilVC *detailVC = [JXTransferDeatilVC alloc];\
  19245. detailVC.msg = msg;\
  19246. detailVC.onResend =
  19247. \f2\b \cf8 @selector
  19248. \f0\b0 \cf4 (onResend:);\
  19249. detailVC.delegate =
  19250. \f2\b \cf8 self
  19251. \f0\b0 \cf4 ;\
  19252. detailVC = [detailVC init];\
  19253. [g_navigation pushViewController:detailVC animated:
  19254. \f2\b \cf8 YES
  19255. \f0\b0 \cf4 ];\
  19256. \}\
  19257. \
  19258. \cf5 #pragma mark
  19259. \f2\b \cf16 ------
  19260. \f4 \'ba\'ec\'b0\'fc\'b5\'e3\'bb\'f7
  19261. \f0\b0 \cf4 \
  19262. -(
  19263. \f2\b \cf8 void
  19264. \f0\b0 \cf4 )\cf11 onDidRedPacket\cf4 :(NSNotification*)notification\{\
  19265. \f2\b \cf8 if
  19266. \f0\b0 \cf4 (recording) \{\
  19267. \f2\b \cf8 return
  19268. \f0\b0 \cf4 ;\
  19269. \}\
  19270. \
  19271. \f2\b \cf8 if
  19272. \f0\b0 \cf4 (
  19273. \f2\b \cf8 self
  19274. \f0\b0 \cf4 .roomJid) \{\
  19275. NSString *s;\
  19276. \cf2 //
  19277. \f1 \'d1\'e9\'d6\'a4\'c8\'ba\'d7\'e9\'ca\'c7\'b7\'f1\'d3\'d0\'d0\'a7
  19278. \f0 \cf4 \
  19279. \f2\b \cf8 switch
  19280. \f0\b0 \cf4 ([
  19281. \f2\b \cf8 self
  19282. \f0\b0 \cf4 .groupStatus intValue]) \{\
  19283. \f2\b \cf8 case
  19284. \f0\b0 \cf4 \cf7 0\cf4 :\
  19285. s =
  19286. \f2\b \cf8 nil
  19287. \f0\b0 \cf4 ;\
  19288. \f2\b \cf8 break
  19289. \f0\b0 \cf4 ;\
  19290. \f2\b \cf8 case
  19291. \f0\b0 \cf4 \cf7 1\cf4 :\
  19292. s = Localized(\cf6 @"JX_OutOfTheGroup1"\cf4 );\
  19293. \f2\b \cf8 break
  19294. \f0\b0 \cf4 ;\
  19295. \f2\b \cf8 case
  19296. \f0\b0 \cf4 \cf7 2\cf4 :\
  19297. s = Localized(\cf6 @"JX_DissolutionGroup1"\cf4 );\
  19298. \f2\b \cf8 break
  19299. \f0\b0 \cf4 ;\
  19300. \
  19301. \f2\b \cf8 default
  19302. \f0\b0 \cf4 :\
  19303. \f2\b \cf8 break
  19304. \f0\b0 \cf4 ;\
  19305. \}\
  19306. \
  19307. \f2\b \cf8 if
  19308. \f0\b0 \cf4 (s.length > \cf7 0\cf4 ) \{\
  19309. [
  19310. \f2\b \cf8 self
  19311. \f0\b0 \cf4 hideKeyboard:
  19312. \f2\b \cf8 NO
  19313. \f0\b0 \cf4 ];\
  19314. [g_server showMsg:s];\
  19315. \f2\b \cf8 return
  19316. \f0\b0 \cf4 ;\
  19317. \}\
  19318. \
  19319. \}\
  19320. \
  19321. memberData *data = [
  19322. \f2\b \cf8 self
  19323. \f0\b0 \cf4 .room getMember:g_myself.userId];\
  19324. \f2\b \cf8 if
  19325. \f0\b0 \cf4 ([data.role integerValue] == \cf7 4\cf4 ) \{\
  19326. [JXMyTools showTipView:\cf6 @"
  19327. \f1 \'d2\'fe\'c9\'ed\'c8\'cb\'b2\'bb\'c4\'dc\'c1\'ec\'c8\'a1\'ba\'ec\'b0\'fc
  19328. \f0 "\cf4 ];\
  19329. \f2\b \cf8 return
  19330. \f0\b0 \cf4 ;\
  19331. \}\
  19332. \
  19333. [
  19334. \f2\b \cf8 self
  19335. \f0\b0 \cf4 hideKeyboard:
  19336. \f2\b \cf8 NO
  19337. \f0\b0 \cf4 ];\
  19338. JXMessageObject *msg = notification.object;\
  19339. \
  19340. \f2\b \cf8 if
  19341. \f0\b0 \cf4 (([msg.fileName isEqualToString:\cf6 @"3"\cf4 ] && [msg.fileSize intValue] != \cf7 2\cf4 )) \{\
  19342. \f2\b \cf8 if
  19343. \f0\b0 \cf4 (
  19344. \f2\b \cf8 self
  19345. \f0\b0 \cf4 .roomId.length > \cf7 0\cf4 ) \{\
  19346. \
  19347. _messageText.text = msg.content;\
  19348. \f2\b \cf8 return
  19349. \f0\b0 \cf4 ;\
  19350. \}
  19351. \f2\b \cf8 else
  19352. \f0\b0 \cf4 \{\
  19353. \f2\b \cf8 if
  19354. \f0\b0 \cf4 (![msg.fromUserId isEqualToString:MY_USER_ID]) \{\
  19355. \
  19356. _messageText.text = msg.content;\
  19357. \f2\b \cf8 return
  19358. \f0\b0 \cf4 ;\
  19359. \}\
  19360. \}\
  19361. \}\
  19362. [_wait start];\
  19363. [g_server getRedPacket:msg.objectId toView:
  19364. \f2\b \cf8 self
  19365. \f0\b0 \cf4 ];\
  19366. \
  19367. \cf2 // if (([msg.fileName isEqualToString:@"3"] && [msg.fileSize intValue] != 2) && ![msg.fromUserId isEqualToString:MY_USER_ID]) \{\cf4 \
  19368. \cf2 // _messageText.text = msg.content;\cf4 \
  19369. \cf2 // return;\cf4 \
  19370. \cf2 // \}\cf4 \
  19371. \cf2 // [_wait start];\cf4 \
  19372. \cf2 // [g_server getRedPacket:msg.objectId toView:self];\cf4 \
  19373. \cf12 ///
  19374. \f3 \cf2 / [g_server openRedPacket:msg.objectId toView:self];
  19375. \f0 \cf4 \
  19376. \
  19377. \}\
  19378. \
  19379. - (
  19380. \f2\b \cf8 void
  19381. \f0\b0 \cf4 )\cf11 shakeToShow\cf4 :(UIView*)aView\{\
  19382. CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:\cf6 @"transform"\cf4 ];\
  19383. animation.duration = \cf7 0.5\cf4 ;\
  19384. \
  19385. NSMutableArray *values = [NSMutableArray array];\
  19386. [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(\cf7 0.1\cf4 , \cf7 0.1\cf4 , \cf7 1.0\cf4 )]];\
  19387. [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(\cf7 1.2\cf4 , \cf7 1.2\cf4 , \cf7 1.0\cf4 )]];\
  19388. [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(\cf7 0.9\cf4 , \cf7 0.9\cf4 , \cf7 1.0\cf4 )]];\
  19389. [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(\cf7 1.0\cf4 , \cf7 1.0\cf4 , \cf7 1.0\cf4 )]];\
  19390. animation.values = values;\
  19391. [aView.layer addAnimation:animation forKey:
  19392. \f2\b \cf8 nil
  19393. \f0\b0 \cf4 ];\
  19394. \}\
  19395. \
  19396. - (
  19397. \f2\b \cf8 void
  19398. \f0\b0 \cf4 )\cf11 showRedPacket\cf4 :(NSDictionary *)dict \{\
  19399. [_wait stop];\
  19400. [
  19401. \f2\b \cf8 self
  19402. \f0\b0 \cf4 hideKeyboard:
  19403. \f2\b \cf8 YES
  19404. \f0\b0 \cf4 ];\
  19405. \
  19406. NSString *userName = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,[(NSDictionary *)[dict objectForKey:\cf6 @"packet"\cf4 ] objectForKey:\cf6 @"userName"\cf4 ]];\
  19407. NSString *greetings = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,[(NSDictionary *)[dict objectForKey:\cf6 @"packet"\cf4 ] objectForKey:\cf6 @"greetings"\cf4 ]];\
  19408. NSString *userId = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,[(NSDictionary *)[dict objectForKey:\cf6 @"packet"\cf4 ] objectForKey:\cf6 @"userId"\cf4 ]];\
  19409. \
  19410. \f2\b \cf8 self
  19411. \f0\b0 \cf4 .redPacketDict = dict;\
  19412. \
  19413. \
  19414. \f2\b \cf8 self
  19415. \f0\b0 \cf4 .redBaseView = [[UIView alloc] initWithFrame:
  19416. \f2\b \cf8 self
  19417. \f0\b0 \cf4 .view.bounds];\
  19418. \f2\b \cf8 self
  19419. \f0\b0 \cf4 .redBaseView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:\cf7 .5f\cf4 ];\
  19420. [
  19421. \f2\b \cf8 self
  19422. \f0\b0 \cf4 .view addSubview:
  19423. \f2\b \cf8 self
  19424. \f0\b0 \cf4 .redBaseView];\
  19425. \
  19426. UIImage *redImage = [UIImage imageNamed:\cf6 @"red_packet_bg"\cf4 ];\
  19427. \
  19428. CGFloat h = JX_SCREEN_HEIGHT - JX_SCREEN_TOP - JX_SCREEN_BOTTOM - \cf7 30\cf4 -\cf7 50\cf4 ;\
  19429. \f2\b \cf8 self
  19430. \f0\b0 \cf4 .redBackV = [[UIImageView alloc] initWithFrame:CGRectMake(\cf7 20\cf4 , \cf7 30\cf4 +JX_SCREEN_TOP, JX_SCREEN_WIDTH-\cf7 40\cf4 , h)];\
  19431. \f2\b \cf8 self
  19432. \f0\b0 \cf4 .redBackV.userInteractionEnabled =
  19433. \f2\b \cf8 YES
  19434. \f0\b0 \cf4 ;\
  19435. \f2\b \cf8 self
  19436. \f0\b0 \cf4 .redBackV.image = redImage;\
  19437. [
  19438. \f2\b \cf8 self
  19439. \f0\b0 \cf4 .redBaseView addSubview:
  19440. \f2\b \cf8 self
  19441. \f0\b0 \cf4 .redBackV];\
  19442. \cf2 //
  19443. \f1 \'cc\'ed\'bc\'d3\'b8\'f6\'b6\'af\'bb\'ad
  19444. \f0 \cf4 \
  19445. [
  19446. \f2\b \cf8 self
  19447. \f0\b0 \cf4 shakeToShow:
  19448. \f2\b \cf8 self
  19449. \f0\b0 \cf4 .redBackV];\
  19450. \
  19451. CGSize size = [[NSString stringWithFormat:\cf6 @"%@%@"\cf4 ,userName,Localized(\cf6 @"JX_FromRedPacket"\cf4 )] sizeWithAttributes:\cf7 @\{\cf4 NSFontAttributeName:SYSFONT(\cf7 18\cf4 )\cf7 \}\cf4 ];\
  19452. UIImageView *icon = [[UIImageView alloc] initWithFrame:CGRectMake((JX_SCREEN_WIDTH-\cf7 40\cf4 - size.width-\cf7 30\cf4 -\cf7 5\cf4 )/\cf7 2\cf4 , \cf7 100\cf4 , \cf7 30\cf4 , \cf7 30\cf4 )];\
  19453. icon.layer.masksToBounds =
  19454. \f2\b \cf8 YES
  19455. \f0\b0 \cf4 ;\
  19456. icon.layer.cornerRadius = icon.frame.size.width/\cf7 2\cf4 ;\
  19457. [
  19458. \f2\b \cf8 self
  19459. \f0\b0 \cf4 .redBackV addSubview:icon];\
  19460. [g_server getHeadImageSmall:userId userName:userName imageView:icon];\
  19461. \
  19462. \
  19463. UILabel *name = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(icon.frame)+\cf7 5\cf4 , CGRectGetMinY(icon.frame)+(\cf7 30\cf4 -size.height)/\cf7 2\cf4 , size.width, size.height)];\
  19464. name.font = SYSFONT(\cf7 18\cf4 );\
  19465. name.text = [NSString stringWithFormat:\cf6 @"%@%@"\cf4 ,userName,Localized(\cf6 @"JX_FromRedPacket"\cf4 )];\
  19466. name.textColor = HEXCOLOR(\cf7 0xFEDCA2\cf4 );\
  19467. [
  19468. \f2\b \cf8 self
  19469. \f0\b0 \cf4 .redBackV addSubview:name];\
  19470. \
  19471. UILabel *tint = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 20\cf4 , CGRectGetMaxY(icon.frame)+\cf7 20\cf4 ,
  19472. \f2\b \cf8 self
  19473. \f0\b0 \cf4 .redBackV.frame.size.width-\cf7 40\cf4 , \cf7 28\cf4 )];\
  19474. tint.text = greetings;\
  19475. tint.font = SYSFONT(\cf7 25\cf4 );\
  19476. tint.textAlignment = NSTextAlignmentCenter;\
  19477. tint.textColor = HEXCOLOR(\cf7 0xFEDCA2\cf4 );\
  19478. [
  19479. \f2\b \cf8 self
  19480. \f0\b0 \cf4 .redBackV addSubview:tint];\
  19481. _tintLab = tint;\
  19482. \
  19483. CGFloat b = (h / JX_SCREEN_HEIGHT) * (h-\cf7 88\cf4 );\
  19484. \f2\b \cf8 self
  19485. \f0\b0 \cf4 .openImgV = [[UIImageView alloc] initWithFrame:CGRectMake((JX_SCREEN_WIDTH-\cf7 40\cf4 -\cf7 100\cf4 )/\cf7 2\cf4 , b, \cf7 100\cf4 , \cf7 100\cf4 )];\
  19486. \f2\b \cf8 self
  19487. \f0\b0 \cf4 .openImgV.userInteractionEnabled =
  19488. \f2\b \cf8 YES
  19489. \f0\b0 \cf4 ;\
  19490. \f2\b \cf8 self
  19491. \f0\b0 \cf4 .openImgV.image = [UIImage imageNamed:\cf6 @"icon_open_red_packet1"\cf4 ];\
  19492. [
  19493. \f2\b \cf8 self
  19494. \f0\b0 \cf4 .redBackV addSubview:
  19495. \f2\b \cf8 self
  19496. \f0\b0 \cf4 .openImgV];\
  19497. UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:
  19498. \f2\b \cf8 self
  19499. \f0\b0 \cf4 action:
  19500. \f2\b \cf8 @selector
  19501. \f0\b0 \cf4 (openReadPacket)];\
  19502. [
  19503. \f2\b \cf8 self
  19504. \f0\b0 \cf4 .openImgV addGestureRecognizer:tap];\
  19505. \
  19506. UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake((
  19507. \f2\b \cf8 self
  19508. \f0\b0 \cf4 .redBackV.frame.size.width-\cf7 140\cf4 )/\cf7 2\cf4 ,
  19509. \f2\b \cf8 self
  19510. \f0\b0 \cf4 .redBackV.frame.size.height-\cf7 18\cf4 -\cf7 40\cf4 , \cf7 140\cf4 , \cf7 18\cf4 )];\
  19511. label.textAlignment = NSTextAlignmentCenter;\
  19512. label.userInteractionEnabled =
  19513. \f2\b \cf8 YES
  19514. \f0\b0 \cf4 ;\
  19515. label.textColor = HEXCOLOR(\cf7 0xFEDCA2\cf4 );\
  19516. label.font = SYSFONT(\cf7 15\cf4 );\
  19517. label.text = Localized(\cf6 @"JX_CheckTheClaimDetails>"\cf4 );\
  19518. label.hidden = [userId intValue] != [MY_USER_ID intValue];\
  19519. [
  19520. \f2\b \cf8 self
  19521. \f0\b0 \cf4 .redBackV addSubview:label];\
  19522. _seeLab = label;\
  19523. \
  19524. UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithTarget:
  19525. \f2\b \cf8 self
  19526. \f0\b0 \cf4 action:
  19527. \f2\b \cf8 @selector
  19528. \f0\b0 \cf4 (CheckTheDetails)];\
  19529. [label addGestureRecognizer:tap1];\
  19530. \
  19531. UIView *canView = [[UIView alloc] initWithFrame:CGRectMake((JX_SCREEN_WIDTH-\cf7 40\cf4 )/\cf7 2\cf4 , (JX_SCREEN_HEIGHT-CGRectGetMaxY(
  19532. \f2\b \cf8 self
  19533. \f0\b0 \cf4 .redBackV.frame)-\cf7 40\cf4 )/\cf7 2\cf4 +CGRectGetMaxY(
  19534. \f2\b \cf8 self
  19535. \f0\b0 \cf4 .redBackV.frame)-\cf7 10\cf4 , \cf7 40\cf4 , \cf7 40\cf4 )];\
  19536. canView.backgroundColor = [UIColor clearColor];\
  19537. canView.layer.masksToBounds =
  19538. \f2\b \cf8 YES
  19539. \f0\b0 \cf4 ;\
  19540. canView.layer.cornerRadius = canView.frame.size.width/\cf7 2\cf4 ;\
  19541. canView.layer.borderWidth = \cf7 2.f\cf4 ;\
  19542. canView.layer.borderColor = HEXCOLOR(\cf7 0xE8C66A\cf4 ).CGColor;\
  19543. [
  19544. \f2\b \cf8 self
  19545. \f0\b0 \cf4 .redBaseView addSubview:canView];\
  19546. UITapGestureRecognizer *tapC = [[UITapGestureRecognizer alloc] initWithTarget:
  19547. \f2\b \cf8 self
  19548. \f0\b0 \cf4 action:
  19549. \f2\b \cf8 @selector
  19550. \f0\b0 \cf4 (cancelOpenRedPacket)];\
  19551. [canView addGestureRecognizer:tapC];\
  19552. \
  19553. UIImageView *cancelImgV = [[UIImageView alloc] initWithFrame:CGRectMake(\cf7 10\cf4 , \cf7 10\cf4 , \cf7 20\cf4 , \cf7 20\cf4 )];\
  19554. cancelImgV.image = [UIImage imageNamed:\cf6 @"icon_red_packet_close"\cf4 ];\
  19555. cancelImgV.userInteractionEnabled =
  19556. \f2\b \cf8 YES
  19557. \f0\b0 \cf4 ;\
  19558. [canView addSubview:cancelImgV];\
  19559. \
  19560. \
  19561. \}\
  19562. \
  19563. - (
  19564. \f2\b \cf8 void
  19565. \f0\b0 \cf4 )\cf11 CheckTheDetails\cf4 \{\
  19566. [_redBaseView removeFromSuperview];\
  19567. \
  19568. JXredPacketDetailVC * redPacketDetailVC = [[JXredPacketDetailVC alloc]init];\
  19569. redPacketDetailVC.dataDict = [[NSDictionary alloc]initWithDictionary:
  19570. \f2\b \cf8 self
  19571. \f0\b0 \cf4 .redPacketDict];\
  19572. redPacketDetailVC.isGroup =
  19573. \f2\b \cf8 self
  19574. \f0\b0 \cf4 .room.roomId.length > \cf7 0\cf4 ;\
  19575. [g_navigation pushViewController:redPacketDetailVC animated:
  19576. \f2\b \cf8 YES
  19577. \f0\b0 \cf4 ];\
  19578. \
  19579. \}\
  19580. \
  19581. - (
  19582. \f2\b \cf8 void
  19583. \f0\b0 \cf4 )\cf11 cancelOpenRedPacket\cf4 \{\
  19584. [
  19585. \f2\b \cf8 self
  19586. \f0\b0 \cf4 .redBaseView removeFromSuperview];\
  19587. \}\
  19588. \
  19589. \
  19590. - (
  19591. \f2\b \cf8 void
  19592. \f0\b0 \cf4 )\cf11 openReadPacket\cf4 \{\
  19593. NSMutableArray *imagesArray = [NSMutableArray array];\
  19594. \f2\b \cf8 for
  19595. \f0\b0 \cf4 (
  19596. \f2\b \cf8 int
  19597. \f0\b0 \cf4 i = \cf7 1\cf4 ; i < \cf7 12\cf4 ; i++) \{\
  19598. NSString *imageName = [NSString stringWithFormat:\cf6 @"icon_open_red_packet%d"\cf4 , i];\
  19599. UIImage *image = [UIImage imageNamed:imageName];\
  19600. [imagesArray addObject:image];\
  19601. \}\
  19602. _openImgV.animationImages = imagesArray;\
  19603. _openImgV.animationDuration = \cf7 0.7f\cf4 ;\
  19604. _openImgV.animationRepeatCount = \cf7 0\cf4 ;\
  19605. [_openImgV startAnimating];\
  19606. \
  19607. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 .6f\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
  19608. [_openImgV stopAnimating];\
  19609. \cf2 // [self cancelOpenRedPacket];\cf4 \
  19610. [g_server openRedPacket:
  19611. \f2\b \cf8 self
  19612. \f0\b0 \cf4 .redPacketDict[\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ] toView:
  19613. \f2\b \cf8 self
  19614. \f0\b0 \cf4 ];\
  19615. \});\
  19616. \}\
  19617. \
  19618. \cf5 #pragma mark
  19619. \f2\b \cf16 -------
  19620. \f4 \'d5\'d5\'c6\'ac\'b2\'e9\'bf\'b4
  19621. \f0\b0 \cf4 \
  19622. - (
  19623. \f2\b \cf8 void
  19624. \f0\b0 \cf4 )\cf11 onDidImage\cf4 :(NSNotification*)notification\{\
  19625. \f2\b \cf8 if
  19626. \f0\b0 \cf4 (recording) \{\
  19627. \f2\b \cf8 return
  19628. \f0\b0 \cf4 ;\
  19629. \}\
  19630. \f2\b \cf8 self
  19631. \f0\b0 \cf4 .indexNum = [notification.object intValue];\
  19632. [
  19633. \f2\b \cf8 self
  19634. \f0\b0 \cf4 hideKeyboard:
  19635. \f2\b \cf8 NO
  19636. \f0\b0 \cf4 ];\
  19637. JXMessageObject *msg = [_array objectAtIndex:[notification.object intValue]];\
  19638. \cf2 //
  19639. \f1 \'cd\'bc\'c6\'ac\'c2\'b7\'be\'b6\'ca\'fd\'d7\'e9
  19640. \f0 \cf4 \
  19641. NSMutableArray *imagePathArr = [[NSMutableArray alloc]init];\
  19642. NSMutableArray *msgArray = [NSMutableArray array];\
  19643. \f2\b \cf8 if
  19644. \f0\b0 \cf4 ([msg.isReadDel boolValue] || [msg.content rangeOfString:\cf6 @".gif"\cf4 ].location != NSNotFound) \{\cf2 //
  19645. \f1 \'ca\'c7\'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9
  19646. \f0 gif
  19647. \f1 \'cd\'bc\'c6\'ac
  19648. \f0 \cf4 \
  19649. \f2\b \cf8 if
  19650. \f0\b0 \cf4 (msg.content) \{\
  19651. [msgArray addObject:msg];\
  19652. [imagePathArr addObject:msg.content];\
  19653. \}\
  19654. \}
  19655. \f2\b \cf8 else
  19656. \f0\b0 \cf4 \{\
  19657. \cf2 //
  19658. \f1 \'bb\'f1\'c8\'a1\'cb\'f9\'d3\'d0\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
  19659. \f0 \cf4 \
  19660. NSString* s;\
  19661. \f2\b \cf8 if
  19662. \f0\b0 \cf4 ([
  19663. \f2\b \cf8 self
  19664. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
  19665. s =
  19666. \f2\b \cf8 self
  19667. \f0\b0 \cf4 .roomJid;\
  19668. \f2\b \cf8 else
  19669. \f0\b0 \cf4 \
  19670. s = chatPerson.userId;\
  19671. \f2\b \cf8 if
  19672. \f0\b0 \cf4 (msg.isMySend) \{\
  19673. _allChatImageArr = [msg fetchImageMessageListWithUser:s];\
  19674. \}
  19675. \f2\b \cf8 else
  19676. \f0\b0 \cf4 \{\
  19677. _allChatImageArr = [msg fetchImageMessageListWithUser:s];\
  19678. \}\
  19679. \
  19680. \f2\b \cf8 for
  19681. \f0\b0 \cf4 (
  19682. \f2\b \cf8 int
  19683. \f0\b0 \cf4 i = \cf7 0\cf4 ; i < [_allChatImageArr count]; i++) \{\
  19684. JXMessageObject * msgP = [_allChatImageArr objectAtIndex:i];\
  19685. \f2\b \cf8 if
  19686. \f0\b0 \cf4 (![msgP.isReadDel boolValue] && [msgP.content rangeOfString:\cf6 @".gif"\cf4 ].location == NSNotFound) \{\cf2 //
  19687. \f1 \'b5\'c3\'b5\'bd\'b5\'c4\'cf\'fb\'cf\'a2\'d6\'d0\'ba\'ac\'d3\'d0\'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9
  19688. \f0
  19689. \f1 \'bb\'f2
  19690. \f0 gif
  19691. \f1 \'cd\'bc\'c6\'ac
  19692. \f0
  19693. \f1 \'b5\'c4\'cc\'de\'b3\'fd\'b5\'f4
  19694. \f0 \cf4 \
  19695. \f2\b \cf8 if
  19696. \f0\b0 \cf4 (msgP.content) \{\
  19697. [msgArray addObject:msgP];\
  19698. NSString* url;\
  19699. \f2\b \cf8 if
  19700. \f0\b0 \cf4 (msgP.isMySend && isFileExist(msgP.fileName))\
  19701. url = msgP.fileName;\
  19702. \f2\b \cf8 else
  19703. \f0\b0 \cf4 \
  19704. url = msgP.content;\
  19705. [imagePathArr addObject:url];\
  19706. \}\
  19707. \}\
  19708. \}\
  19709. \}\
  19710. \
  19711. \f2\b \cf8 if
  19712. \f0\b0 \cf4 (
  19713. \f2\b \cf8 self
  19714. \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
  19715. \f2\b \cf8 if
  19716. \f0\b0 \cf4 (msg.content) \{\
  19717. [msgArray addObject:msg];\
  19718. NSString* url;\
  19719. \f2\b \cf8 if
  19720. \f0\b0 \cf4 (msg.isMySend && isFileExist(msg.fileName))\
  19721. url = msg.fileName;\
  19722. \f2\b \cf8 else
  19723. \f0\b0 \cf4 \
  19724. url = msg.content;\
  19725. [imagePathArr addObject:url];\
  19726. \}\
  19727. \}\
  19728. NSMutableArray *array = [NSMutableArray array];\
  19729. NSMutableArray *arrayURL = [NSMutableArray array];\
  19730. \
  19731. \f2\b \cf8 if
  19732. \f0\b0 \cf4 (msg.content ==
  19733. \f2\b \cf8 nil
  19734. \f0\b0 \cf4 ) \{\
  19735. \f2\b \cf8 return
  19736. \f0\b0 \cf4 ;\
  19737. \}\
  19738. [arrayURL addObject:msg.content];\
  19739. [array addObject:msg];\
  19740. \
  19741. \f2\b \cf8 if
  19742. \f0\b0 \cf4 (array.count < \cf7 1\cf4 ) \{\
  19743. \f2\b \cf8 return
  19744. \f0\b0 \cf4 ;\
  19745. \}\
  19746. \
  19747. \cf2 // [ImageBrowserViewController show:self delegate:self type:PhotoBroswerVCTypeModal contentArray:array index:0 imagesBlock:^NSArray *\{\cf4 \
  19748. \cf2 // return arrayURL;\cf4 \
  19749. \cf2 // \}];\cf4 \
  19750. [ImageBrowserViewController show:
  19751. \f2\b \cf8 self
  19752. \f0\b0 \cf4 delegate:
  19753. \f2\b \cf8 self
  19754. \f0\b0 \cf4 isReadDel:
  19755. \f2\b \cf8 YES
  19756. \f0\b0 \cf4 type:PhotoBroswerVCTypeModal contentArray:array index:\cf7 0\cf4 imagesBlock:^NSArray *\{\
  19757. \f2\b \cf8 return
  19758. \f0\b0 \cf4 arrayURL;\
  19759. \}];\
  19760. \cf2 //
  19761. \f1 \'b2\'e9\'b5\'bd\'b5\'b1\'c7\'b0\'b5\'e3\'bb\'f7\'b5\'c4\'cd\'bc\'c6\'ac\'b5\'c4\'ce\'bb\'d6\'c3
  19762. \f0 \cf4 \
  19763. \cf2 // for (int i = 0; i < [msgArray count]; i++) \{\cf4 \
  19764. \cf2 // JXMessageObject * msgObj = [msgArray objectAtIndex:i];\cf4 \
  19765. \cf2 // if ([msg.messageId isEqualToString:msgObj.messageId]) \{\cf4 \
  19766. \cf2 //\cf4 \
  19767. \cf2 // [ImageBrowserViewController show:self delegate:self isReadDel:[msgObj.isReadDel boolValue] type:PhotoBroswerVCTypeModal contentArray:msgArray index:i imagesBlock:^NSArray *\{\cf4 \
  19768. \cf2 // return imagePathArr;\cf4 \
  19769. \cf2 // \}];\cf4 \
  19770. \cf2 //\cf4 \
  19771. \cf2 // \}\cf4 \
  19772. \cf2 // \}\cf4 \
  19773. imagePathArr =
  19774. \f2\b \cf8 nil
  19775. \f0\b0 \cf4 ;\
  19776. \}\
  19777. \
  19778. - (
  19779. \f2\b \cf8 void
  19780. \f0\b0 \cf4 )\cf11 imageBrowserVCQRCodeAction\cf4 :(NSString *)stringValue \{\
  19781. \
  19782. NSRange range = [stringValue rangeOfString:\cf6 @"shikuId"\cf4 ];\
  19783. \f2\b \cf8 if
  19784. \f0\b0 \cf4 (range.location != NSNotFound) \{\
  19785. \
  19786. NSString * idStr = [stringValue substringFromIndex:range.location + range.length + \cf7 1\cf4 ];\
  19787. \
  19788. \f2\b \cf8 if
  19789. \f0\b0 \cf4 ([stringValue rangeOfString:\cf6 @"=user"\cf4 ].location != NSNotFound) \{\
  19790. \cf2 // [g_server getUser:idStr toView:self];\cf4 \
  19791. [g_server userGetByAccountWithAccount:idStr toView:
  19792. \f2\b \cf8 self
  19793. \f0\b0 \cf4 ];\
  19794. \
  19795. \}
  19796. \f2\b \cf8 else
  19797. \f0\b0 \cf4
  19798. \f2\b \cf8 if
  19799. \f0\b0 \cf4 ([stringValue rangeOfString:\cf6 @"=group"\cf4 ].location != NSNotFound) \{\
  19800. \
  19801. [g_server getRoom:idStr toView:
  19802. \f2\b \cf8 self
  19803. \f0\b0 \cf4 ];\
  19804. \cf2 // JXRoomMemberVC* vc = [JXRoomMemberVC alloc];\cf4 \
  19805. \cf2 // vc.roomId = idStr;\cf4 \
  19806. \cf2 // vc = [vc init];\cf4 \
  19807. \cf2 // [g_navigation pushViewController:vc animated:YES];\cf4 \
  19808. \}
  19809. \f2\b \cf8 else
  19810. \f0\b0 \cf4
  19811. \f2\b \cf8 if
  19812. \f0\b0 \cf4 ([stringValue rangeOfString:\cf6 @"=open"\cf4 ].location != NSNotFound) \{\
  19813. \f2\b \cf8 if
  19814. \f0\b0 \cf4 ([idStr rangeOfString:\cf6 @"http://"\cf4 ].location != NSNotFound && [idStr rangeOfString:\cf6 @"https://"\cf4 ].location != NSNotFound) \{\
  19815. webpageVC * webVC = [webpageVC alloc];\
  19816. webVC.url= idStr;\
  19817. webVC.isSend =
  19818. \f2\b \cf8 YES
  19819. \f0\b0 \cf4 ;\
  19820. webVC = [webVC init];\
  19821. [g_navigation.navigationView addSubview:webVC.view];\
  19822. \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
  19823. \}
  19824. \f2\b \cf8 else
  19825. \f0\b0 \cf4 \{\
  19826. [g_App showAlert:Localized(\cf6 @"JX_TheUrlNotOpen"\cf4 )];\
  19827. \}\
  19828. \}\
  19829. \
  19830. \}
  19831. \f2\b \cf8 else
  19832. \f0\b0 \cf4 \{\
  19833. NSRange idRange = [stringValue rangeOfString:\cf6 @"userId"\cf4 ];\
  19834. NSRange nameRange = [stringValue rangeOfString:\cf6 @"userName"\cf4 ];\
  19835. \
  19836. \f2\b \cf8 if
  19837. \f0\b0 \cf4 ([stringValue hasPrefix:\cf6 @"http://"\cf4 ] || [stringValue hasPrefix:\cf6 @"https://"\cf4 ]) \{\
  19838. webpageVC * webVC = [webpageVC alloc];\
  19839. webVC.url= stringValue;\
  19840. webVC.isSend =
  19841. \f2\b \cf8 YES
  19842. \f0\b0 \cf4 ;\
  19843. webVC = [webVC init];\
  19844. [g_navigation.navigationView addSubview:webVC.view];\
  19845. \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
  19846. \
  19847. \}
  19848. \f2\b \cf8 else
  19849. \f0\b0 \cf4
  19850. \f2\b \cf8 if
  19851. \f0\b0 \cf4 (stringValue.length == \cf7 20\cf4 && [
  19852. \f2\b \cf8 self
  19853. \f0\b0 \cf4 isNumber:stringValue])\{\
  19854. \cf2 //
  19855. \f1 \'b6\'d4\'c3\'e6\'b8\'b6\'bf\'ee\'a3\'ac
  19856. \f0
  19857. \f1 \'bc\'ba\'b7\'bd\'ca\'d5\'bf\'ee
  19858. \f0 \cf4 \
  19859. JXInputMoneyVC *inputVC = [[JXInputMoneyVC alloc] init];\
  19860. inputVC.type = JXInputMoneyTypeCollection;\
  19861. inputVC.paymentCode = stringValue;\
  19862. [g_navigation pushViewController:inputVC animated:
  19863. \f2\b \cf8 YES
  19864. \f0\b0 \cf4 ];\
  19865. \}
  19866. \f2\b \cf8 else
  19867. \f0\b0 \cf4
  19868. \f2\b \cf8 if
  19869. \f0\b0 \cf4 (idRange.location != NSNotFound && nameRange.location != NSNotFound) \{\
  19870. \cf2 //
  19871. \f1 \'bc\'ba\'b7\'bd\'b8\'b6\'bf\'ee\'a3\'ac
  19872. \f0
  19873. \f1 \'b6\'d4\'c3\'e6\'ca\'d5\'bf\'ee
  19874. \f0 \cf4 \
  19875. SBJsonParser * resultParser = [[SBJsonParser alloc] init] ;\
  19876. NSDictionary *dict = [resultParser objectWithString:stringValue];\
  19877. JXInputMoneyVC *inputVC = [[JXInputMoneyVC alloc] init];\
  19878. inputVC.type = JXInputMoneyTypePayment;\
  19879. inputVC.userId = [dict objectForKey:\cf6 @"userId"\cf4 ];\
  19880. inputVC.userName = [dict objectForKey:\cf6 @"userName"\cf4 ];\
  19881. \f2\b \cf8 if
  19882. \f0\b0 \cf4 ([dict objectForKey:\cf6 @"money"\cf4 ]) \{\
  19883. inputVC.money = [dict objectForKey:\cf6 @"money"\cf4 ];\
  19884. \}\
  19885. \f2\b \cf8 if
  19886. \f0\b0 \cf4 ([dict objectForKey:\cf6 @"description"\cf4 ]) \{\
  19887. inputVC.desStr = [dict objectForKey:\cf6 @"description"\cf4 ];\
  19888. \}\
  19889. [g_navigation pushViewController:inputVC animated:
  19890. \f2\b \cf8 YES
  19891. \f0\b0 \cf4 ];\
  19892. \}\
  19893. \}\
  19894. \}\
  19895. \
  19896. - (
  19897. \f2\b \cf8 BOOL
  19898. \f0\b0 \cf4 )\cf11 isNumber\cf4 :(NSString *)strValue\
  19899. \{\
  19900. \f2\b \cf8 if
  19901. \f0\b0 \cf4 (strValue ==
  19902. \f2\b \cf8 nil
  19903. \f0\b0 \cf4 || [strValue length] <= \cf7 0\cf4 )\
  19904. \{\
  19905. \f2\b \cf8 return
  19906. \f0\b0 \cf4
  19907. \f2\b \cf8 NO
  19908. \f0\b0 \cf4 ;\
  19909. \}\
  19910. \
  19911. NSCharacterSet *cs = [[NSCharacterSet characterSetWithCharactersInString:\cf6 @"0123456789"\cf4 ] invertedSet];\
  19912. NSString *filtered = [[strValue componentsSeparatedByCharactersInSet:cs] componentsJoinedByString:\cf6 @""\cf4 ];\
  19913. \
  19914. \f2\b \cf8 if
  19915. \f0\b0 \cf4 (![strValue isEqualToString:filtered])\
  19916. \{\
  19917. \f2\b \cf8 return
  19918. \f0\b0 \cf4
  19919. \f2\b \cf8 NO
  19920. \f0\b0 \cf4 ;\
  19921. \}\
  19922. \f2\b \cf8 return
  19923. \f0\b0 \cf4
  19924. \f2\b \cf8 YES
  19925. \f0\b0 \cf4 ;\
  19926. \}\
  19927. \
  19928. \
  19929. - (
  19930. \f2\b \cf8 void
  19931. \f0\b0 \cf4 )\cf11 dismissImageBrowserVC\cf4 \{\
  19932. JXImageCell *cell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:
  19933. \f2\b \cf8 self
  19934. \f0\b0 \cf4 .indexNum inSection:\cf7 0\cf4 ]];\
  19935. \f2\b \cf8 if
  19936. \f0\b0 \cf4 (!cell.msg.isMySend) \{\
  19937. [cell deleteReadMsg];\
  19938. \}\
  19939. \}\
  19940. \
  19941. -(
  19942. \f2\b \cf8 void
  19943. \f0\b0 \cf4 )\cf11 readTypeMsgCome\cf4 :(NSNotification*)notification\{\cf2 //
  19944. \f1 \'b7\'a2\'cb\'cd\'b7\'bd\'ca\'d5\'b5\'bd\'d2\'d1\'b6\'c1\'c0\'e0\'d0\'cd\'a3\'ac\'b8\'c4\'b1\'e4\'cf\'fb\'cf\'a2\'cd\'bc\'c6\'ac\'ce\'aa\'d2\'d1\'b6\'c1
  19945. \f0 \cf4 \
  19946. \
  19947. \cf2 //
  19948. \f1 \'b8\'fc\'d0\'c2
  19949. \f0 title
  19950. \f1 \'d4\'da\'cf\'df\'d7\'b4\'cc\'ac
  19951. \f0 \cf4 \
  19952. \f2\b \cf8 if
  19953. \f0\b0 \cf4 (!
  19954. \f2\b \cf8 self
  19955. \f0\b0 \cf4 .roomJid && !
  19956. \f2\b \cf8 self
  19957. \f0\b0 \cf4 .onlinestate) \{\
  19958. \f2\b \cf8 self
  19959. \f0\b0 \cf4 .onlinestate =
  19960. \f2\b \cf8 YES
  19961. \f0\b0 \cf4 ;\
  19962. \f2\b \cf8 if
  19963. \f0\b0 \cf4 (
  19964. \f2\b \cf8 self
  19965. \f0\b0 \cf4 .isGroupMessages) \{\
  19966. \f2\b \cf8 self
  19967. \f0\b0 \cf4 .title = Localized(\cf6 @"JX_GroupHair"\cf4 );\
  19968. [
  19969. \f2\b \cf8 self
  19970. \f0\b0 \cf4 setAudioIconFrame];\
  19971. \}
  19972. \f2\b \cf8 else
  19973. \f0\b0 \cf4 \{\
  19974. \f2\b \cf8 if
  19975. \f0\b0 \cf4 (
  19976. \f2\b \cf8 self
  19977. \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
  19978. \
  19979. \}
  19980. \f2\b \cf8 else
  19981. \f0\b0 \cf4 \{\
  19982. \f2\b \cf8 if
  19983. \f0\b0 \cf4 ([chatPerson.userId intValue]<\cf7 10100\cf4 && [chatPerson.userId intValue]>=\cf7 10000\cf4 ) \{\
  19984. \f2\b \cf8 self
  19985. \f0\b0 \cf4 .title = chatPerson.userNickname;\
  19986. [
  19987. \f2\b \cf8 self
  19988. \f0\b0 \cf4 setAudioIconFrame];\
  19989. \
  19990. \}
  19991. \f2\b \cf8 else
  19992. \f0\b0 \cf4 \{\
  19993. \cf2 // NSString *str = self.onlinestate ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
  19994. \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.remarkName.length > 0 ? chatPerson.remarkName : chatPerson.userNickname,str];\cf4 \
  19995. [
  19996. \f2\b \cf8 self
  19997. \f0\b0 \cf4 setChatTitle:chatPerson.remarkName.length > \cf7 0\cf4 ? chatPerson.remarkName : chatPerson.userNickname];\
  19998. \
  19999. \}\
  20000. \}\
  20001. \
  20002. \}\
  20003. \}\
  20004. \
  20005. JXMessageObject * msg = (JXMessageObject *)notification.object;\
  20006. \f2\b \cf8 if
  20007. \f0\b0 \cf4 (msg ==
  20008. \f2\b \cf8 nil
  20009. \f0\b0 \cf4 )\
  20010. \f2\b \cf8 return
  20011. \f0\b0 \cf4 ;\
  20012. \
  20013. NSString * msgId = msg.content;\
  20014. \f2\b \cf8 for
  20015. \f0\b0 \cf4 (
  20016. \f2\b \cf8 int
  20017. \f0\b0 \cf4 i = \cf7 0\cf4 ; i < [_array count]; i ++) \{\
  20018. JXMessageObject * p = [_array objectAtIndex:i];\
  20019. \f2\b \cf8 if
  20020. \f0\b0 \cf4 ([p.messageId isEqualToString:msgId]) \{\
  20021. \f2\b \cf8 if
  20022. \f0\b0 \cf4 (p.isMySend)\{\
  20023. p.isRead = [NSNumber numberWithInt:\cf7 1\cf4 ];\
  20024. p.isSend = [NSNumber numberWithInt:\cf7 1\cf4 ];\
  20025. \}\
  20026. p.readPersons = [NSNumber numberWithInt:[p.readPersons intValue] + \cf7 1\cf4 ];\
  20027. JXBaseChatCell* cell = [
  20028. \f2\b \cf8 self
  20029. \f0\b0 \cf4 getCell:i];\
  20030. \f2\b \cf8 if
  20031. \f0\b0 \cf4 (cell)\{\
  20032. [cell drawIsSend];\
  20033. \cf2 // [cell drawIsRead];\cf4 \
  20034. \}\
  20035. \
  20036. \
  20037. \f2\b \cf8 if
  20038. \f0\b0 \cf4 ([p.isReadDel boolValue]) \{\
  20039. \
  20040. \f2\b \cf8 if
  20041. \f0\b0 \cf4 (!cell) \{\
  20042. \
  20043. [
  20044. \f2\b \cf8 self
  20045. \f0\b0 \cf4 readDeleWithUser:p];\
  20046. \f2\b \cf8 break
  20047. \f0\b0 \cf4 ;\
  20048. \}\
  20049. \
  20050. \f2\b \cf8 switch
  20051. \f0\b0 \cf4 ([p.type intValue]) \{\
  20052. \f2\b \cf8 case
  20053. \f0\b0 \cf4 kWCMessageTypeImage:\{\
  20054. JXImageCell *imageCell = (JXImageCell *)cell;\
  20055. imageCell.isRemove =
  20056. \f2\b \cf8 YES
  20057. \f0\b0 \cf4 ;\
  20058. [imageCell timeGo:p];\
  20059. \cf2 // [g_notify postNotificationName:kImageDidTouchEndNotification object:p];\cf4 \
  20060. \}\
  20061. \f2\b \cf8 break
  20062. \f0\b0 \cf4 ;\
  20063. \f2\b \cf8 case
  20064. \f0\b0 \cf4 kWCMessageTypeCustomFace:\
  20065. \{\
  20066. JXFaceCustomCell *imageCell = (JXFaceCustomCell *)cell;\
  20067. imageCell.isRemove =
  20068. \f2\b \cf8 YES
  20069. \f0\b0 \cf4 ;\
  20070. [imageCell timeGo:p];\
  20071. \cf2 // [g_notify postNotificationName:kImageDidTouchEndNotification object:p];\cf4 \
  20072. \}\
  20073. \f2\b \cf8 break
  20074. \f0\b0 \cf4 ;\
  20075. \f2\b \cf8 case
  20076. \f0\b0 \cf4 kWCMessageTypeEmoji:\
  20077. \{\
  20078. JXEmojiCell *imageCell = (JXEmojiCell *)cell;\
  20079. imageCell.isRemove =
  20080. \f2\b \cf8 YES
  20081. \f0\b0 \cf4 ;\
  20082. [imageCell timeGo:p];\
  20083. \cf2 // [g_notify postNotificationName:kImageDidTouchEndNotification object:p];\cf4 \
  20084. \}\
  20085. \f2\b \cf8 break
  20086. \f0\b0 \cf4 ;\
  20087. \f2\b \cf8 case
  20088. \f0\b0 \cf4 kWCMessageTypeVoice:\{\
  20089. JXAudioCell *audioCell = (JXAudioCell *)cell;\
  20090. [audioCell timeGo:p.fileName];\
  20091. \}\
  20092. \
  20093. \f2\b \cf8 break
  20094. \f0\b0 \cf4 ;\
  20095. \f2\b \cf8 case
  20096. \f0\b0 \cf4 kWCMessageTypeVideo:\{\
  20097. JXVideoCell *videoCell = (JXVideoCell *)cell;\
  20098. [videoCell timeGo:p.fileName];\
  20099. \}\
  20100. \
  20101. \f2\b \cf8 break
  20102. \f0\b0 \cf4 ;\
  20103. \f2\b \cf8 case
  20104. \f0\b0 \cf4 kWCMessageTypeText:\{\
  20105. JXMessageCell *messageCell = (JXMessageCell *)cell;\
  20106. [messageCell deleteMsg:messageCell.msg];\
  20107. \cf2 // [self readDeleWithUser:messageCell.msg];\cf4 \
  20108. \}\
  20109. \f2\b \cf8 break
  20110. \f0\b0 \cf4 ;\
  20111. \f2\b \cf8 case
  20112. \f0\b0 \cf4 kWCMessageTypeReply:\{\
  20113. JXReplyCell *replyCell = (JXReplyCell *)cell;\
  20114. [replyCell deleteMsg:replyCell.msg];\
  20115. \}\
  20116. \f2\b \cf8 break
  20117. \f0\b0 \cf4 ;\
  20118. \f2\b \cf8 default
  20119. \f0\b0 \cf4 :\
  20120. \f2\b \cf8 break
  20121. \f0\b0 \cf4 ;\
  20122. \}\
  20123. \}\
  20124. \
  20125. \f2\b \cf8 break
  20126. \f0\b0 \cf4 ;\
  20127. \}\
  20128. \}\
  20129. \}\
  20130. \
  20131. -(
  20132. \f2\b \cf8 void
  20133. \f0\b0 \cf4 )\cf11 readTypeMsgReceipt\cf4 :(NSNotification*)notification\{\cf2 //
  20134. \f1 \'bd\'d3\'ca\'d5\'b7\'bd\'ca\'d5\'b5\'bd\'d2\'d1\'b6\'c1\'cf\'fb\'cf\'a2\'b5\'c4\'bb\'d8\'d6\'b4\'a3\'ac\'b8\'c4\'b1\'e4\'b1\'ea\'d6\'be\'b1\'dc\'c3\'e2\'d6\'d8\'b8\'b4\'b7\'a2
  20135. \f0 \cf4 \
  20136. JXMessageObject * msg = (JXMessageObject *)notification.object;\
  20137. \f2\b \cf8 if
  20138. \f0\b0 \cf4 (msg ==
  20139. \f2\b \cf8 nil
  20140. \f0\b0 \cf4 )\
  20141. \f2\b \cf8 return
  20142. \f0\b0 \cf4 ;\
  20143. \
  20144. \f2\b \cf8 for
  20145. \f0\b0 \cf4 (
  20146. \f2\b \cf8 int
  20147. \f0\b0 \cf4 i = \cf7 0\cf4 ; i < [_array count]; i ++) \{\
  20148. JXMessageObject * p = [_array objectAtIndex:i];\
  20149. \f2\b \cf8 if
  20150. \f0\b0 \cf4 ([p.messageId isEqualToString:msg.content])\{\
  20151. \f2\b \cf8 if
  20152. \f0\b0 \cf4 (msg.isMySend)\{\
  20153. p.isRead = [NSNumber numberWithInt:\cf7 1\cf4 ];\
  20154. p.isSend = [NSNumber numberWithInt:\cf7 1\cf4 ];\
  20155. \}\
  20156. p.readPersons = [NSNumber numberWithInt:[p.readPersons intValue] + \cf7 1\cf4 ];\
  20157. JXBaseChatCell* cell = [
  20158. \f2\b \cf8 self
  20159. \f0\b0 \cf4 getCell:i];\
  20160. \f2\b \cf8 if
  20161. \f0\b0 \cf4 (cell)\{\
  20162. [cell drawIsSend];\
  20163. [cell drawIsRead];\
  20164. \}\
  20165. \f2\b \cf8 break
  20166. \f0\b0 \cf4 ;\
  20167. \}\
  20168. \}\
  20169. \}\
  20170. \
  20171. \cf2 //
  20172. \f1 \'bb\'f1\'c8\'a1\'bf\'da\'c1\'ee\'ba\'ec\'b0\'fc\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
  20173. \f0 \cf4 \
  20174. -(NSMutableArray*)\cf11 fetchRedPacketListWithType\cf4 :(
  20175. \f2\b \cf8 int
  20176. \f0\b0 \cf4 )rpType\
  20177. \{\
  20178. NSString* myUserId = MY_USER_ID;\
  20179. \f2\b \cf8 if
  20180. \f0\b0 \cf4 ([myUserId length]<=\cf7 0\cf4 )\
  20181. \f2\b \cf8 return
  20182. \f0\b0 \cf4
  20183. \f2\b \cf8 nil
  20184. \f0\b0 \cf4 ;\
  20185. FMDatabase* db = [[JXXMPP sharedInstance] openUserDb:myUserId];\
  20186. \
  20187. NSMutableArray *messageList=[[NSMutableArray alloc]init];\
  20188. NSString *s;\
  20189. \f2\b \cf8 if
  20190. \f0\b0 \cf4 ([
  20191. \f2\b \cf8 self
  20192. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
  20193. s =
  20194. \f2\b \cf8 self
  20195. \f0\b0 \cf4 .roomJid;\
  20196. \f2\b \cf8 else
  20197. \f0\b0 \cf4 \
  20198. s = chatPerson.userId;\
  20199. \
  20200. NSString *queryString=[NSString stringWithFormat:\cf6 @"select * from msg_%@ where type=28 and fileName=3"\cf4 ,s];\
  20201. \
  20202. FMResultSet *rs=[db executeQuery:queryString];\
  20203. \f2\b \cf8 while
  20204. \f0\b0 \cf4 ([rs next]) \{\
  20205. JXMessageObject *p=[[JXMessageObject alloc]init];\
  20206. [p fromRs:rs];\
  20207. [messageList addObject:p];\
  20208. \cf2 // [p release];\cf4 \
  20209. \}\
  20210. [rs close];\
  20211. db =
  20212. \f2\b \cf8 nil
  20213. \f0\b0 \cf4 ;\
  20214. \
  20215. \f2\b \cf8 if
  20216. \f0\b0 \cf4 ([messageList count]==\cf7 0\cf4 )\{\
  20217. \cf2 // [messageList release];\cf4 \
  20218. messageList =
  20219. \f2\b \cf8 nil
  20220. \f0\b0 \cf4 ;\
  20221. \}\
  20222. \f2\b \cf8 return
  20223. \f0\b0 \cf4 messageList;\
  20224. \}\
  20225. \
  20226. \cf2 //
  20227. \f1 \'b8\'c4\'b1\'e4\'ba\'ec\'b0\'fc\'b6\'d4\'d3\'a6\'cf\'fb\'cf\'a2\'b5\'c4\'b2\'bb\'bf\'c9\'bb\'f1\'c8\'a1
  20228. \f0 \cf4 \
  20229. -(
  20230. \f2\b \cf8 void
  20231. \f0\b0 \cf4 )\cf11 changeMessageRedPacketStatus\cf4 :(NSString*)redPacketId\{\
  20232. NSString* myUserId = MY_USER_ID;\
  20233. \f2\b \cf8 if
  20234. \f0\b0 \cf4 ([myUserId length]<=\cf7 0\cf4 )\{\
  20235. \f2\b \cf8 return
  20236. \f0\b0 \cf4 ;\
  20237. \}\
  20238. FMDatabase* db = [[JXXMPP sharedInstance] openUserDb:myUserId];\
  20239. \
  20240. NSString * sufStr =
  20241. \f2\b \cf8 self
  20242. \f0\b0 \cf4 .roomJid ?
  20243. \f2\b \cf8 self
  20244. \f0\b0 \cf4 .roomJid :
  20245. \f2\b \cf8 self
  20246. \f0\b0 \cf4 .chatPerson.userId;\
  20247. \
  20248. NSString * sql = [NSString stringWithFormat:\cf6 @"update msg_%@ set fileSize=2 where objectId=?"\cf4 ,sufStr];\
  20249. \
  20250. [db executeUpdate:sql,redPacketId];\
  20251. \
  20252. db =
  20253. \f2\b \cf8 nil
  20254. \f0\b0 \cf4 ;\
  20255. \}\
  20256. \cf2 //
  20257. \f1 \'b8\'c4\'b1\'e4\'ba\'ec\'b0\'fc\'cf\'fb\'cf\'a2\'b2\'bb\'bf\'c9\'bb\'f1\'c8\'a1
  20258. \f0 \cf4 \
  20259. - (
  20260. \f2\b \cf8 void
  20261. \f0\b0 \cf4 )\cf11 changeMessageArrFileSize\cf4 :(NSString *)redPackerId\{\
  20262. \f2\b \cf8 for
  20263. \f0\b0 \cf4 (NSInteger i = _array.count - \cf7 1\cf4 ; i >= \cf7 0\cf4 ; i --) \{\
  20264. JXMessageObject *msg = _array[i];\
  20265. \f2\b \cf8 if
  20266. \f0\b0 \cf4 ([msg.objectId isEqualToString:redPackerId]) \{\
  20267. msg.fileSize = [NSNumber numberWithInt:\cf7 2\cf4 ];\
  20268. JXBaseChatCell *cell = [
  20269. \f2\b \cf8 self
  20270. \f0\b0 \cf4 .tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:\cf7 0\cf4 ]];\
  20271. \f2\b \cf8 if
  20272. \f0\b0 \cf4 (cell) \{\
  20273. [
  20274. \f2\b \cf8 self
  20275. \f0\b0 \cf4 .tableView reloadRow:(
  20276. \f2\b \cf8 int
  20277. \f0\b0 \cf4 )i section:\cf7 0\cf4 ];\
  20278. \}\
  20279. \}\
  20280. \}\
  20281. \f2\b \cf8 for
  20282. \f0\b0 \cf4 (JXMessageObject * msg
  20283. \f2\b \cf8 in
  20284. \f0\b0 \cf4 _orderRedPacketArray) \{\
  20285. \f2\b \cf8 if
  20286. \f0\b0 \cf4 ([msg.objectId isEqualToString:redPackerId]) \{\
  20287. msg.fileSize = [NSNumber numberWithInt:\cf7 2\cf4 ];\
  20288. \}\
  20289. \}\
  20290. \}\
  20291. \cf2 //
  20292. \f1 \'b8\'fc\'d0\'c2\'d7\'aa\'d5\'cb\'d2\'d1\'c1\'ec\'c8\'a1\'d7\'b4\'cc\'ac
  20293. \f0 \cf4 \
  20294. - (
  20295. \f2\b \cf8 void
  20296. \f0\b0 \cf4 )\cf11 updateTransferMsgFileSize\cf4 :(NSNotification *)noti \{\
  20297. NSString *str = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,noti.object];\
  20298. \
  20299. JXMessageObject *msg = [[JXMessageObject alloc] init];\
  20300. msg.objectId = str;\
  20301. msg.toUserId =
  20302. \f2\b \cf8 self
  20303. \f0\b0 \cf4 .chatPerson.userId;\
  20304. NSMutableArray *msgs = [msg getMsgWithObjectId:str];\
  20305. \f2\b \cf8 for
  20306. \f0\b0 \cf4 (
  20307. \f2\b \cf8 int
  20308. \f0\b0 \cf4 i = \cf7 0\cf4 ; i < msgs.count; i++) \{\
  20309. JXMessageObject *msg1 = msgs[i];\
  20310. msg1.fileSize = [NSNumber numberWithInt:\cf7 2\cf4 ];\
  20311. [msg1 updateFileSize];\
  20312. \}\
  20313. \
  20314. [
  20315. \f2\b \cf8 self
  20316. \f0\b0 \cf4 changeMessageArrFileSize:str];\
  20317. \}\
  20318. \
  20319. -(JXBaseChatCell*)\cf11 getCell\cf4 :(
  20320. \f2\b \cf8 long
  20321. \f0\b0 \cf4 )index\{\
  20322. \f2\b \cf8 if
  20323. \f0\b0 \cf4 (index<\cf7 0\cf4 && index >= [_array count])\
  20324. \f2\b \cf8 return
  20325. \f0\b0 \cf4
  20326. \f2\b \cf8 nil
  20327. \f0\b0 \cf4 ;\
  20328. NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index inSection:\cf7 0\cf4 ];\
  20329. \f2\b \cf8 return
  20330. \f0\b0 \cf4 (JXBaseChatCell*)[_table cellForRowAtIndexPath:indexPath];\
  20331. \}\
  20332. \cf5 #pragma mark
  20333. \f2\b \cf16 ------
  20334. \f4 \'d7\'d4\'b6\'af\'cf\'f2\'cf\'c2\'b2\'a5\'b7\'c5\'d3\'ef\'d2\'f4
  20335. \f0\b0 \cf4 \
  20336. -(
  20337. \f2\b \cf8 void
  20338. \f0\b0 \cf4 )\cf11 audioPlayEnd\cf4 :(NSNotification*)notification\{\
  20339. JXAudioCell* cell = (JXAudioCell*)notification.object;\
  20340. JXMessageObject *msg=cell.msg;\
  20341. _lastIndex = cell.indexNum;\
  20342. \cf2 //msg.isReadDel = [NSNumber numberWithBool:YES];\cf4 \
  20343. \f2\b \cf8 if
  20344. \f0\b0 \cf4 ([msg.isReadDel boolValue]) \{\
  20345. \f2\b \cf8 return
  20346. \f0\b0 \cf4 ;\
  20347. \}\
  20348. \f2\b \cf8 if
  20349. \f0\b0 \cf4 (_lastIndex >= _array.count)\
  20350. \f2\b \cf8 return
  20351. \f0\b0 \cf4 ;\
  20352. \
  20353. \f2\b \cf8 while
  20354. \f0\b0 \cf4 (_lastIndex<_array.count) \{\
  20355. _lastIndex++;\
  20356. \f2\b \cf8 if
  20357. \f0\b0 \cf4 (_lastIndex>=_array.count)\
  20358. \f2\b \cf8 break
  20359. \f0\b0 \cf4 ;\
  20360. msg = [_array objectAtIndex:_lastIndex];\
  20361. \f2\b \cf8 if
  20362. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeVoice && ![msg.isRead boolValue] && !msg.isMySend)\{\
  20363. JXAudioCell* nextCell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:_lastIndex inSection:\cf7 0\cf4 ]];\
  20364. [nextCell.audioPlayer
  20365. \f2\b \cf8 switch
  20366. \f0\b0 \cf4 ];\
  20367. \f2\b \cf8 break
  20368. \f0\b0 \cf4 ;\
  20369. \}\
  20370. \}\
  20371. \
  20372. msg =
  20373. \f2\b \cf8 nil
  20374. \f0\b0 \cf4 ;\
  20375. cell =
  20376. \f2\b \cf8 nil
  20377. \f0\b0 \cf4 ;\
  20378. \}\
  20379. \
  20380. - (
  20381. \f2\b \cf8 BOOL
  20382. \f0\b0 \cf4 )\cf11 canRecord\cf4 \
  20383. \{\
  20384. \f2\b \cf8 __block
  20385. \f0\b0 \cf4
  20386. \f2\b \cf8 BOOL
  20387. \f0\b0 \cf4 bCanRecord =
  20388. \f2\b \cf8 YES
  20389. \f0\b0 \cf4 ;\
  20390. \f2\b \cf8 if
  20391. \f0\b0 \cf4 ([[[UIDevice currentDevice]systemVersion]floatValue] >= \cf7 7.0\cf4 ) \{\
  20392. AVAudioSession *audioSession = [AVAudioSession sharedInstance];\
  20393. \f2\b \cf8 if
  20394. \f0\b0 \cf4 ([audioSession respondsToSelector:
  20395. \f2\b \cf8 @selector
  20396. \f0\b0 \cf4 (requestRecordPermission:)]) \{\
  20397. [audioSession performSelector:
  20398. \f2\b \cf8 @selector
  20399. \f0\b0 \cf4 (requestRecordPermission:) withObject:^(
  20400. \f2\b \cf8 BOOL
  20401. \f0\b0 \cf4 granted) \{\
  20402. \f2\b \cf8 if
  20403. \f0\b0 \cf4 (granted) \{\
  20404. bCanRecord =
  20405. \f2\b \cf8 YES
  20406. \f0\b0 \cf4 ;\
  20407. \}
  20408. \f2\b \cf8 else
  20409. \f0\b0 \cf4 \{\
  20410. bCanRecord =
  20411. \f2\b \cf8 NO
  20412. \f0\b0 \cf4 ;\
  20413. \}\
  20414. \}];\
  20415. \}\
  20416. \}\
  20417. \f2\b \cf8 return
  20418. \f0\b0 \cf4 bCanRecord;\
  20419. \}\
  20420. \
  20421. - (
  20422. \f2\b \cf8 void
  20423. \f0\b0 \cf4 )\cf11 readDeleWithUser\cf4 :(JXMessageObject *)p\{\
  20424. \f2\b \cf8 self
  20425. \f0\b0 \cf4 .readDelNum ++;\
  20426. \f2\b \cf8 if
  20427. \f0\b0 \cf4 ([p.fromUserId isEqualToString:MY_USER_ID]) \{\
  20428. \f2\b \cf8 for
  20429. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _array.count; i ++) \{\
  20430. JXMessageObject *msg = _array[i];\
  20431. \f2\b \cf8 if
  20432. \f0\b0 \cf4 ([p.messageId isEqualToString:msg.messageId]) \{\
  20433. msg.type = [NSNumber numberWithInt:kWCMessageTypeRemind];\
  20434. msg.content = Localized(\cf6 @"JX_OtherLookedYourReadingMsg"\cf4 );\
  20435. [msg update];\
  20436. \
  20437. [_table reloadData];\
  20438. \
  20439. \f2\b \cf8 break
  20440. \f0\b0 \cf4 ;\
  20441. \}\
  20442. \}\
  20443. \}
  20444. \f2\b \cf8 else
  20445. \f0\b0 \cf4 \{\
  20446. [
  20447. \f2\b \cf8 self
  20448. \f0\b0 \cf4 deleteMsg:p];\
  20449. \}\
  20450. \
  20451. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 2\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
  20452. \f2\b \cf8 if
  20453. \f0\b0 \cf4 (
  20454. \f2\b \cf8 self
  20455. \f0\b0 \cf4 .readDelNum > \cf7 5\cf4 ) \{\
  20456. \f2\b \cf8 self
  20457. \f0\b0 \cf4 .readDelNum = \cf7 0\cf4 ;\
  20458. [
  20459. \f2\b \cf8 self
  20460. \f0\b0 \cf4 .tableView reloadData];\
  20461. NSLog(\cf6 @"readDelNum ----- %d"\cf4 ,
  20462. \f2\b \cf8 self
  20463. \f0\b0 \cf4 .readDelNum);\
  20464. \}\
  20465. \});\
  20466. \}\
  20467. \
  20468. \cf2 //#pragma mark--------
  20469. \f1 \'b5\'c7\'c2\'bc\'d7\'b4\'cc\'ac\'b8\'c4\'b1\'e4
  20470. \f0 \cf4 \
  20471. \cf2 //-(void)onLoginChanged:(NSNotification *)notifacation\{\cf4 \
  20472. \cf2 // [_wait stop];\cf4 \
  20473. \cf2 // if (_isShowLoginChange) \{\cf4 \
  20474. \cf2 // switch ([JXXMPP sharedInstance].isLogined)\{\cf4 \
  20475. \cf2 // case login_status_ing:\cf4 \
  20476. \cf2 // //
  20477. \f1 \'c1\'ac\'bd\'d3\'ca\'a7\'b0\'dc
  20478. \f0 \cf4 \
  20479. \cf2 // [JXMyTools showTipView:Localized(@"JX_ConnectFailed")];\cf4 \
  20480. \cf2 // break;\cf4 \
  20481. \cf2 // case login_status_no:\cf4 \
  20482. \cf2 // //
  20483. \f1 \'c1\'ac\'bd\'d3\'ca\'a7\'b0\'dc
  20484. \f0 \cf4 \
  20485. \cf2 // [JXMyTools showTipView:Localized(@"JX_ConnectFailed")];\cf4 \
  20486. \cf2 // break;\cf4 \
  20487. \cf2 // case login_status_yes:\cf4 \
  20488. \cf2 // //
  20489. \f1 \'c1\'ac\'bd\'d3\'b3\'c9\'b9\'a6
  20490. \f0 \cf4 \
  20491. \cf2 // [JXMyTools showTipView:Localized(@"JX_ConnectSuccessfully")];\cf4 \
  20492. \cf2 // break;\cf4 \
  20493. \cf2 // \}\cf4 \
  20494. \cf2 // \}\cf4 \
  20495. \cf2 //\}\cf4 \
  20496. \
  20497. - (
  20498. \f2\b \cf8 void
  20499. \f0\b0 \cf4 )\cf11 onBackForRecordBtnLeft\cf4 \{\
  20500. \f2\b \cf8 self
  20501. \f0\b0 \cf4 .objToMsg =
  20502. \f2\b \cf8 nil
  20503. \f0\b0 \cf4 ;\
  20504. [_recordBtnLeft setBackgroundImage:[UIImage imageNamed:\cf6 @"im_input_ptt_normal"\cf4 ] forState:UIControlStateNormal];\
  20505. [_recordBtnLeft setBackgroundImage:[UIImage imageNamed:\cf6 @"im_input_keyboard_normal"\cf4 ] forState:UIControlStateSelected];\
  20506. [_recordBtnLeft removeTarget:
  20507. \f2\b \cf8 self
  20508. \f0\b0 \cf4 action:
  20509. \f2\b \cf8 @selector
  20510. \f0\b0 \cf4 (onBackForRecordBtnLeft) forControlEvents:UIControlEventTouchUpInside];\
  20511. [_recordBtnLeft addTarget:
  20512. \f2\b \cf8 self
  20513. \f0\b0 \cf4 action:
  20514. \f2\b \cf8 @selector
  20515. \f0\b0 \cf4 (recordSwitch:) forControlEvents:UIControlEventTouchUpInside];\
  20516. _messageText.textColor = [UIColor blackColor];\
  20517. _messageText.text =
  20518. \f2\b \cf8 nil
  20519. \f0\b0 \cf4 ;\
  20520. _hisReplyMsg =
  20521. \f2\b \cf8 nil
  20522. \f0\b0 \cf4 ;\
  20523. [
  20524. \f2\b \cf8 self
  20525. \f0\b0 \cf4 textViewDidChange:_messageText];\
  20526. \
  20527. \}\
  20528. \
  20529. - (
  20530. \f2\b \cf8 void
  20531. \f0\b0 \cf4 )\cf11 getTextViewWatermark\cf4 \{\
  20532. \f2\b \cf8 if
  20533. \f0\b0 \cf4 (_hisReplyMsg.length <= \cf7 0\cf4 ) \{\
  20534. \f2\b \cf8 return
  20535. \f0\b0 \cf4 ;\
  20536. \}\
  20537. [_messageText becomeFirstResponder];\
  20538. \cf2 //
  20539. \f1 \'b3\'a4\'b0\'b4\'bb\'d8\'b8\'b4
  20540. \f0
  20541. \f1 \'cf\'d4\'ca\'be\'cb\'ae\'d3\'a1
  20542. \f0 \cf4 \
  20543. \f2\b \cf8 if
  20544. \f0\b0 \cf4 (![
  20545. \f2\b \cf8 self
  20546. \f0\b0 \cf4 changeEmjoyText:_hisReplyMsg textColor:[UIColor lightGrayColor]]) \{\
  20547. [_messageText.textStorage insertAttributedString:[[NSAttributedString alloc] initWithString:_hisReplyMsg attributes:\cf7 @\{\cf4 NSFontAttributeName:SYSFONT(\cf7 18\cf4 ),NSForegroundColorAttributeName:[UIColor lightGrayColor]\cf7 \}\cf4 ] atIndex:_messageText.selectedRange.location];\
  20548. \}\
  20549. _messageText.textColor = [UIColor lightGrayColor];\
  20550. _messageText.selectedRange = NSMakeRange(\cf7 0\cf4 , \cf7 0\cf4 );\
  20551. [
  20552. \f2\b \cf8 self
  20553. \f0\b0 \cf4 setTableFooterFrame:_messageText];\
  20554. \}\
  20555. \
  20556. \cf2 //
  20557. \f1 \'b3\'a4\'b0\'b4\'bb\'d8\'b8\'b4
  20558. \f0 \cf4 \
  20559. - (
  20560. \f2\b \cf8 void
  20561. \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 replyIndexNum\cf4 :(
  20562. \f2\b \cf8 int
  20563. \f0\b0 \cf4 )indexNum \{\
  20564. \f2\b \cf8 if
  20565. \f0\b0 \cf4 (!_messageText.userInteractionEnabled) \{\
  20566. [JXMyTools showTipView:\cf6 @"
  20567. \f1 \'c4\'fa\'d2\'d1\'b1\'bb\'bd\'fb\'d6\'b9\'b7\'a2\'d1\'d4
  20568. \f0 "\cf4 ];\
  20569. \f2\b \cf8 return
  20570. \f0\b0 \cf4 ;\
  20571. \}\
  20572. \
  20573. JXMessageObject *msg = _array[indexNum];\
  20574. \f2\b \cf8 if
  20575. \f0\b0 \cf4 (_recordBtnLeft.selected) \{\
  20576. [
  20577. \f2\b \cf8 self
  20578. \f0\b0 \cf4 recordSwitch:_recordBtnLeft];\
  20579. \}\
  20580. [_messageText becomeFirstResponder];\
  20581. [_recordBtnLeft setBackgroundImage:[UIImage imageNamed:\cf6 @"chat_back_reply"\cf4 ] forState:UIControlStateNormal];\
  20582. [_recordBtnLeft removeTarget:
  20583. \f2\b \cf8 self
  20584. \f0\b0 \cf4 action:
  20585. \f2\b \cf8 @selector
  20586. \f0\b0 \cf4 (recordSwitch:) forControlEvents:UIControlEventTouchUpInside];\
  20587. [_recordBtnLeft addTarget:
  20588. \f2\b \cf8 self
  20589. \f0\b0 \cf4 action:
  20590. \f2\b \cf8 @selector
  20591. \f0\b0 \cf4 (onBackForRecordBtnLeft) forControlEvents:UIControlEventTouchUpInside];\
  20592. _hisReplyMsg = [NSString stringWithFormat:\cf6 @"%@%@:%@"\cf4 ,Localized(\cf6 @"JX_Reply"\cf4 ),msg.fromUserName,[msg getTypeName]];\
  20593. \cf2 //
  20594. \f1 \'cf\'d4\'ca\'be\'cb\'ae\'d3\'a1
  20595. \f0 \cf4 \
  20596. [
  20597. \f2\b \cf8 self
  20598. \f0\b0 \cf4 getTextViewWatermark];\
  20599. \cf2 //
  20600. \f1 \'d7\'aa\'b3\'c9
  20601. \f0 json
  20602. \f1 \'ca\'fd\'be\'dd
  20603. \f0 \cf4 \
  20604. SBJsonWriter * OderJsonwriter = [SBJsonWriter
  20605. \f2\b \cf8 new
  20606. \f0\b0 \cf4 ];\
  20607. NSString * jsonString = [OderJsonwriter stringWithObject:[msg toDictionary]];\
  20608. \f2\b \cf8 self
  20609. \f0\b0 \cf4 .objToMsg = jsonString;\
  20610. \}\
  20611. \
  20612. \cf2 //
  20613. \f1 \'b3\'a4\'b0\'b4\'d7\'aa\'b7\'a2
  20614. \f0 \cf4 \
  20615. - (
  20616. \f2\b \cf8 void
  20617. \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 RelayIndexNum\cf4 :(
  20618. \f2\b \cf8 int
  20619. \f0\b0 \cf4 )indexNum \{\
  20620. [
  20621. \f2\b \cf8 self
  20622. \f0\b0 \cf4 hideKeyboard:
  20623. \f2\b \cf8 NO
  20624. \f0\b0 \cf4 ];\
  20625. memberData *data = [
  20626. \f2\b \cf8 self
  20627. \f0\b0 \cf4 .room getMember:g_myself.userId];\
  20628. \f2\b \cf8 if
  20629. \f0\b0 \cf4 ([data.role integerValue] == \cf7 4\cf4 ) \{\
  20630. [JXMyTools showTipView:\cf6 @"
  20631. \f1 \'d2\'fe\'c9\'ed\'c8\'cb\'b2\'bb\'c4\'dc\'d7\'aa\'b7\'a2\'cf\'fb\'cf\'a2
  20632. \f0 "\cf4 ];\
  20633. \f2\b \cf8 return
  20634. \f0\b0 \cf4 ;\
  20635. \}\
  20636. \
  20637. JXMessageObject *msg = _array[indexNum];\
  20638. JXRelayVC *vc = [[JXRelayVC alloc] init];\
  20639. vc.chatPerson =
  20640. \f2\b \cf8 self
  20641. \f0\b0 \cf4 .chatPerson;\
  20642. vc.roomJid =
  20643. \f2\b \cf8 self
  20644. \f0\b0 \cf4 .roomJid;\
  20645. vc.isMoreSel =
  20646. \f2\b \cf8 YES
  20647. \f0\b0 \cf4 ;\
  20648. vc.chatVC2 =
  20649. \f2\b \cf8 self
  20650. \f0\b0 \cf4 ;\
  20651. NSMutableArray *array = [NSMutableArray arrayWithObject:msg];\
  20652. \cf2 // vc.msg = msg;\cf4 \
  20653. vc.relayMsgArray = array;\
  20654. \cf2 // [g_window addSubview:vc.view];\cf4 \
  20655. [g_navigation pushViewController:vc animated:
  20656. \f2\b \cf8 YES
  20657. \f0\b0 \cf4 ];\
  20658. \}\
  20659. \
  20660. - (
  20661. \f2\b \cf8 void
  20662. \f0\b0 \cf4 )\cf11 setRelayMsgArray\cf4 :(NSMutableArray *)relayMsgArray \{\
  20663. _relayMsgArray = relayMsgArray;\
  20664. \f2\b \cf8 self
  20665. \f0\b0 \cf4 .friendStatus = friend_status_friend;\
  20666. \f2\b \cf8 if
  20667. \f0\b0 \cf4 (!
  20668. \f2\b \cf8 self
  20669. \f0\b0 \cf4 .roomJid) \{\
  20670. \f2\b \cf8 for
  20671. \f0\b0 \cf4 (JXMessageObject *msg
  20672. \f2\b \cf8 in
  20673. \f0\b0 \cf4 relayMsgArray) \{\
  20674. \f2\b \cf8 if
  20675. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeRedPacket) \{\
  20676. msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
  20677. msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JX_RED"\cf4 )];\
  20678. msg.chatMsgHeight = \cf6 @"0"\cf4 ;\
  20679. \
  20680. \}\
  20681. \f2\b \cf8 if
  20682. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeAudioMeetingInvite || [msg.type intValue] == kWCMessageTypeVideoMeetingInvite || [msg.type intValue] == kWCMessageTypeAudioChatCancel || [msg.type intValue] == kWCMessageTypeAudioChatEnd || [msg.type intValue] == kWCMessageTypeVideoChatCancel || [msg.type intValue] == kWCMessageTypeVideoChatEnd || [msg.type intValue] == kWCMessageTypeAVBusy) \{\
  20683. \
  20684. msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
  20685. msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JX_AudioAndVideoCalls"\cf4 )];\
  20686. msg.chatMsgHeight = \cf6 @"0"\cf4 ;\
  20687. \}\
  20688. [
  20689. \f2\b \cf8 self
  20690. \f0\b0 \cf4 relay:msg];\
  20691. \}\
  20692. \cf2 // [self relay];\cf4 \
  20693. \}\
  20694. \}\
  20695. \
  20696. \cf2 //- (void)setRelayMsg:(JXMessageObject *)relayMsg \{\cf4 \
  20697. \cf2 // _relayMsg = relayMsg;\cf4 \
  20698. \cf2 // self.friendStatus = friend_status_friend;\cf4 \
  20699. \cf2 // if (!self.roomJid) \{\cf4 \
  20700. \cf2 // [self relay];\cf4 \
  20701. \cf2 // \}\cf4 \
  20702. \cf2 //\}\cf4 \
  20703. \
  20704. - (
  20705. \f2\b \cf8 void
  20706. \f0\b0 \cf4 ) \cf11 relay\cf4 :(\cf9 JXMessageObject\cf4 *)msg\{\
  20707. \f2\b \cf8 if
  20708. \f0\b0 \cf4 ([
  20709. \f2\b \cf8 self
  20710. \f0\b0 \cf4 \cf15 showDisableSay\cf4 ])\
  20711. \f2\b \cf8 return
  20712. \f0\b0 \cf4 ;\
  20713. \f2\b \cf8 if
  20714. \f0\b0 \cf4 ([
  20715. \f2\b \cf8 self
  20716. \f0\b0 \cf4 \cf15 sendMsgCheck\cf4 ])\{\
  20717. \f2\b \cf8 return
  20718. \f0\b0 \cf4 ;\
  20719. \}\
  20720. \
  20721. \f2\b \cf8 if
  20722. \f0\b0 \cf4 (msg.\cf15 content\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
  20723. \cf9 JXMessageObject\cf4 *msg1 = [[\cf9 JXMessageObject\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
  20724. msg1 = [msg \cf14 copy\cf4 ];\
  20725. msg1.\cf15 messageId\cf4 =
  20726. \f2\b \cf8 nil
  20727. \f0\b0 \cf4 ;\
  20728. msg1.\cf15 timeSend\cf4 = [\cf10 NSDate\cf4 \cf14 date\cf4 ];\
  20729. msg1.\cf15 fromId\cf4 =
  20730. \f2\b \cf8 nil
  20731. \f0\b0 \cf4 ;\
  20732. msg1.\cf15 fileSize\cf4 =
  20733. \f2\b \cf8 nil
  20734. \f0\b0 \cf4 ;\
  20735. msg1.\cf15 fileName\cf4 =
  20736. \f2\b \cf8 nil
  20737. \f0\b0 \cf4 ;\
  20738. msg1.\cf15 fromUserId\cf4 = \cf5 MY_USER_ID\cf4 ;\
  20739. \f2\b \cf8 if
  20740. \f0\b0 \cf4 ([
  20741. \f2\b \cf8 self
  20742. \f0\b0 \cf4 .\cf15 roomJid\cf4 \cf14 length\cf4 ]>\cf7 0\cf4 )\{\
  20743. msg1.\cf15 toUserId\cf4 =
  20744. \f2\b \cf8 self
  20745. \f0\b0 \cf4 .\cf15 roomJid\cf4 ;\
  20746. msg1.\cf15 isGroup\cf4 =
  20747. \f2\b \cf8 YES
  20748. \f0\b0 \cf4 ;\
  20749. msg1.\cf15 fromUserName\cf4 = \cf15 _userNickName\cf4 ;\
  20750. \}\
  20751. \f2\b \cf8 else
  20752. \f0\b0 \cf4 \{\
  20753. msg1.\cf15 toUserId\cf4 = \cf15 chatPerson\cf4 .\cf15 userId\cf4 ;\
  20754. msg1.\cf15 isGroup\cf4 =
  20755. \f2\b \cf8 NO
  20756. \f0\b0 \cf4 ;\
  20757. \}\
  20758. \cf2 // msg.content = relayMsg.content;\cf4 \
  20759. \cf2 // msg.type = relayMsg.type;\cf4 \
  20760. msg1.\cf15 isSend\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf5 transfer_status_ing\cf4 ];\
  20761. msg1.\cf15 isRead\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithBool\cf4 :
  20762. \f2\b \cf8 NO
  20763. \f0\b0 \cf4 ];\
  20764. msg1.\cf15 isReadDel\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :
  20765. \f2\b \cf8 NO
  20766. \f0\b0 \cf4 ];\
  20767. \cf2 //
  20768. \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
  20769. \f0 \cf4 \
  20770. [msg1 \cf15 insert\cf4 :
  20771. \f2\b \cf8 self
  20772. \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\
  20773. [\cf5 g_xmpp\cf4 \cf15 sendMessage\cf4 :msg1 \cf15 roomName\cf4 :
  20774. \f2\b \cf8 self
  20775. \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\cf2 //
  20776. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  20777. \f0 \cf4 \
  20778. [
  20779. \f2\b \cf8 self
  20780. \f0\b0 \cf4 \cf15 showOneMsg\cf4 :msg1];\
  20781. \f2\b \cf8 if
  20782. \f0\b0 \cf4 (\cf15 _table\cf4 .\cf14 contentSize\cf4 .\cf14 height\cf4 > (\cf5 JX_SCREEN_HEIGHT\cf4 +
  20783. \f2\b \cf8 self
  20784. \f0\b0 \cf4 .\cf15 deltaHeight\cf4 -
  20785. \f2\b \cf8 self
  20786. \f0\b0 \cf4 .\cf15 heightFooter\cf4 - \cf7 64\cf4 - \cf7 40\cf4 - \cf7 20\cf4 )) \{\
  20787. \f2\b \cf8 if
  20788. \f0\b0 \cf4 (
  20789. \f2\b \cf8 self
  20790. \f0\b0 \cf4 .\cf15 deltaY\cf4 >= \cf7 0\cf4 ) \{\
  20791. \
  20792. \}
  20793. \f2\b \cf8 else
  20794. \f0\b0 \cf4 \{\
  20795. \
  20796. \f2\b \cf8 if
  20797. \f0\b0 \cf4 (
  20798. \f2\b \cf8 self
  20799. \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 y\cf4 != \cf5 JX_SCREEN_HEIGHT\cf4 -
  20800. \f2\b \cf8 self
  20801. \f0\b0 \cf4 .\cf15 heightFooter\cf4 ) \{\
  20802. [\cf10 CATransaction\cf4 \cf14 begin\cf4 ];\
  20803. [\cf10 UIView\cf4 \cf14 animateWithDuration\cf4 :\cf7 0.1f\cf4 \cf14 animations\cf4 :^\{\
  20804. \cf2 // self.tableFooter.frame = CGRectMake(0, self.view.frame.size.height+deltaY-self.heightFooter, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
  20805. [\cf15 _table\cf4 \cf14 setFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 0\cf4 +\cf15 _noticeHeight\cf4 , \cf15 _table\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 ,
  20806. \f2\b \cf8 self
  20807. \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 +
  20808. \f2\b \cf8 self
  20809. \f0\b0 \cf4 .\cf15 deltaHeight\cf4 -
  20810. \f2\b \cf8 self
  20811. \f0\b0 \cf4 .\cf15 heightFooter\cf4 -\cf15 _noticeHeight\cf4 )];\
  20812. \cf2 // [_table gotoLastRow:NO];\cf4 \
  20813. \} \cf14 completion\cf4 :^(
  20814. \f2\b \cf8 BOOL
  20815. \f0\b0 \cf4 finished) \{\
  20816. \}];\
  20817. [\cf10 CATransaction\cf4 \cf14 commit\cf4 ];\
  20818. \}\
  20819. \
  20820. \}\
  20821. \
  20822. \}\
  20823. \}\
  20824. \
  20825. [\cf15 _messageText\cf4 \cf14 setText\cf4 :
  20826. \f2\b \cf8 nil
  20827. \f0\b0 \cf4 ];\
  20828. \
  20829. \
  20830. \f2\b \cf8 if
  20831. \f0\b0 \cf4 (
  20832. \f2\b \cf8 self
  20833. \f0\b0 \cf4 .\cf15 isShare\cf4 &&
  20834. \f2\b \cf8 self
  20835. \f0\b0 \cf4 .\cf15 shareSchemes\cf4 ) \{\
  20836. \
  20837. \cf14 dispatch_after\cf4 (\cf14 dispatch_time\cf4 (\cf5 DISPATCH_TIME_NOW\cf4 , (\cf10 int64_t\cf4 )(\cf7 1\cf4 * \cf5 NSEC_PER_SEC\cf4 )), \cf14 dispatch_get_main_queue\cf4 (), ^\{\
  20838. \f2\b \cf8 self
  20839. \f0\b0 \cf4 .\cf15 shareView\cf4 = [[\cf10 UIView\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 0\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf5 JX_SCREEN_HEIGHT\cf4 )];\
  20840. \f2\b \cf8 self
  20841. \f0\b0 \cf4 .\cf15 shareView\cf4 .\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 colorWithWhite\cf4 :\cf7 0\cf4 \cf14 alpha\cf4 :\cf7 .3\cf4 ];\
  20842. [\cf5 g_window\cf4 \cf14 addSubview\cf4 :
  20843. \f2\b \cf8 self
  20844. \f0\b0 \cf4 .\cf15 shareView\cf4 ];\
  20845. \
  20846. \cf10 UIView\cf4 *view = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH - \cf7 100\cf4 , \cf7 220\cf4 )];\
  20847. view.backgroundColor = [UIColor whiteColor];\
  20848. view.center = CGPointMake(
  20849. \f2\b \cf8 self
  20850. \f0\b0 \cf4 .shareView.frame.size.width / \cf7 2\cf4 ,
  20851. \f2\b \cf8 self
  20852. \f0\b0 \cf4 .shareView.frame.size.height / \cf7 2\cf4 );\
  20853. view.layer.cornerRadius = \cf7 3.0\cf4 ;\
  20854. view.layer.masksToBounds =
  20855. \f2\b \cf8 YES
  20856. \f0\b0 \cf4 ;\
  20857. [
  20858. \f2\b \cf8 self
  20859. \f0\b0 \cf4 .shareView addSubview:view];\
  20860. \
  20861. UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 25\cf4 , \cf7 50\cf4 , \cf7 50\cf4 )];\
  20862. \
  20863. imageView.image = [UIImage imageNamed:\cf6 @"ALOGO_120"\cf4 ];\
  20864. imageView.center = CGPointMake(view.frame.size.width / \cf7 2\cf4 , imageView.center.y);\
  20865. [view addSubview:imageView];\
  20866. \
  20867. UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , CGRectGetMaxY(imageView.frame) + \cf7 5\cf4 , view.frame.size.width, \cf7 30\cf4 )];\
  20868. label.font = [UIFont systemFontOfSize:\cf7 18\cf4 ];\
  20869. label.text = Localized(\cf6 @"JX_Sended"\cf4 );\
  20870. label.textAlignment = NSTextAlignmentCenter;\
  20871. [view addSubview:label];\
  20872. \
  20873. UIView *line = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , view.frame.size.height - \cf7 90\cf4 , view.frame.size.width, LINE_WH)];\
  20874. line.backgroundColor = THE_LINE_COLOR;\
  20875. [view addSubview:line];\
  20876. \
  20877. UIButton *btn1 = [[UIButton alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , line.frame.origin.y, line.frame.size.width, \cf7 45\cf4 )];\
  20878. [btn1 setTitle:Localized(\cf6 @"JX_Return"\cf4 ) forState:UIControlStateNormal];\
  20879. [btn1 setTitleColor:THEMECOLOR forState:UIControlStateNormal];\
  20880. [btn1 addTarget:
  20881. \f2\b \cf8 self
  20882. \f0\b0 \cf4 action:
  20883. \f2\b \cf8 @selector
  20884. \f0\b0 \cf4 (shareBackBtnAction) forControlEvents:UIControlEventTouchUpInside];\
  20885. [view addSubview:btn1];\
  20886. \
  20887. line = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , view.frame.size.height - \cf7 45\cf4 , view.frame.size.width, LINE_WH)];\
  20888. line.backgroundColor = THE_LINE_COLOR;\
  20889. [view addSubview:line];\
  20890. \
  20891. UIButton *btn2 = [[UIButton alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , line.frame.origin.y, line.frame.size.width, \cf7 45\cf4 )];\
  20892. [btn2 setTitle:[NSString stringWithFormat:\cf6 @"%@%@"\cf4 ,Localized(\cf6 @"JX_ToStayIn"\cf4 ),APP_NAME] forState:UIControlStateNormal];\
  20893. [btn2 setTitleColor:THEMECOLOR forState:UIControlStateNormal];\
  20894. [btn2 addTarget:
  20895. \f2\b \cf8 self
  20896. \f0\b0 \cf4 action:
  20897. \f2\b \cf8 @selector
  20898. \f0\b0 \cf4 (shareKeepBtnAction) forControlEvents:UIControlEventTouchUpInside];\
  20899. [view addSubview:btn2];\
  20900. \});\
  20901. \}\
  20902. \
  20903. \}\
  20904. \
  20905. - (
  20906. \f2\b \cf8 void
  20907. \f0\b0 \cf4 )\cf11 shareBackBtnAction\cf4 \{\
  20908. NSString *str = [NSString stringWithFormat:\cf6 @"%@://type=%@"\cf4 ,
  20909. \f2\b \cf8 self
  20910. \f0\b0 \cf4 .shareSchemes,\cf6 @"Share"\cf4 ];\
  20911. [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] options:
  20912. \f2\b \cf8 nil
  20913. \f0\b0 \cf4 completionHandler:^(
  20914. \f2\b \cf8 BOOL
  20915. \f0\b0 \cf4 success) \{\
  20916. \}];\
  20917. \
  20918. \f2\b \cf8 self
  20919. \f0\b0 \cf4 .shareView.hidden =
  20920. \f2\b \cf8 YES
  20921. \f0\b0 \cf4 ;\
  20922. [
  20923. \f2\b \cf8 self
  20924. \f0\b0 \cf4 .shareView removeFromSuperview];\
  20925. \}\
  20926. \
  20927. - (
  20928. \f2\b \cf8 void
  20929. \f0\b0 \cf4 )\cf11 shareKeepBtnAction\cf4 \{\
  20930. \f2\b \cf8 self
  20931. \f0\b0 \cf4 .shareView.hidden =
  20932. \f2\b \cf8 YES
  20933. \f0\b0 \cf4 ;\
  20934. [
  20935. \f2\b \cf8 self
  20936. \f0\b0 \cf4 .shareView removeFromSuperview];\
  20937. \}\
  20938. \
  20939. \cf2 //
  20940. \f1 \'b3\'a4\'b0\'b4\'c9\'be\'b3\'fd
  20941. \f0 \cf4 \
  20942. - (
  20943. \f2\b \cf8 void
  20944. \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 deleteIndexNum\cf4 :(
  20945. \f2\b \cf8 int
  20946. \f0\b0 \cf4 )indexNum \{\
  20947. memberData *data = [
  20948. \f2\b \cf8 self
  20949. \f0\b0 \cf4 .room getMember:g_myself.userId];\
  20950. \f2\b \cf8 if
  20951. \f0\b0 \cf4 (
  20952. \f2\b \cf8 self
  20953. \f0\b0 \cf4 .roomId.length > \cf7 0\cf4 &&([data.role intValue] == \cf7 1\cf4 || [data.role intValue] == \cf7 2\cf4 )) \{\
  20954. \f2\b \cf8 if
  20955. \f0\b0 \cf4 ([
  20956. \f2\b \cf8 self
  20957. \f0\b0 \cf4 sendMsgCheck]) \{\
  20958. \f2\b \cf8 return
  20959. \f0\b0 \cf4 ;\
  20960. \}\
  20961. \
  20962. JXMessageObject *msg = _array[indexNum];\
  20963. \f2\b \cf8 self
  20964. \f0\b0 \cf4 .withdrawIndex = indexNum;\
  20965. \f2\b \cf8 int
  20966. \f0\b0 \cf4 type = \cf7 1\cf4 ;\
  20967. \f2\b \cf8 if
  20968. \f0\b0 \cf4 (
  20969. \f2\b \cf8 self
  20970. \f0\b0 \cf4 .roomJid) \{\
  20971. type = \cf7 2\cf4 ;\
  20972. \}\
  20973. [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:\cf7 2\cf4 roomJid:
  20974. \f2\b \cf8 self
  20975. \f0\b0 \cf4 .roomJid deleteOrWithdraw:kWCMessageTypeSuperDelete toView:
  20976. \f2\b \cf8 self
  20977. \f0\b0 \cf4 ];\
  20978. \
  20979. \}
  20980. \f2\b \cf8 else
  20981. \f0\b0 \cf4 \{\
  20982. JXMessageObject *msg = _array[indexNum];\
  20983. NSString* s;\
  20984. \f2\b \cf8 if
  20985. \f0\b0 \cf4 ([
  20986. \f2\b \cf8 self
  20987. \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
  20988. s =
  20989. \f2\b \cf8 self
  20990. \f0\b0 \cf4 .roomJid;\
  20991. \f2\b \cf8 else
  20992. \f0\b0 \cf4 \
  20993. s = chatPerson.userId;\
  20994. \
  20995. \
  20996. \f2\b \cf8 if
  20997. \f0\b0 \cf4 (indexNum == _array.count - \cf7 1\cf4 ) \{\
  20998. JXMessageObject *newLastMsg;\
  20999. \f2\b \cf8 if
  21000. \f0\b0 \cf4 (indexNum == \cf7 0\cf4 ) \{\
  21001. newLastMsg = [_array firstObject];\
  21002. \}
  21003. \f2\b \cf8 else
  21004. \f0\b0 \cf4 \{\
  21005. newLastMsg = _array[indexNum - \cf7 1\cf4 ];\
  21006. \}\
  21007. \f2\b \cf8 self
  21008. \f0\b0 \cf4 .lastMsg.content = newLastMsg.content;\
  21009. [newLastMsg updateLastSend:UpdateLastSendType_None];\
  21010. \}\
  21011. \
  21012. \cf2 //
  21013. \f1 \'c9\'be\'b3\'fd\'b1\'be\'b5\'d8\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
  21014. \f0 \cf4 \
  21015. [_array removeObjectAtIndex:indexNum];\
  21016. [msg
  21017. \f2\b \cf8 delete
  21018. \f0\b0 \cf4 ];\
  21019. \
  21020. \cf2 // [_table deleteRow:indexNum section:0];\cf4 \
  21021. [_table reloadData];\
  21022. \f2\b \cf8 if
  21023. \f0\b0 \cf4 (
  21024. \f2\b \cf8 self
  21025. \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
  21026. \cf2 // NSDictionary *dict = self.courseArray[indexNum];\cf4 \
  21027. [g_server userCourseUpdateWithCourseId:
  21028. \f2\b \cf8 self
  21029. \f0\b0 \cf4 .courseId MessageIds:
  21030. \f2\b \cf8 nil
  21031. \f0\b0 \cf4 CourseName:
  21032. \f2\b \cf8 nil
  21033. \f0\b0 \cf4 CourseMessageId:msg.messageId toView:
  21034. \f2\b \cf8 self
  21035. \f0\b0 \cf4 ];\
  21036. \}
  21037. \f2\b \cf8 else
  21038. \f0\b0 \cf4 \{\
  21039. \f2\b \cf8 int
  21040. \f0\b0 \cf4 type = \cf7 1\cf4 ;\
  21041. \f2\b \cf8 if
  21042. \f0\b0 \cf4 (
  21043. \f2\b \cf8 self
  21044. \f0\b0 \cf4 .roomJid) \{\
  21045. type = \cf7 2\cf4 ;\
  21046. \}\
  21047. \f2\b \cf8 self
  21048. \f0\b0 \cf4 .withdrawIndex = -\cf7 1\cf4 ;\
  21049. \
  21050. \
  21051. \
  21052. \cf2 // [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:2 roomJid:self.roomJid toView:self];\cf4 \
  21053. [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:\cf7 2\cf4 roomJid:
  21054. \f2\b \cf8 self
  21055. \f0\b0 \cf4 .roomJid deleteOrWithdraw:kWCMessageTypeSuperDelete toView:
  21056. \f2\b \cf8 self
  21057. \f0\b0 \cf4 ];\
  21058. \}\
  21059. \}\
  21060. \}\
  21061. \
  21062. \cf2 //
  21063. \f1 \'b3\'a4\'b0\'b4\'b3\'b7\'bb\'d8
  21064. \f0 \cf4 \
  21065. - (
  21066. \f2\b \cf8 void
  21067. \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 withdrawIndexNum\cf4 :(
  21068. \f2\b \cf8 int
  21069. \f0\b0 \cf4 )indexNum \{\
  21070. \
  21071. \f2\b \cf8 if
  21072. \f0\b0 \cf4 ([
  21073. \f2\b \cf8 self
  21074. \f0\b0 \cf4 sendMsgCheck]) \{\
  21075. \f2\b \cf8 return
  21076. \f0\b0 \cf4 ;\
  21077. \}\
  21078. \
  21079. JXMessageObject *msg = _array[indexNum];\
  21080. \f2\b \cf8 self
  21081. \f0\b0 \cf4 .withdrawIndex = indexNum;\
  21082. \f2\b \cf8 int
  21083. \f0\b0 \cf4 type = \cf7 1\cf4 ;\
  21084. \f2\b \cf8 if
  21085. \f0\b0 \cf4 (
  21086. \f2\b \cf8 self
  21087. \f0\b0 \cf4 .roomJid) \{\
  21088. type = \cf7 2\cf4 ;\
  21089. \}\
  21090. \cf2 //
  21091. \f1 \'ca\'b5\'cf\'d6\'b7\'c0\'b3\'b7\'bb\'d8
  21092. \f0 \cf4 \
  21093. \f2\b \cf8 if
  21094. \f0\b0 \cf4 (
  21095. \f2\b \cf8 self
  21096. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 && _isAttritionRecall) \{\
  21097. memberData *data = [
  21098. \f2\b \cf8 self
  21099. \f0\b0 \cf4 .room getMember:g_myself.userId];\
  21100. \f2\b \cf8 if
  21101. \f0\b0 \cf4 ([data.role intValue] == \cf7 1\cf4 || [data.role intValue] == \cf7 2\cf4 ) \{\
  21102. \
  21103. \}
  21104. \f2\b \cf8 else
  21105. \f0\b0 \cf4 \{\
  21106. [JXMyTools showTipView:\cf6 @"
  21107. \f1 \'b8\'c3\'cf\'fb\'cf\'a2\'b2\'bb\'c4\'dc\'b3\'b7\'bb\'d8
  21108. \f0 "\cf4 ];\
  21109. \f2\b \cf8 return
  21110. \f0\b0 \cf4 ;\
  21111. \}\
  21112. \}\
  21113. \cf2 // [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:2 roomJid:self.roomJid toView:self];\cf4 \
  21114. \
  21115. \cf2 //
  21116. \f1 \'c8\'ba\'b9\'dc\'c0\'ed
  21117. \f0 \cf4 \
  21118. memberData *data = [
  21119. \f2\b \cf8 self
  21120. \f0\b0 \cf4 .room getMember:g_myself.userId];\
  21121. \f2\b \cf8 if
  21122. \f0\b0 \cf4 (
  21123. \f2\b \cf8 self
  21124. \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 && _isAttritionRecall) \{\
  21125. \f2\b \cf8 if
  21126. \f0\b0 \cf4 ([data.role intValue] == \cf7 1\cf4 || [data.role intValue] == \cf7 2\cf4 ) \{\
  21127. [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:\cf7 2\cf4 roomJid:
  21128. \f2\b \cf8 self
  21129. \f0\b0 \cf4 .roomJid deleteOrWithdraw:kWCMessageTypeSuperDelete toView:
  21130. \f2\b \cf8 self
  21131. \f0\b0 \cf4 ];\
  21132. \}
  21133. \f2\b \cf8 else
  21134. \f0\b0 \cf4 \{\
  21135. [JXMyTools showTipView:\cf6 @"
  21136. \f1 \'b8\'c3\'cf\'fb\'cf\'a2\'b2\'bb\'c4\'dc\'b3\'b7\'bb\'d8
  21137. \f0 "\cf4 ];\
  21138. \f2\b \cf8 return
  21139. \f0\b0 \cf4 ;\
  21140. \}\
  21141. \}
  21142. \f2\b \cf8 else
  21143. \f0\b0 \cf4 \{\
  21144. \f2\b \cf8 if
  21145. \f0\b0 \cf4 ([data.role intValue] == \cf7 1\cf4 || [data.role intValue] == \cf7 2\cf4 ) \{\
  21146. [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:\cf7 2\cf4 roomJid:
  21147. \f2\b \cf8 self
  21148. \f0\b0 \cf4 .roomJid deleteOrWithdraw:kWCMessageTypeSuperDelete toView:
  21149. \f2\b \cf8 self
  21150. \f0\b0 \cf4 ];\
  21151. \}
  21152. \f2\b \cf8 else
  21153. \f0\b0 \cf4 \{\
  21154. [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:\cf7 2\cf4 roomJid:
  21155. \f2\b \cf8 self
  21156. \f0\b0 \cf4 .roomJid deleteOrWithdraw:kWCMessageTypeWithdraw toView:
  21157. \f2\b \cf8 self
  21158. \f0\b0 \cf4 ];\
  21159. \}\
  21160. \}\
  21161. \
  21162. \
  21163. \}\
  21164. \
  21165. \cf2 //
  21166. \f1 \'b3\'a4\'b0\'b4\'ca\'d5\'b2\'d8
  21167. \f0 &&
  21168. \f1 \'b3\'a4\'b0\'b4\'cc\'ed\'bc\'d3\'b1\'ed\'c7\'e9
  21169. \f0 \cf4 \
  21170. - (
  21171. \f2\b \cf8 void
  21172. \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 favoritIndexNum\cf4 :(
  21173. \f2\b \cf8 int
  21174. \f0\b0 \cf4 )indexNum \cf11 type\cf4 :(CollectType)collectType\{\
  21175. JXMessageObject *msg = _array[indexNum];\
  21176. NSMutableArray *emoji = [[NSMutableArray alloc] init];\
  21177. \f2\b \cf8 if
  21178. \f0\b0 \cf4 (collectType == CollectTypeEmoji) \{\
  21179. \f2\b \cf8 for
  21180. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < g_myself.favorites.count; i ++) \{\
  21181. NSDictionary *dict = g_myself.favorites[i];\
  21182. NSString *url = dict[\cf6 @"url"\cf4 ];\
  21183. \
  21184. \f2\b \cf8 if
  21185. \f0\b0 \cf4 ([msg.content isEqualToString:url]) \{\
  21186. \
  21187. [JXMyTools showTipView:Localized(\cf6 @"JX_ExpressionAdded"\cf4 )];\
  21188. \f2\b \cf8 return
  21189. \f0\b0 \cf4 ;\
  21190. \}\
  21191. \}\
  21192. \}\
  21193. NSString *type = [NSString stringWithFormat:\cf6 @"%ld"\cf4 ,collectType];\
  21194. NSMutableDictionary *dataDict = [[NSMutableDictionary alloc] init];\
  21195. \f2\b \cf8 if
  21196. \f0\b0 \cf4 (collectType != CollectTypeEmoji) \{\
  21197. [dataDict setValue:msg.messageId forKey:\cf6 @"msgId"\cf4 ];\
  21198. \}\
  21199. [dataDict setValue:msg.content forKey:\cf6 @"msg"\cf4 ];\
  21200. [dataDict setValue:type forKey:\cf6 @"type"\cf4 ];\
  21201. [dataDict setValue:
  21202. \f2\b \cf8 self
  21203. \f0\b0 \cf4 .roomJid forKey:\cf6 @"roomJid"\cf4 ];\
  21204. [dataDict setValue:\cf7 @0\cf4 forKey:\cf6 @"collectType"\cf4 ];\
  21205. [dataDict setValue:msg.content forKey:\cf6 @"url"\cf4 ];\
  21206. \
  21207. [emoji addObject:dataDict];\
  21208. \cf2 // NSString * jsonString = [[SBJsonWriter new] stringWithObject:[msg toDictionary]];\cf4 \
  21209. \cf2 // [g_server addFavoriteWithContent:jsonString type:collectType toView:self];\cf4 \
  21210. \
  21211. \f2\b \cf8 if
  21212. \f0\b0 \cf4 (collectType == CollectTypeEmoji)\{\
  21213. \cf2 //
  21214. \f1 \'cc\'ed\'bc\'d3\'b5\'a5\'b8\'f6\'b1\'ed\'c7\'e9
  21215. \f0 \cf4 \
  21216. NSDate* date = [NSDate dateWithTimeIntervalSinceNow:\cf7 0\cf4 ];\
  21217. NSTimeInterval time = [date timeIntervalSince1970]*\cf7 1000\cf4 ;\
  21218. NSString *mixString = [NSString stringWithFormat:\cf6 @"%.0f"\cf4 , time];\
  21219. NSString *faceName = [NSString stringWithFormat:\cf6 @"%@.jpg"\cf4 , mixString];\
  21220. [g_server addFaceClollect:\cf6 @""\cf4 faceName:\cf6 @"noFacename"\cf4 url:msg.content View:
  21221. \f2\b \cf8 self
  21222. \f0\b0 \cf4 ];\
  21223. \}
  21224. \f2\b \cf8 else
  21225. \f0\b0 \cf4 \{\
  21226. \cf2 //
  21227. \f1 \'ca\'d5\'b2\'d8
  21228. \f0 \cf4 \
  21229. [g_server addFavoriteWithEmoji:emoji toView:
  21230. \f2\b \cf8 self
  21231. \f0\b0 \cf4 ];\
  21232. \}\
  21233. \
  21234. \
  21235. \cf2 // [g_server userEmojiAddWithUrl:msg.content toView:self];\cf4 \
  21236. \
  21237. \
  21238. \
  21239. \}\
  21240. \
  21241. \cf2 //
  21242. \f1 \'b6\'e0\'d1\'a1
  21243. \f0 \cf4 \
  21244. - (
  21245. \f2\b \cf8 void
  21246. \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 selectMoreIndexNum\cf4 :(
  21247. \f2\b \cf8 int
  21248. \f0\b0 \cf4 )indexNum \{\
  21249. [
  21250. \f2\b \cf8 self
  21251. \f0\b0 \cf4 hideKeyboard:
  21252. \f2\b \cf8 NO
  21253. \f0\b0 \cf4 ];\
  21254. \f2\b \cf8 self
  21255. \f0\b0 \cf4 .isSelectMore =
  21256. \f2\b \cf8 YES
  21257. \f0\b0 \cf4 ;\
  21258. \f2\b \cf8 self
  21259. \f0\b0 \cf4 .selectMoreView.hidden =
  21260. \f2\b \cf8 NO
  21261. \f0\b0 \cf4 ;\
  21262. [
  21263. \f2\b \cf8 self
  21264. \f0\b0 \cf4 .gotoBackBtn setBackgroundImage:
  21265. \f2\b \cf8 nil
  21266. \f0\b0 \cf4 forState:UIControlStateNormal];\
  21267. [
  21268. \f2\b \cf8 self
  21269. \f0\b0 \cf4 .gotoBackBtn setTitle:Localized(\cf6 @"JX_Cencal"\cf4 ) forState:UIControlStateNormal];\
  21270. [
  21271. \f2\b \cf8 self
  21272. \f0\b0 \cf4 enableCell];\
  21273. [
  21274. \f2\b \cf8 self
  21275. \f0\b0 \cf4 .tableView reloadData];\
  21276. \}\
  21277. \
  21278. \cf2 //
  21279. \f1 \'b6\'e0\'d1\'a1\'d1\'a1\'d4\'f1
  21280. \f0 \cf4 \
  21281. - (
  21282. \f2\b \cf8 void
  21283. \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 checkBoxSelectIndexNum\cf4 :(
  21284. \f2\b \cf8 int
  21285. \f0\b0 \cf4 )indexNum \cf11 isSelect\cf4 :(
  21286. \f2\b \cf8 BOOL
  21287. \f0\b0 \cf4 )isSelect \{\
  21288. \
  21289. JXMessageObject *msg = _array[indexNum];\
  21290. \
  21291. \f2\b \cf8 if
  21292. \f0\b0 \cf4 ([msg.isReadDel boolValue]) \{\
  21293. chatCell.checkBox.selected =
  21294. \f2\b \cf8 NO
  21295. \f0\b0 \cf4 ;\
  21296. [g_App showAlert:Localized(\cf6 @"JX_MessageBurningNo"\cf4 )];\
  21297. \f2\b \cf8 return
  21298. \f0\b0 \cf4 ;\
  21299. \}\
  21300. \
  21301. \f2\b \cf8 if
  21302. \f0\b0 \cf4 (isSelect) \{\
  21303. [_selectMoreArr addObject:_array[indexNum]];\
  21304. \}
  21305. \f2\b \cf8 else
  21306. \f0\b0 \cf4 \{\
  21307. [_selectMoreArr removeObject:_array[indexNum]];\
  21308. \}\
  21309. \}\
  21310. \
  21311. \cf2 //
  21312. \f1 \'b3\'a4\'b0\'b4\'bf\'aa\'ca\'bc\'c2\'bc\'d6\'c6
  21313. \f0 \cf4 \
  21314. - (
  21315. \f2\b \cf8 void
  21316. \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 startRecordIndexNum\cf4 :(
  21317. \f2\b \cf8 int
  21318. \f0\b0 \cf4 )indexNum \{\
  21319. [_recordArray removeAllObjects];\
  21320. \f2\b \cf8 self
  21321. \f0\b0 \cf4 .isRecording =
  21322. \f2\b \cf8 YES
  21323. \f0\b0 \cf4 ;\
  21324. \f2\b \cf8 self
  21325. \f0\b0 \cf4 .recordStarNum = indexNum;\
  21326. \f2\b \cf8 self
  21327. \f0\b0 \cf4 .title = Localized(\cf6 @"JX_StopRecording"\cf4 );\
  21328. [
  21329. \f2\b \cf8 self
  21330. \f0\b0 \cf4 setAudioIconFrame];\
  21331. \}\
  21332. \
  21333. \cf2 //
  21334. \f1 \'b3\'a4\'b0\'b4\'bd\'e1\'ca\'f8\'c2\'bc\'d6\'c6
  21335. \f0 \cf4 \
  21336. - (
  21337. \f2\b \cf8 void
  21338. \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 stopRecordIndexNum\cf4 :(
  21339. \f2\b \cf8 int
  21340. \f0\b0 \cf4 )indexNum \{\
  21341. \
  21342. \f2\b \cf8 for
  21343. \f0\b0 \cf4 (NSInteger i =
  21344. \f2\b \cf8 self
  21345. \f0\b0 \cf4 .recordStarNum; i<= indexNum; i ++) \{\
  21346. \f2\b \cf8 if
  21347. \f0\b0 \cf4 (i >= _array.count) \{\
  21348. \f2\b \cf8 return
  21349. \f0\b0 \cf4 ;\
  21350. \}\
  21351. JXMessageObject *msg = _array[i];\
  21352. \
  21353. \f2\b \cf8 if
  21354. \f0\b0 \cf4 ([msg isVisible] && [msg.type intValue]!=kWCMessageTypeIsRead && [msg.fromUserId isEqualToString:MY_USER_ID] && [msg.isReadDel intValue] != \cf7 1\cf4 &&[msg.type intValue]!=kWCMessageTypeAudioChatCancel&&[msg.type intValue]!=kWCMessageTypeAudioChatEnd&&[msg.type intValue]!=kWCMessageTypeAudioMeetingInvite&&[msg.type intValue]!=kWCMessageTypeVideoMeetingInvite&&[msg.type intValue]!=kWCMessageTypeVideoChatCancel&&[msg.type intValue]!=kWCMessageTypeVideoChatEnd&&[msg.type intValue]!=kWCMessageTypeRedPacket&&[msg.type intValue]!=kWCMessageTypeTransfer&&[msg.type intValue]!=kWCMessageTypeAVBusy)\
  21355. \f2\b \cf8 if
  21356. \f0\b0 \cf4 (msg.messageId) \{\
  21357. [_recordArray addObject:msg.messageId];\
  21358. \}\
  21359. \}\
  21360. \
  21361. UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:Localized(\cf6 @"JX_InputCourseName"\cf4 ) message:
  21362. \f2\b \cf8 nil
  21363. \f0\b0 \cf4 delegate:
  21364. \f2\b \cf8 self
  21365. \f0\b0 \cf4 cancelButtonTitle:Localized(\cf6 @"JX_Cencal"\cf4 ) otherButtonTitles:Localized(\cf6 @"JX_Confirm"\cf4 ),
  21366. \f2\b \cf8 nil
  21367. \f0\b0 \cf4 ];\
  21368. alertView.alertViewStyle = UIAlertViewStylePlainTextInput;\
  21369. [alertView show];\
  21370. \
  21371. \cf2 // NSString *str = self.onlinestate ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
  21372. \f2\b \cf8 if
  21373. \f0\b0 \cf4 (
  21374. \f2\b \cf8 self
  21375. \f0\b0 \cf4 .roomJid || ([chatPerson.userId intValue]<\cf7 10100\cf4 && [chatPerson.userId intValue]>=\cf7 10000\cf4 )) \{\
  21376. \f2\b \cf8 self
  21377. \f0\b0 \cf4 .title = chatPerson.userNickname;\
  21378. [
  21379. \f2\b \cf8 self
  21380. \f0\b0 \cf4 setAudioIconFrame];\
  21381. \}
  21382. \f2\b \cf8 else
  21383. \f0\b0 \cf4 \{\
  21384. \
  21385. \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.remarkName.length > 0 ? chatPerson.remarkName : chatPerson.userNickname,str];\cf4 \
  21386. [
  21387. \f2\b \cf8 self
  21388. \f0\b0 \cf4 setChatTitle:chatPerson.remarkName.length > \cf7 0\cf4 ? chatPerson.remarkName : chatPerson.userNickname];\
  21389. \}\
  21390. \f2\b \cf8 self
  21391. \f0\b0 \cf4 .isRecording =
  21392. \f2\b \cf8 NO
  21393. \f0\b0 \cf4 ;\
  21394. \f2\b \cf8 self
  21395. \f0\b0 \cf4 .recordStarNum = \cf7 0\cf4 ;\
  21396. \
  21397. [
  21398. \f2\b \cf8 self
  21399. \f0\b0 \cf4 hideKeyboard:
  21400. \f2\b \cf8 NO
  21401. \f0\b0 \cf4 ];\
  21402. \}\
  21403. \cf2 //
  21404. \f1 \'cf\'fb\'cf\'a2\'d6\'d8\'b7\'a2
  21405. \f0 \cf4 \
  21406. - (
  21407. \f2\b \cf8 void
  21408. \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 resendIndexNum\cf4 :(
  21409. \f2\b \cf8 int
  21410. \f0\b0 \cf4 )indexNum \{\
  21411. JXActionSheetVC *actionVC = [[JXActionSheetVC alloc] initWithImages:\cf7 @[]\cf4 names:\cf7 @[\cf4 Localized(\cf6 @"JX_Delete"\cf4 ),Localized(\cf6 @"JXBaseChatCell_SendAngin"\cf4 )\cf7 ]\cf4 ];\
  21412. actionVC.tag = \cf7 1111\cf4 ;\
  21413. actionVC.delegate =
  21414. \f2\b \cf8 self
  21415. \f0\b0 \cf4 ;\
  21416. \f2\b \cf8 self
  21417. \f0\b0 \cf4 .indexNum = indexNum;\
  21418. [
  21419. \f2\b \cf8 self
  21420. \f0\b0 \cf4 presentViewController:actionVC animated:
  21421. \f2\b \cf8 NO
  21422. \f0\b0 \cf4 completion:
  21423. \f2\b \cf8 nil
  21424. \f0\b0 \cf4 ];\
  21425. \}\
  21426. \
  21427. - (
  21428. \f2\b \cf8 void
  21429. \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 audioPlayChangeIndexNum\cf4 :(
  21430. \f2\b \cf8 int
  21431. \f0\b0 \cf4 )indexNum \{\
  21432. \f2\b \cf8 BOOL
  21433. \f0\b0 \cf4 flag = [g_default boolForKey:kChatVCMessageAudioIsNotPlayback];\
  21434. \f2\b \cf8 if
  21435. \f0\b0 \cf4 (!flag) \{\
  21436. \cf2 //
  21437. \f1 \'cc\'fd\'cd\'b2\'b2\'a5\'b7\'c5
  21438. \f0 \cf4 \
  21439. [g_default setBool:
  21440. \f2\b \cf8 YES
  21441. \f0\b0 \cf4 forKey:kChatVCMessageAudioIsNotPlayback];\
  21442. \}
  21443. \f2\b \cf8 else
  21444. \f0\b0 \cf4 \{\
  21445. \cf2 //
  21446. \f1 \'d1\'ef\'c9\'f9\'c6\'f7\'b2\'a5\'b7\'c5
  21447. \f0 \cf4 \
  21448. [g_default setBool:
  21449. \f2\b \cf8 NO
  21450. \f0\b0 \cf4 forKey:kChatVCMessageAudioIsNotPlayback];\
  21451. \}\
  21452. \
  21453. [
  21454. \f2\b \cf8 self
  21455. \f0\b0 \cf4 setAudioIconFrame];\
  21456. \}\
  21457. \
  21458. - (
  21459. \f2\b \cf8 BOOL
  21460. \f0\b0 \cf4 )\cf11 getRecording\cf4 \{\
  21461. \f2\b \cf8 return
  21462. \f0\b0 \cf4
  21463. \f2\b \cf8 self
  21464. \f0\b0 \cf4 .isRecording;\
  21465. \}\
  21466. - (NSInteger)\cf11 getRecordStarNum\cf4 \{\
  21467. \f2\b \cf8 return
  21468. \f0\b0 \cf4
  21469. \f2\b \cf8 self
  21470. \f0\b0 \cf4 .recordStarNum;\
  21471. \}\
  21472. \
  21473. \cf2 //
  21474. \f1 \'b7\'a2\'cb\'cd\'bf\'ce\'b3\'cc
  21475. \f0 \cf4 \
  21476. - (
  21477. \f2\b \cf8 void
  21478. \f0\b0 \cf4 )\cf11 sendCourseAction\cf4 \{\
  21479. \
  21480. \f2\b \cf8 if
  21481. \f0\b0 \cf4 (_array.count <= \cf7 0\cf4 ) \{\
  21482. [JXMyTools showTipView:Localized(\cf6 @"JX_ThisCourseEmpty"\cf4 )];\
  21483. \f2\b \cf8 return
  21484. \f0\b0 \cf4 ;\
  21485. \}\
  21486. \
  21487. \f2\b \cf8 if
  21488. \f0\b0 \cf4 (g_commonService.courseTimer) \{\
  21489. [JXMyTools showTipView:Localized(\cf6 @"JX_SendingPleaseWait"\cf4 )];\
  21490. \f2\b \cf8 return
  21491. \f0\b0 \cf4 ;\
  21492. \}\
  21493. JXRelayVC *vc = [[JXRelayVC alloc] init];\
  21494. vc.isCourse =
  21495. \f2\b \cf8 YES
  21496. \f0\b0 \cf4 ;\
  21497. vc.relayDelegate =
  21498. \f2\b \cf8 self
  21499. \f0\b0 \cf4 ;\
  21500. \cf2 // [g_window addSubview:vc.view];\cf4 \
  21501. [g_navigation pushViewController:vc animated:
  21502. \f2\b \cf8 YES
  21503. \f0\b0 \cf4 ];\
  21504. \}\
  21505. \
  21506. - (
  21507. \f2\b \cf8 void
  21508. \f0\b0 \cf4 )\cf11 sendCourse\cf4 :(NSTimer *) timer\{\
  21509. \
  21510. JXMsgAndUserObject *obj = timer.userInfo;\
  21511. \f2\b \cf8 BOOL
  21512. \f0\b0 \cf4 isRoom;\
  21513. \f2\b \cf8 if
  21514. \f0\b0 \cf4 ([obj.user.roomFlag intValue] > \cf7 0\cf4 || obj.user.roomId.length > \cf7 0\cf4 ) \{\
  21515. isRoom =
  21516. \f2\b \cf8 YES
  21517. \f0\b0 \cf4 ;\
  21518. \}
  21519. \f2\b \cf8 else
  21520. \f0\b0 \cf4 \{\
  21521. isRoom =
  21522. \f2\b \cf8 NO
  21523. \f0\b0 \cf4 ;\
  21524. \}\
  21525. \
  21526. \f2\b \cf8 self
  21527. \f0\b0 \cf4 .sendIndex ++;\
  21528. \cf2 // [_chatWait start:[NSString stringWithFormat:@"
  21529. \f1 \'d5\'fd\'d4\'da\'b7\'a2\'cb\'cd\'a3\'ba
  21530. \f0 %d/%ld",self.sendIndex,_array.count] inView:g_window];\cf4 \
  21531. [_chatWait setCaption:[NSString stringWithFormat:\cf6 @"%@
  21532. \f1 \'a3\'ba
  21533. \f0 %d/%ld"\cf4 ,Localized(\cf6 @"JX_SendNow"\cf4 ),
  21534. \f2\b \cf8 self
  21535. \f0\b0 \cf4 .sendIndex,_array.count]];\
  21536. [_chatWait update];\
  21537. \
  21538. JXMessageObject *msg= _array[
  21539. \f2\b \cf8 self
  21540. \f0\b0 \cf4 .sendIndex - \cf7 1\cf4 ];\
  21541. msg.messageId =
  21542. \f2\b \cf8 nil
  21543. \f0\b0 \cf4 ;\
  21544. msg.timeSend = [NSDate date];\
  21545. msg.fromId =
  21546. \f2\b \cf8 nil
  21547. \f0\b0 \cf4 ;\
  21548. msg.fromUserId = MY_USER_ID;\
  21549. \f2\b \cf8 if
  21550. \f0\b0 \cf4 (isRoom)\{\
  21551. msg.toUserId = obj.user.userId;\
  21552. msg.isGroup =
  21553. \f2\b \cf8 YES
  21554. \f0\b0 \cf4 ;\
  21555. msg.fromUserName = g_myself.userNickname;\
  21556. \}\
  21557. \f2\b \cf8 else
  21558. \f0\b0 \cf4 \{\
  21559. msg.toUserId = obj.user.userId;\
  21560. msg.isGroup =
  21561. \f2\b \cf8 NO
  21562. \f0\b0 \cf4 ;\
  21563. \}\
  21564. \cf2 // msg.content = relayMsg.content;\cf4 \
  21565. \cf2 // msg.type = relayMsg.type;\cf4 \
  21566. msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
  21567. msg.isRead = [NSNumber numberWithBool:
  21568. \f2\b \cf8 NO
  21569. \f0\b0 \cf4 ];\
  21570. msg.isReadDel = [NSNumber numberWithInt:
  21571. \f2\b \cf8 NO
  21572. \f0\b0 \cf4 ];\
  21573. \cf2 //
  21574. \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
  21575. \f0 \cf4 \
  21576. \f2\b \cf8 if
  21577. \f0\b0 \cf4 (isRoom) \{\
  21578. [msg insert:obj.user.userId];\
  21579. [g_xmpp sendMessage:msg roomName:obj.user.userId];\cf2 //
  21580. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  21581. \f0 \cf4 \
  21582. \}
  21583. \f2\b \cf8 else
  21584. \f0\b0 \cf4 \{\
  21585. [msg insert:
  21586. \f2\b \cf8 nil
  21587. \f0\b0 \cf4 ];\
  21588. [g_xmpp sendMessage:msg roomName:
  21589. \f2\b \cf8 nil
  21590. \f0\b0 \cf4 ];\cf2 //
  21591. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  21592. \f0 \cf4 \
  21593. \}\
  21594. \
  21595. \f2\b \cf8 if
  21596. \f0\b0 \cf4 (_array.count ==
  21597. \f2\b \cf8 self
  21598. \f0\b0 \cf4 .sendIndex) \{\
  21599. [_chatWait stop];\
  21600. [_timer invalidate];\
  21601. _timer =
  21602. \f2\b \cf8 nil
  21603. \f0\b0 \cf4 ;\
  21604. [JXMyTools showTipView:Localized(\cf6 @"JXAlert_SendOK"\cf4 )];\
  21605. \}\
  21606. \}\
  21607. \
  21608. - (
  21609. \f2\b \cf8 void
  21610. \f0\b0 \cf4 )\cf11 relay\cf4 :(JXRelayVC *)relayVC \cf11 MsgAndUserObject\cf4 :(JXMsgAndUserObject *)obj \{\
  21611. \
  21612. \cf2 // [g_subWindow addSubview:_suspensionBtn];\cf4 \
  21613. \cf2 // g_subWindow.hidden = YES;\cf4 \
  21614. \cf2 // _chatWait.view.frame = CGRectMake(0, 0, 50, 50);\cf4 \
  21615. \cf2 // [_chatWait start:[NSString stringWithFormat:@"%@
  21616. \f1 \'a3\'ba
  21617. \f0 1/%ld",Localized(@"JX_SendNow"),_array.count] inView:g_subWindow];\cf4 \
  21618. \
  21619. dispatch_async(dispatch_get_global_queue(\cf7 0\cf4 , \cf7 0\cf4 ), ^\{\
  21620. \
  21621. [g_commonService sendCourse:obj Array:_array];\
  21622. \});\
  21623. \
  21624. \cf2 // _timer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(sendCourse:) userInfo:obj repeats:YES];\cf4 \
  21625. \}\
  21626. \
  21627. - (
  21628. \f2\b \cf8 void
  21629. \f0\b0 \cf4 )\cf11 alertView\cf4 :(UIAlertView *)alertView \cf11 clickedButtonAtIndex\cf4 :(NSInteger)buttonIndex \{\
  21630. \
  21631. \f2\b \cf8 if
  21632. \f0\b0 \cf4 (alertView.tag == \cf7 2457\cf4 ) \{\
  21633. \
  21634. \f2\b \cf8 if
  21635. \f0\b0 \cf4 (buttonIndex == \cf7 1\cf4 ) \{\
  21636. \
  21637. \cf2 // NSMutableString *msgIds = [NSMutableString string];\cf4 \
  21638. \cf2 // NSMutableString *types = [NSMutableString string];\cf4 \
  21639. NSMutableArray *emoji = [[NSMutableArray alloc] init];\
  21640. \f2\b \cf8 for
  21641. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
  21642. \f2\b \cf8 self
  21643. \f0\b0 \cf4 .selectMoreArr.count; i ++) \{\
  21644. JXMessageObject *msg =
  21645. \f2\b \cf8 self
  21646. \f0\b0 \cf4 .selectMoreArr[i];\
  21647. \f2\b \cf8 if
  21648. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeText || [msg.type intValue] == kWCMessageTypeImage || [msg.type intValue] == kWCMessageTypeCustomFace || [msg.type intValue] == kWCMessageTypeEmoji || [msg.type intValue] == kWCMessageTypeVoice || [msg.type intValue] == kWCMessageTypeVideo || [msg.type intValue] == kWCMessageTypeFile) \{\
  21649. \
  21650. CollectType collectType = CollectTypeDefult;\
  21651. \f2\b \cf8 if
  21652. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeImage) \{\
  21653. collectType = CollectTypeImage;\
  21654. \}
  21655. \f2\b \cf8 else
  21656. \f0\b0 \cf4
  21657. \f2\b \cf8 if
  21658. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeCustomFace) \{\
  21659. collectType = CollectTypeEmoji;\
  21660. \}
  21661. \f2\b \cf8 else
  21662. \f0\b0 \cf4
  21663. \f2\b \cf8 if
  21664. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeEmoji) \{\
  21665. collectType = CollectTypeEmoji;\
  21666. \}
  21667. \f2\b \cf8 else
  21668. \f0\b0 \cf4
  21669. \f2\b \cf8 if
  21670. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeVideo) \{\
  21671. collectType = CollectTypeVideo;\
  21672. \}
  21673. \f2\b \cf8 else
  21674. \f0\b0 \cf4
  21675. \f2\b \cf8 if
  21676. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeFile) \{\
  21677. collectType = CollectTypeFile;\
  21678. \}
  21679. \f2\b \cf8 else
  21680. \f0\b0 \cf4
  21681. \f2\b \cf8 if
  21682. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeVoice) \{\
  21683. collectType = CollectTypeVoice;\
  21684. \}
  21685. \f2\b \cf8 else
  21686. \f0\b0 \cf4
  21687. \f2\b \cf8 if
  21688. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeText) \{\
  21689. collectType = CollectTypeText;\
  21690. \}
  21691. \f2\b \cf8 else
  21692. \f0\b0 \cf4 \{\
  21693. \
  21694. \}\
  21695. \f2\b \cf8 if
  21696. \f0\b0 \cf4 (collectType == CollectTypeDefult) \{\
  21697. \f2\b \cf8 return
  21698. \f0\b0 \cf4 ;\
  21699. \}\
  21700. \cf2 // NSDictionary *dict = g_myself.favorites[i];\cf4 \
  21701. \cf2 // NSString *url = dict[@"url"];\cf4 \
  21702. \cf2 // if ([msg.content isEqualToString:url]) \{\cf4 \
  21703. \cf2 // continue;\cf4 \
  21704. \cf2 // \}\cf4 \
  21705. \
  21706. NSString *type = [NSString stringWithFormat:\cf6 @"%ld"\cf4 ,collectType];\
  21707. NSMutableDictionary *dataDict = [[NSMutableDictionary alloc] init];\
  21708. [dataDict setValue:msg.messageId forKey:\cf6 @"msgId"\cf4 ];\
  21709. [dataDict setValue:msg.content forKey:\cf6 @"msg"\cf4 ];\
  21710. [dataDict setValue:type forKey:\cf6 @"type"\cf4 ];\
  21711. [dataDict setValue:
  21712. \f2\b \cf8 self
  21713. \f0\b0 \cf4 .roomJid forKey:\cf6 @"roomJid"\cf4 ];\
  21714. [dataDict setValue:\cf7 @0\cf4 forKey:\cf6 @"collectType"\cf4 ];\
  21715. \
  21716. [emoji addObject:dataDict];\
  21717. \
  21718. \cf2 // if (msgIds.length <= 0) \{\cf4 \
  21719. \cf2 // [msgIds appendString:msg.messageId];\cf4 \
  21720. \cf2 // [types appendString:[NSString stringWithFormat:@"%ld",collectType]];\cf4 \
  21721. \cf2 // \}else \{\cf4 \
  21722. \cf2 // [msgIds appendFormat:@",%@", msg.messageId];\cf4 \
  21723. \cf2 // [types appendFormat:@",%@", [NSString stringWithFormat:@"%ld",collectType]];\cf4 \
  21724. \cf2 // \}\cf4 \
  21725. \
  21726. \}\
  21727. \}\
  21728. \
  21729. \f2\b \cf8 if
  21730. \f0\b0 \cf4 (emoji.count > \cf7 0\cf4 ) \{\
  21731. [g_server addFavoriteWithEmoji:emoji toView:
  21732. \f2\b \cf8 self
  21733. \f0\b0 \cf4 ];\
  21734. \}
  21735. \f2\b \cf8 else
  21736. \f0\b0 \cf4 \{\
  21737. \f2\b \cf8 if
  21738. \f0\b0 \cf4 (
  21739. \f2\b \cf8 self
  21740. \f0\b0 \cf4 .isSelectMore) \{\
  21741. [
  21742. \f2\b \cf8 self
  21743. \f0\b0 \cf4 actionQuit];\
  21744. \}\
  21745. \}\
  21746. \
  21747. \}\
  21748. \
  21749. \}
  21750. \f2\b \cf8 else
  21751. \f0\b0 \cf4
  21752. \f2\b \cf8 if
  21753. \f0\b0 \cf4 (alertView.tag == \cf7 2458\cf4 ) \{\
  21754. \
  21755. \f2\b \cf8 for
  21756. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
  21757. \f2\b \cf8 self
  21758. \f0\b0 \cf4 .selectMoreArr.count; i ++) \{\
  21759. JXMessageObject *msg =
  21760. \f2\b \cf8 self
  21761. \f0\b0 \cf4 .selectMoreArr[i];\
  21762. \f2\b \cf8 if
  21763. \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeImage || [msg.type intValue] == kWCMessageTypeCustomFace|| [msg.type intValue] == kWCMessageTypeEmoji) \{\
  21764. UIImageView *imageView = [[UIImageView alloc] init];\
  21765. NSURL* url;\
  21766. \f2\b \cf8 if
  21767. \f0\b0 \cf4 (msg.isMySend && isFileExist(msg.fileName))\
  21768. url = [NSURL fileURLWithPath:msg.fileName];\
  21769. \f2\b \cf8 else
  21770. \f0\b0 \cf4 \
  21771. url = [NSURL URLWithString:msg.content];\
  21772. [imageView sd_setImageWithURL:url completed:^(UIImage *
  21773. \f2\b \cf8 _Nullable
  21774. \f0\b0 \cf4 image, NSError *
  21775. \f2\b \cf8 _Nullable
  21776. \f0\b0 \cf4 error, SDImageCacheType cacheType, NSURL *
  21777. \f2\b \cf8 _Nullable
  21778. \f0\b0 \cf4 imageURL) \{\
  21779. \
  21780. \f2\b \cf8 if
  21781. \f0\b0 \cf4 (!error) \{\
  21782. [
  21783. \f2\b \cf8 self
  21784. \f0\b0 \cf4 saveImageToPhotos:imageView.image];\
  21785. \}\
  21786. \}];\
  21787. \}\
  21788. \
  21789. \f2\b \cf8 if
  21790. \f0\b0 \cf4 ([msg.type integerValue] == kWCMessageTypeVideo) \{\
  21791. \
  21792. \f2\b \cf8 if
  21793. \f0\b0 \cf4 ([msg.content rangeOfString:\cf6 @"http"\cf4 ].location != NSNotFound) \{\
  21794. [
  21795. \f2\b \cf8 self
  21796. \f0\b0 \cf4 playerDownload:msg.content];\
  21797. \}
  21798. \f2\b \cf8 else
  21799. \f0\b0 \cf4 \{\
  21800. [
  21801. \f2\b \cf8 self
  21802. \f0\b0 \cf4 saveVideo:msg.content];\
  21803. \}\
  21804. \
  21805. \}\
  21806. \}\
  21807. \
  21808. \f2\b \cf8 if
  21809. \f0\b0 \cf4 (
  21810. \f2\b \cf8 self
  21811. \f0\b0 \cf4 .isSelectMore) \{\
  21812. [
  21813. \f2\b \cf8 self
  21814. \f0\b0 \cf4 actionQuit];\
  21815. \}\
  21816. \
  21817. \}
  21818. \f2\b \cf8 else
  21819. \f0\b0 \cf4
  21820. \f2\b \cf8 if
  21821. \f0\b0 \cf4 (alertView.tag == \cf7 3457\cf4 ) \{\
  21822. \f2\b \cf8 if
  21823. \f0\b0 \cf4 (buttonIndex == \cf7 1\cf4 ) \{\
  21824. \
  21825. NSMutableArray *selects = [NSMutableArray array];\
  21826. \f2\b \cf8 for
  21827. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
  21828. \f2\b \cf8 self
  21829. \f0\b0 \cf4 .selectMoreArr.count; i ++) \{\
  21830. JXMessageObject *msg = [
  21831. \f2\b \cf8 self
  21832. \f0\b0 \cf4 .selectMoreArr[i] copy];\
  21833. \f2\b \cf8 if
  21834. \f0\b0 \cf4 ([msg.type intValue] != kWCMessageTypeRedPacket && [msg.type intValue] != kWCMessageTypeTransfer) \{\
  21835. [selects addObject:msg];\
  21836. \}\
  21837. \}\
  21838. \
  21839. JXRelayVC *vc = [[JXRelayVC alloc] init];\
  21840. vc.relayMsgArray = [NSMutableArray arrayWithArray:selects];\
  21841. [g_navigation pushViewController:vc animated:
  21842. \f2\b \cf8 YES
  21843. \f0\b0 \cf4 ];\
  21844. \}\
  21845. \}
  21846. \f2\b \cf8 else
  21847. \f0\b0 \cf4 \{\
  21848. \f2\b \cf8 if
  21849. \f0\b0 \cf4 (buttonIndex == \cf7 1\cf4 ) \{\
  21850. UITextField *tf = [alertView textFieldAtIndex:\cf7 0\cf4 ];\
  21851. \f2\b \cf8 if
  21852. \f0\b0 \cf4 (tf.text.length <= \cf7 0\cf4 ) \{\
  21853. [g_App showAlert:Localized(\cf6 @"JX_InputCourseName"\cf4 )];\
  21854. \f2\b \cf8 return
  21855. \f0\b0 \cf4 ;\
  21856. \}\
  21857. _recordName = tf.text;\
  21858. NSMutableString *recordStr = [NSMutableString string];\
  21859. \f2\b \cf8 for
  21860. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _recordArray.count; i ++) \{\
  21861. NSString *str = _recordArray[i];\
  21862. \f2\b \cf8 if
  21863. \f0\b0 \cf4 (i == _recordArray.count - \cf7 1\cf4 ) \{\
  21864. [recordStr appendString:str];\
  21865. \}
  21866. \f2\b \cf8 else
  21867. \f0\b0 \cf4 \{\
  21868. [recordStr appendFormat:\cf6 @"%@,"\cf4 ,str];\
  21869. \}\
  21870. \}\
  21871. \
  21872. [g_server userCourseAddWithMessageIds:recordStr CourseName:_recordName RoomJid:
  21873. \f2\b \cf8 self
  21874. \f0\b0 \cf4 .roomJid toView:
  21875. \f2\b \cf8 self
  21876. \f0\b0 \cf4 ];\
  21877. \}\
  21878. \}\
  21879. \}\
  21880. \
  21881. - (
  21882. \f2\b \cf8 void
  21883. \f0\b0 \cf4 )\cf11 saveImageToPhotos\cf4 :(UIImage*)savedImage\
  21884. \{\
  21885. UIImageWriteToSavedPhotosAlbum(savedImage,
  21886. \f2\b \cf8 self
  21887. \f0\b0 \cf4 ,
  21888. \f2\b \cf8 @selector
  21889. \f0\b0 \cf4 (image:didFinishSavingWithError:contextInfo:),
  21890. \f2\b \cf8 NULL
  21891. \f0\b0 \cf4 );\
  21892. \}\
  21893. \
  21894. \
  21895. \cf2 //
  21896. \f1 \'d6\'b8\'b6\'a8\'bb\'d8\'b5\'f7\'b7\'bd\'b7\'a8
  21897. \f0 \cf4 \
  21898. - (
  21899. \f2\b \cf8 void
  21900. \f0\b0 \cf4 )\cf11 image\cf4 : (UIImage *) image \cf11 didFinishSavingWithError\cf4 : (NSError *) error \cf11 contextInfo\cf4 : (
  21901. \f2\b \cf8 void
  21902. \f0\b0 \cf4 *) contextInfo\{\
  21903. \
  21904. \f2\b \cf8 if
  21905. \f0\b0 \cf4 (!error) \{\
  21906. \
  21907. [JXMyTools showTipView:Localized(\cf6 @"JX_SaveSuessed"\cf4 )];\
  21908. \}
  21909. \f2\b \cf8 else
  21910. \f0\b0 \cf4 \{\
  21911. [JXMyTools showTipView:Localized(\cf6 @"JX_SaveFiled"\cf4 )];\
  21912. \}\
  21913. \}\
  21914. \
  21915. \cf2 //-----
  21916. \f1 \'cf\'c2\'d4\'d8\'ca\'d3\'c6\'b5
  21917. \f0 --\cf4 \
  21918. - (
  21919. \f2\b \cf8 void
  21920. \f0\b0 \cf4 )\cf11 playerDownload\cf4 :(NSString *)url\{\
  21921. \
  21922. \
  21923. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,
  21924. \f2\b \cf8 YES
  21925. \f0\b0 \cf4 );\
  21926. NSString *documentsDirectory = [paths objectAtIndex:\cf7 0\cf4 ];\
  21927. \
  21928. AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];\
  21929. NSString *fullPath = [NSString stringWithFormat:\cf6 @"%@/%@"\cf4 , documentsDirectory, \cf6 @"jaibaili.mp4"\cf4 ];\
  21930. NSURL *urlNew = [NSURL URLWithString:url];\
  21931. NSURLRequest *request = [NSURLRequest requestWithURL:urlNew];\
  21932. NSURLSessionDownloadTask *task =\
  21933. [manager downloadTaskWithRequest:request\
  21934. progress:
  21935. \f2\b \cf8 nil
  21936. \f0\b0 \cf4 destination:^NSURL *(NSURL *targetPath, NSURLResponse *response) \{\
  21937. \f2\b \cf8 return
  21938. \f0\b0 \cf4 [NSURL fileURLWithPath:fullPath];\
  21939. \}\
  21940. completionHandler:^(NSURLResponse *response, NSURL *filePath, NSError *error) \{\
  21941. [
  21942. \f2\b \cf8 self
  21943. \f0\b0 \cf4 saveVideo:fullPath];\
  21944. \}];\
  21945. [task resume];\
  21946. \
  21947. \}\
  21948. \
  21949. \
  21950. \cf2 //
  21951. \f1 \'b7\'a2\'cb\'cd\'d5\'fd\'d4\'da\'ca\'e4\'c8\'eb
  21952. \f0 \cf4 \
  21953. - (
  21954. \f2\b \cf8 void
  21955. \f0\b0 \cf4 ) \cf11 sendEntering\cf4 \{\
  21956. JXMessageObject *msg=[[JXMessageObject alloc]init];\
  21957. msg.timeSend = [NSDate date];\
  21958. msg.fromUserId = MY_USER_ID;\
  21959. \
  21960. msg.toUserId = chatPerson.userId;\
  21961. msg.type = [NSNumber numberWithInt:kWCMessageTypeRelay];\
  21962. [g_xmpp sendMessage:msg roomName:
  21963. \f2\b \cf8 self
  21964. \f0\b0 \cf4 .roomJid];\cf2 //
  21965. \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
  21966. \f0 \cf4 \
  21967. \}\
  21968. \
  21969. \cf2 //
  21970. \f1 \'c8\'ba\'b8\'fc\'b8\'c4\'ea\'c7\'b3\'c6
  21971. \f0 \cf4 \
  21972. - (
  21973. \f2\b \cf8 void
  21974. \f0\b0 \cf4 )\cf11 setNickName\cf4 :(NSString *)nickName \{\
  21975. _userNickName = nickName.length > \cf7 0\cf4 ? nickName : _userNickName;\
  21976. [_table reloadData];\
  21977. \}\
  21978. \cf2 //
  21979. \f1 \'b7\'a2\'cb\'cd\'d1\'fb\'c7\'eb\'c8\'ba\'b3\'c9\'d4\'b1\'d1\'e9\'d6\'a4
  21980. \f0 \cf4 \
  21981. - (
  21982. \f2\b \cf8 void
  21983. \f0\b0 \cf4 )\cf11 needVerify\cf4 :(JXMessageObject *)msg \{\
  21984. [
  21985. \f2\b \cf8 self
  21986. \f0\b0 \cf4 showOneMsg:msg];\
  21987. \}\
  21988. \
  21989. \cf2 //
  21990. \f1 \'b5\'a5\'cc\'f5\'cd\'bc\'ce\'c4\'b5\'e3\'bb\'f7
  21991. \f0 \cf4 \
  21992. - (
  21993. \f2\b \cf8 void
  21994. \f0\b0 \cf4 ) \cf11 onDidSystemImage1\cf4 :(NSNotification *)notif \{\
  21995. \f2\b \cf8 if
  21996. \f0\b0 \cf4 (recording) \{\
  21997. \f2\b \cf8 return
  21998. \f0\b0 \cf4 ;\
  21999. \}\
  22000. JXMessageObject *msg = notif.object;\
  22001. SBJsonParser * parser = [[SBJsonParser alloc] init] ;\
  22002. \f2\b \cf8 id
  22003. \f0\b0 \cf4 content = [parser objectWithString:msg.content];\
  22004. NSString *url = [(NSDictionary *)content objectForKey:\cf6 @"url"\cf4 ];\
  22005. \
  22006. webpageVC *webVC = [webpageVC alloc];\
  22007. webVC.isGotoBack=
  22008. \f2\b \cf8 YES
  22009. \f0\b0 \cf4 ;\
  22010. webVC.isSend =
  22011. \f2\b \cf8 YES
  22012. \f0\b0 \cf4 ;\
  22013. webVC.title = [(NSDictionary *)content objectForKey:\cf6 @"title"\cf4 ];\
  22014. webVC.url = url;\
  22015. webVC = [webVC init];\
  22016. [g_navigation.navigationView addSubview:webVC.view];\
  22017. \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
  22018. \
  22019. \}\
  22020. \
  22021. \cf2 //
  22022. \f1 \'b6\'e0\'cc\'f5\'cd\'bc\'ce\'c4\'b5\'e3\'bb\'f7
  22023. \f0 \cf4 \
  22024. - (
  22025. \f2\b \cf8 void
  22026. \f0\b0 \cf4 ) \cf11 onDidSystemImage2\cf4 :(NSNotification *)notif \{\
  22027. \f2\b \cf8 if
  22028. \f0\b0 \cf4 (recording) \{\
  22029. \f2\b \cf8 return
  22030. \f0\b0 \cf4 ;\
  22031. \}\
  22032. NSDictionary *dic = notif.object;\
  22033. NSString *url = [dic objectForKey:\cf6 @"url"\cf4 ];\
  22034. \
  22035. webpageVC *webVC = [webpageVC alloc];\
  22036. webVC.isGotoBack=
  22037. \f2\b \cf8 YES
  22038. \f0\b0 \cf4 ;\
  22039. webVC.isSend =
  22040. \f2\b \cf8 YES
  22041. \f0\b0 \cf4 ;\
  22042. webVC.title = [dic objectForKey:\cf6 @"title"\cf4 ];\
  22043. webVC.url = url;\
  22044. webVC = [webVC init];\
  22045. [g_navigation.navigationView addSubview:webVC.view];\
  22046. \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
  22047. \
  22048. \}\
  22049. \
  22050. \cf2 //
  22051. \f1 \'d2\'f4\'ca\'d3\'c6\'b5\'cd\'a8\'bb\'b0\'d7\'b4\'cc\'ac
  22052. \f0 cell
  22053. \f1 \'b5\'e3\'bb\'f7
  22054. \f0 \cf4 \
  22055. - (
  22056. \f2\b \cf8 void
  22057. \f0\b0 \cf4 ) \cf11 onDidAVCall\cf4 :(NSNotification *)notif \{\
  22058. \f2\b \cf8 if
  22059. \f0\b0 \cf4 (recording) \{\
  22060. \f2\b \cf8 return
  22061. \f0\b0 \cf4 ;\
  22062. \}\
  22063. JXMessageObject *msg = notif.object;\
  22064. \
  22065. \f2\b \cf8 BOOL
  22066. \f0\b0 \cf4 isMeeting =
  22067. \f2\b \cf8 NO
  22068. \f0\b0 \cf4 ;\
  22069. \f2\b \cf8 switch
  22070. \f0\b0 \cf4 ([msg.type intValue]) \{\
  22071. \f2\b \cf8 case
  22072. \f0\b0 \cf4 kWCMessageTypeAudioMeetingInvite:\
  22073. \f2\b \cf8 case
  22074. \f0\b0 \cf4 kWCMessageTypeAudioChatCancel:\
  22075. \f2\b \cf8 case
  22076. \f0\b0 \cf4 kWCMessageTypeAudioChatEnd: \{\
  22077. \f2\b \cf8 self
  22078. \f0\b0 \cf4 .isAudioMeeting =
  22079. \f2\b \cf8 YES
  22080. \f0\b0 \cf4 ;\
  22081. isMeeting =
  22082. \f2\b \cf8 YES
  22083. \f0\b0 \cf4 ;\
  22084. \}\
  22085. \cf2 // [self onChatAudio:msg];\cf4 \
  22086. \f2\b \cf8 break
  22087. \f0\b0 \cf4 ;\
  22088. \f2\b \cf8 case
  22089. \f0\b0 \cf4 kWCMessageTypeVideoMeetingInvite:\
  22090. \f2\b \cf8 case
  22091. \f0\b0 \cf4 kWCMessageTypeVideoChatCancel:\
  22092. \f2\b \cf8 case
  22093. \f0\b0 \cf4 kWCMessageTypeVideoChatEnd: \{\
  22094. \f2\b \cf8 self
  22095. \f0\b0 \cf4 .isAudioMeeting =
  22096. \f2\b \cf8 NO
  22097. \f0\b0 \cf4 ;\
  22098. isMeeting =
  22099. \f2\b \cf8 YES
  22100. \f0\b0 \cf4 ;\
  22101. \}\
  22102. \cf2 // [self onChatVideo:msg];\cf4 \
  22103. \f2\b \cf8 break
  22104. \f0\b0 \cf4 ;\
  22105. \
  22106. \f2\b \cf8 case
  22107. \f0\b0 \cf4 kWCMessageTypeAVBusy: \{\
  22108. \f2\b \cf8 if
  22109. \f0\b0 \cf4 ([msg.objectId isEqualToString:\cf6 @"1"\cf4 ]) \{\
  22110. \f2\b \cf8 self
  22111. \f0\b0 \cf4 .isAudioMeeting =
  22112. \f2\b \cf8 NO
  22113. \f0\b0 \cf4 ;\
  22114. \}
  22115. \f2\b \cf8 else
  22116. \f0\b0 \cf4 \{\
  22117. \f2\b \cf8 self
  22118. \f0\b0 \cf4 .isAudioMeeting =
  22119. \f2\b \cf8 YES
  22120. \f0\b0 \cf4 ;\
  22121. \}\
  22122. \}\
  22123. \
  22124. \f2\b \cf8 default
  22125. \f0\b0 \cf4 :\
  22126. \f2\b \cf8 break
  22127. \f0\b0 \cf4 ;\
  22128. \}\
  22129. \
  22130. \f2\b \cf8 if
  22131. \f0\b0 \cf4 (isMeeting && [g_config.isOpenCluster integerValue] == \cf7 1\cf4 ) \{\
  22132. \
  22133. [g_server userOpenMeetWithToUserId:chatPerson.userId toView:
  22134. \f2\b \cf8 self
  22135. \f0\b0 \cf4 ];\
  22136. \}
  22137. \f2\b \cf8 else
  22138. \f0\b0 \cf4 \{\
  22139. \f2\b \cf8 if
  22140. \f0\b0 \cf4 (
  22141. \f2\b \cf8 self
  22142. \f0\b0 \cf4 .isAudioMeeting) \{\
  22143. [
  22144. \f2\b \cf8 self
  22145. \f0\b0 \cf4 onChatAudio:msg];\
  22146. \}
  22147. \f2\b \cf8 else
  22148. \f0\b0 \cf4 \{\
  22149. [
  22150. \f2\b \cf8 self
  22151. \f0\b0 \cf4 onChatVideo:msg];\
  22152. \}\
  22153. \}\
  22154. \}\
  22155. \
  22156. \cf2 //
  22157. \f1 \'ce\'c4\'bc\'fe
  22158. \f0 cell
  22159. \f1 \'b5\'e3\'bb\'f7
  22160. \f0 \cf4 \
  22161. - (
  22162. \f2\b \cf8 void
  22163. \f0\b0 \cf4 ) \cf11 onDidFile\cf4 :(NSNotification *)notif \{\
  22164. \f2\b \cf8 if
  22165. \f0\b0 \cf4 (recording) \{\
  22166. \f2\b \cf8 return
  22167. \f0\b0 \cf4 ;\
  22168. \}\
  22169. JXMessageObject *msg = notif.object;\
  22170. JXShareFileObject *obj = [[JXShareFileObject alloc] init];\
  22171. obj.fileName = [msg.fileName lastPathComponent];\
  22172. obj.url = msg.content;\
  22173. obj.size = msg.fileSize;\
  22174. \
  22175. JXFileDetailViewController *vc = [[JXFileDetailViewController alloc] init];\
  22176. vc.shareFile = obj;\
  22177. \cf2 // [g_window addSubview:vc.view];\cf4 \
  22178. [g_navigation pushViewController:vc animated:
  22179. \f2\b \cf8 YES
  22180. \f0\b0 \cf4 ];\
  22181. \
  22182. \}\
  22183. \
  22184. \cf2 //
  22185. \f1 \'c1\'b4\'bd\'d3
  22186. \f0 cell
  22187. \f1 \'b5\'e3\'bb\'f7
  22188. \f0 \cf4 \
  22189. - (
  22190. \f2\b \cf8 void
  22191. \f0\b0 \cf4 ) \cf11 onDidLink\cf4 :(NSNotification *)notif \{\
  22192. \f2\b \cf8 if
  22193. \f0\b0 \cf4 (recording) \{\
  22194. \f2\b \cf8 return
  22195. \f0\b0 \cf4 ;\
  22196. \}\
  22197. [_messageText resignFirstResponder];\
  22198. \
  22199. JXMessageObject *msg = notif.object;\
  22200. SBJsonParser * parser = [[SBJsonParser alloc] init] ;\
  22201. \f2\b \cf8 id
  22202. \f0\b0 \cf4 content = [parser objectWithString:msg.content];\
  22203. NSString *url = [(NSDictionary *)content objectForKey:\cf6 @"url"\cf4 ];\
  22204. \
  22205. webpageVC *webVC = [webpageVC alloc];\
  22206. webVC.isGotoBack=
  22207. \f2\b \cf8 YES
  22208. \f0\b0 \cf4 ;\
  22209. webVC.isSend =
  22210. \f2\b \cf8 YES
  22211. \f0\b0 \cf4 ;\
  22212. webVC.title = [(NSDictionary *)content objectForKey:\cf6 @"title"\cf4 ];\
  22213. webVC.url = url;\
  22214. webVC = [webVC init];\
  22215. [g_navigation.navigationView addSubview:webVC.view];\
  22216. \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
  22217. \
  22218. \}\
  22219. \
  22220. \cf2 //
  22221. \f1 \'b4\'c1\'d2\'bb\'b4\'c1\'b5\'e3\'bb\'f7
  22222. \f0 \cf4 \
  22223. - (
  22224. \f2\b \cf8 void
  22225. \f0\b0 \cf4 )\cf11 onDidShake\cf4 :(NSNotification *)notif \{\
  22226. JXMessageObject *msg = notif.object;\
  22227. \
  22228. \f2\b \cf8 int
  22229. \f0\b0 \cf4 value = \cf7 0\cf4 ;\
  22230. \f2\b \cf8 if
  22231. \f0\b0 \cf4 (msg.isMySend) \{\
  22232. value = -\cf7 50\cf4 ;\
  22233. \}
  22234. \f2\b \cf8 else
  22235. \f0\b0 \cf4 \{\
  22236. value = \cf7 50\cf4 ;\
  22237. \}\
  22238. CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:\cf6 @"transform.translation.x"\cf4 ];\cf12 ///
  22239. \f1 \cf2 \'ba\'e1\'cf\'f2\'d2\'c6\'b6\'af
  22240. \f0 \cf4 \
  22241. \
  22242. animation.toValue = [NSNumber numberWithInt:value];\
  22243. \
  22244. animation.duration = \cf7 .5\cf4 ;\
  22245. \
  22246. animation.removedOnCompletion =
  22247. \f2\b \cf8 YES
  22248. \f0\b0 \cf4 ;\cf2 //yes
  22249. \f1 \'b5\'c4\'bb\'b0\'a3\'ac\'d3\'d6\'b7\'b5\'bb\'d8\'d4\'ad\'ce\'bb\'d6\'c3\'c1\'cb\'a1\'a3
  22250. \f0 \cf4 \
  22251. \
  22252. animation.repeatCount = \cf7 2\cf4 ;\
  22253. \
  22254. animation.fillMode = kCAFillModeForwards;\
  22255. \
  22256. \cf2 //
  22257. \f1 \'cc\'ed\'bc\'d3\'d5\'f1\'b6\'af
  22258. \f0 \cf4 \
  22259. \cf2 // AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);\cf4 \
  22260. AudioServicesPlaySystemSound(\cf7 1521\cf4 );\
  22261. [_messageText.inputView.superview.layer addAnimation:animation forKey:
  22262. \f2\b \cf8 nil
  22263. \f0\b0 \cf4 ];\
  22264. [g_window.layer addAnimation:animation forKey:
  22265. \f2\b \cf8 nil
  22266. \f0\b0 \cf4 ];\
  22267. \}\
  22268. \
  22269. \cf2 //
  22270. \f1 \'ba\'cf\'b2\'a2\'d7\'aa\'b7\'a2\'b5\'e3\'bb\'f7
  22271. \f0 \cf4 \
  22272. - (
  22273. \f2\b \cf8 void
  22274. \f0\b0 \cf4 )\cf11 onDidMergeRelay\cf4 :(NSNotification *)notif \{\
  22275. JXMessageObject *msg = notif.object;\
  22276. SBJsonParser * parser = [[SBJsonParser alloc] init] ;\
  22277. NSArray *content = [parser objectWithString:msg.content];\
  22278. NSMutableArray *array = [NSMutableArray array];\
  22279. \f2\b \cf8 for
  22280. \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < content.count; i ++) \{\
  22281. NSString *str = content[i];\
  22282. NSDictionary *dict = [parser objectWithString:str];\
  22283. JXMessageObject *msg = [[JXMessageObject alloc] init];\
  22284. [msg fromDictionary:dict];\
  22285. msg.isNotUpdateHeight =
  22286. \f2\b \cf8 YES
  22287. \f0\b0 \cf4 ;\
  22288. [array addObject:msg];\
  22289. \}\
  22290. \
  22291. JXChatLogVC *vc = [[JXChatLogVC alloc] init];\
  22292. \
  22293. vc.array = array;\
  22294. vc.title = msg.objectId;\
  22295. [g_navigation pushViewController:vc animated:
  22296. \f2\b \cf8 YES
  22297. \f0\b0 \cf4 ];\
  22298. \
  22299. \}\
  22300. \
  22301. \cf2 //
  22302. \f1 \'b7\'d6\'cf\'ed
  22303. \f0 cell
  22304. \f1 \'b5\'e3\'bb\'f7
  22305. \f0 \cf4 \
  22306. - (
  22307. \f2\b \cf8 void
  22308. \f0\b0 \cf4 )\cf11 onDidShare\cf4 :(NSNotification *)notif \{\
  22309. \f2\b \cf8 if
  22310. \f0\b0 \cf4 (recording) \{\
  22311. \f2\b \cf8 return
  22312. \f0\b0 \cf4 ;\
  22313. \}\
  22314. JXMessageObject *msg = notif.object;\
  22315. NSDictionary * msgDict = [[[SBJsonParser alloc]init]objectWithString:msg.objectId];\
  22316. \
  22317. NSString *url = [msgDict objectForKey:\cf6 @"url"\cf4 ];\
  22318. NSString *downloadUrl = [msgDict objectForKey:\cf6 @"downloadUrl"\cf4 ];\
  22319. \
  22320. \f2\b \cf8 if
  22321. \f0\b0 \cf4 ([url rangeOfString:\cf6 @"http"\cf4 ].location == NSNotFound) \{\
  22322. \
  22323. [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url] options:
  22324. \f2\b \cf8 nil
  22325. \f0\b0 \cf4 completionHandler:^(
  22326. \f2\b \cf8 BOOL
  22327. \f0\b0 \cf4 success) \{\
  22328. \
  22329. \f2\b \cf8 if
  22330. \f0\b0 \cf4 (!success) \{\
  22331. \
  22332. webpageVC *webVC = [webpageVC alloc];\
  22333. webVC.isGotoBack=
  22334. \f2\b \cf8 YES
  22335. \f0\b0 \cf4 ;\
  22336. webVC.isSend =
  22337. \f2\b \cf8 YES
  22338. \f0\b0 \cf4 ;\
  22339. webVC.titleString = [msgDict objectForKey:\cf6 @"title"\cf4 ];\
  22340. webVC.url = downloadUrl;\
  22341. webVC = [webVC init];\
  22342. [g_navigation.navigationView addSubview:webVC.view];\
  22343. \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
  22344. \}\
  22345. \
  22346. \}];\
  22347. \
  22348. \}
  22349. \f2\b \cf8 else
  22350. \f0\b0 \cf4 \{\
  22351. webpageVC *webVC = [webpageVC alloc];\
  22352. webVC.isGotoBack=
  22353. \f2\b \cf8 YES
  22354. \f0\b0 \cf4 ;\
  22355. webVC.isSend =
  22356. \f2\b \cf8 YES
  22357. \f0\b0 \cf4 ;\
  22358. webVC.titleString = [msgDict objectForKey:\cf6 @"title"\cf4 ];\
  22359. webVC.url = url;\
  22360. webVC = [webVC init];\
  22361. [g_navigation.navigationView addSubview:webVC.view];\
  22362. \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
  22363. \}\
  22364. \
  22365. \}\
  22366. \
  22367. \cf2 //
  22368. \f1 \'bf\'d8\'d6\'c6\'cf\'fb\'cf\'a2\'b5\'e3\'bb\'f7
  22369. \f0 \cf4 \
  22370. - (
  22371. \f2\b \cf8 void
  22372. \f0\b0 \cf4 )\cf11 onDidRemind\cf4 :(NSNotification *)notif \{\
  22373. JXMessageObject *msg = notif.object;\
  22374. \
  22375. \f2\b \cf8 if
  22376. \f0\b0 \cf4 ([msg.remindType intValue] == kRoomRemind_NeedVerify) \{\
  22377. JXVerifyDetailVC *vc = [[JXVerifyDetailVC alloc] init];\
  22378. vc.chatVC2 =
  22379. \f2\b \cf8 self
  22380. \f0\b0 \cf4 ;\
  22381. vc.msg = msg;\
  22382. vc.room =
  22383. \f2\b \cf8 self
  22384. \f0\b0 \cf4 .room;\
  22385. [g_navigation pushViewController:vc animated:
  22386. \f2\b \cf8 YES
  22387. \f0\b0 \cf4 ];\
  22388. \}\
  22389. \
  22390. \f2\b \cf8 if
  22391. \f0\b0 \cf4 ([msg.remindType intValue] == kWCMessageTypeRedPacketReceive) \{\
  22392. \f2\b \cf8 self
  22393. \f0\b0 \cf4 .isDidRedPacketRemind =
  22394. \f2\b \cf8 YES
  22395. \f0\b0 \cf4 ;\
  22396. [g_server getRedPacket:msg.objectId toView:
  22397. \f2\b \cf8 self
  22398. \f0\b0 \cf4 ];\
  22399. \}\
  22400. \}\
  22401. \
  22402. \cf2 //
  22403. \f1 \'bb\'d8\'b8\'b4\'cf\'fb\'cf\'a2\'b5\'e3\'bb\'f7
  22404. \f0 \cf4 \
  22405. - (
  22406. \f2\b \cf8 void
  22407. \f0\b0 \cf4 )\cf11 onDidReply\cf4 :(NSNotification *)notif \{\
  22408. \f2\b \cf8 int
  22409. \f0\b0 \cf4 indexNum = [notif.object intValue];\
  22410. JXMessageObject *msg = _array[indexNum];\
  22411. \
  22412. JXMessageObject *msgObj = [[JXMessageObject alloc] init];\
  22413. SBJsonParser *jsonParser = [[SBJsonParser alloc] init];\
  22414. NSDictionary *dict = [jsonParser objectWithString:msg.objectId];\
  22415. [msgObj fromDictionary:dict];\
  22416. \f2\b \cf8 for
  22417. \f0\b0 \cf4 (JXMessageObject *msg1
  22418. \f2\b \cf8 in
  22419. \f0\b0 \cf4 _array) \{\
  22420. \f2\b \cf8 if
  22421. \f0\b0 \cf4 ([msgObj.messageId isEqualToString:msg1.messageId]) \{\
  22422. NSUInteger index = [_array indexOfObject:msg1];\
  22423. [_table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:\cf7 0\cf4 ] atScrollPosition:UITableViewScrollPositionTop animated:
  22424. \f2\b \cf8 YES
  22425. \f0\b0 \cf4 ];\
  22426. \}\
  22427. \}\
  22428. \
  22429. \}\
  22430. \
  22431. \cf2 //
  22432. \f1 \'ce\'c4\'b1\'be\'cf\'fb\'cf\'a2\'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9
  22433. \f0 \cf4 \
  22434. - (
  22435. \f2\b \cf8 void
  22436. \f0\b0 \cf4 )\cf11 onDidMessageReadDel\cf4 :(NSNotification *)notif \{\
  22437. \cf2 // int indexNum = [notif.object intValue];\cf4 \
  22438. \cf2 // [_table reloadRow:indexNum section:0];\cf4 \
  22439. [_table reloadData];\
  22440. \
  22441. \}\
  22442. \
  22443. \cf2 //
  22444. \f1 \'cf\'fb\'cf\'a2\'b3\'b7\'bb\'d8
  22445. \f0 \cf4 \
  22446. - (
  22447. \f2\b \cf8 void
  22448. \f0\b0 \cf4 )\cf11 withdrawNotifi\cf4 :(NSNotification *) notif \{\
  22449. JXMessageObject *msg = notif.object;\
  22450. \
  22451. \f2\b \cf8 for
  22452. \f0\b0 \cf4 (NSInteger i=[_array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
  22453. JXMessageObject *p=[_array objectAtIndex:i];\
  22454. \f2\b \cf8 if
  22455. \f0\b0 \cf4 ([p.messageId isEqualToString:msg.messageId])\{\cf2 //
  22456. \f1 \'c8\'e7\'b9\'fb\'d5\'d2\'b5\'bd\'b1\'bb\'b3\'b7\'bb\'d8\'b5\'c4\'c4\'c7\'cc\'f5\'cf\'fb\'cf\'a2
  22457. \f0 \cf4 \
  22458. p.content = msg.content;\
  22459. p.type = msg.type;\
  22460. [_table reloadRow:(
  22461. \f2\b \cf8 int
  22462. \f0\b0 \cf4 )i section:\cf7 0\cf4 ];\
  22463. \}\
  22464. p =
  22465. \f2\b \cf8 nil
  22466. \f0\b0 \cf4 ;\
  22467. \}\
  22468. \}\
  22469. \
  22470. - (
  22471. \f2\b \cf8 void
  22472. \f0\b0 \cf4 )\cf11 enableCell\cf4 \{\
  22473. \f2\b \cf8 for
  22474. \f0\b0 \cf4 (
  22475. \f2\b \cf8 int
  22476. \f0\b0 \cf4 i = \cf7 0\cf4 ; i < _array.count; i++) \{\
  22477. JXBaseChatCell *cell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:\cf7 0\cf4 ]];\
  22478. cell.bubbleBg.userInteractionEnabled = !
  22479. \f2\b \cf8 self
  22480. \f0\b0 \cf4 .isSelectMore;\
  22481. \}\
  22482. \}\
  22483. \
  22484. - (
  22485. \f2\b \cf8 void
  22486. \f0\b0 \cf4 )\cf11 createRoom\cf4 \{\
  22487. \f2\b \cf8 if
  22488. \f0\b0 \cf4 (recording) \{\
  22489. \f2\b \cf8 return
  22490. \f0\b0 \cf4 ;\
  22491. \}\
  22492. JXChatSettingVC *vc = [[JXChatSettingVC alloc] init];\
  22493. vc.user =
  22494. \f2\b \cf8 self
  22495. \f0\b0 \cf4 .chatPerson;\
  22496. vc.room =
  22497. \f2\b \cf8 self
  22498. \f0\b0 \cf4 .room;\
  22499. vc.chatRoom =
  22500. \f2\b \cf8 self
  22501. \f0\b0 \cf4 .chatRoom;\
  22502. [g_navigation pushViewController:vc animated:
  22503. \f2\b \cf8 YES
  22504. \f0\b0 \cf4 ];\
  22505. \
  22506. \cf2 // JXSelFriendVC* vc = [JXSelFriendVC alloc];\cf4 \
  22507. \cf12 ///
  22508. \f3 \cf2 / vc.chatRoom = _chatRoom;
  22509. \f0 \cf4 \
  22510. \cf2 // vc.room = _room;\cf4 \
  22511. \cf2 // vc.isNewRoom = YES;\cf4 \
  22512. \cf2 // vc.isForRoom = YES;\cf4 \
  22513. \cf2 // vc.forRoomUser = chatPerson;\cf4 \
  22514. \cf2 // vc = [vc init];\cf4 \
  22515. \cf12 ///
  22516. \f3 \cf2 / [g_window addSubview:vc.view];
  22517. \f0 \cf4 \
  22518. \cf2 // [g_navigation pushViewController:vc animated:YES];\cf4 \
  22519. \}\
  22520. \
  22521. - (
  22522. \f2\b \cf8 BOOL
  22523. \f0\b0 \cf4 )\cf11 sendMsgCheck\cf4 \{\
  22524. \cf2 //
  22525. \f1 \'d1\'e9\'d6\'a4
  22526. \f0 XMPP
  22527. \f1 \'ca\'c7\'b7\'f1\'d4\'da\'cf\'df
  22528. \f0 \cf4 \
  22529. \f2\b \cf8 if
  22530. \f0\b0 \cf4 (g_xmpp.isLogined == login_status_no)\{\
  22531. \cf2 // [self hideKeyboard:NO];\cf4 \
  22532. \cf2 // [g_xmpp showXmppOfflineAlert];\cf4 \
  22533. \cf2 // return YES;\cf4 \
  22534. \
  22535. \cf2 // [g_xmpp logout];\cf4 \
  22536. [g_xmpp login];\
  22537. \
  22538. \}\
  22539. \
  22540. \f2\b \cf8 if
  22541. \f0\b0 \cf4 (
  22542. \f2\b \cf8 self
  22543. \f0\b0 \cf4 .roomJid) \{\
  22544. NSString *s;\
  22545. \cf2 //
  22546. \f1 \'d1\'e9\'d6\'a4\'c8\'ba\'d7\'e9\'ca\'c7\'b7\'f1\'d3\'d0\'d0\'a7
  22547. \f0 \cf4 \
  22548. \f2\b \cf8 switch
  22549. \f0\b0 \cf4 ([
  22550. \f2\b \cf8 self
  22551. \f0\b0 \cf4 .groupStatus intValue]) \{\
  22552. \f2\b \cf8 case
  22553. \f0\b0 \cf4 \cf7 0\cf4 :\
  22554. s =
  22555. \f2\b \cf8 nil
  22556. \f0\b0 \cf4 ;\
  22557. \f2\b \cf8 break
  22558. \f0\b0 \cf4 ;\
  22559. \f2\b \cf8 case
  22560. \f0\b0 \cf4 \cf7 1\cf4 :\
  22561. s = Localized(\cf6 @"JX_OutOfTheGroup1"\cf4 );\
  22562. \f2\b \cf8 break
  22563. \f0\b0 \cf4 ;\
  22564. \f2\b \cf8 case
  22565. \f0\b0 \cf4 \cf7 2\cf4 :\
  22566. s = Localized(\cf6 @"JX_DissolutionGroup1"\cf4 );\
  22567. \f2\b \cf8 break
  22568. \f0\b0 \cf4 ;\
  22569. \
  22570. \f2\b \cf8 default
  22571. \f0\b0 \cf4 :\
  22572. \f2\b \cf8 break
  22573. \f0\b0 \cf4 ;\
  22574. \}\
  22575. \
  22576. \f2\b \cf8 if
  22577. \f0\b0 \cf4 (!s || s.length <= \cf7 0\cf4 ) \{\
  22578. \f2\b \cf8 if
  22579. \f0\b0 \cf4 (![g_xmpp.roomPool getRoom:
  22580. \f2\b \cf8 self
  22581. \f0\b0 \cf4 .chatPerson.userId] && [
  22582. \f2\b \cf8 self
  22583. \f0\b0 \cf4 .chatPerson.groupStatus intValue] == \cf7 0\cf4 ) \{\
  22584. [g_xmpp.roomPool joinRoom:chatPerson.userId title:chatPerson.userNickname lastDate:
  22585. \f2\b \cf8 nil
  22586. \f0\b0 \cf4 isNew:
  22587. \f2\b \cf8 NO
  22588. \f0\b0 \cf4 ];\
  22589. \cf2 // s = Localized(@"JX_GroupConnectionFailed");\cf4 \
  22590. chatRoom = [[JXXMPP sharedInstance].roomPool joinRoom:chatPerson.userId title:chatPerson.userNickname lastDate:
  22591. \f2\b \cf8 nil
  22592. \f0\b0 \cf4 isNew:
  22593. \f2\b \cf8 NO
  22594. \f0\b0 \cf4 ];\
  22595. \}\
  22596. \}\
  22597. \
  22598. \f2\b \cf8 if
  22599. \f0\b0 \cf4 (
  22600. \f2\b \cf8 self
  22601. \f0\b0 \cf4 .isDisable) \{\
  22602. s = Localized(\cf6 @"JX_GroupNotUse"\cf4 );\
  22603. \}\
  22604. \
  22605. \f2\b \cf8 if
  22606. \f0\b0 \cf4 (s.length > \cf7 0\cf4 ) \{\
  22607. [
  22608. \f2\b \cf8 self
  22609. \f0\b0 \cf4 hideKeyboard:
  22610. \f2\b \cf8 NO
  22611. \f0\b0 \cf4 ];\
  22612. [g_server showMsg:s];\
  22613. \f2\b \cf8 return
  22614. \f0\b0 \cf4
  22615. \f2\b \cf8 YES
  22616. \f0\b0 \cf4 ;\
  22617. \}\
  22618. \
  22619. \cf2 // if (!chatRoom.isConnected) \{\cf4 \
  22620. \cf2 // [_wait start];\cf4 \
  22621. \cf2 // chatRoom = [[JXXMPP sharedInstance].roomPool joinRoom:chatPerson.userId title:chatPerson.userNickname isNew:NO];\cf4 \
  22622. \cf2 // return YES;\cf4 \
  22623. \cf2 // \}\cf4 \
  22624. \
  22625. \}
  22626. \f2\b \cf8 else
  22627. \f0\b0 \cf4 \{\
  22628. \f2\b \cf8 if
  22629. \f0\b0 \cf4 ([
  22630. \f2\b \cf8 self
  22631. \f0\b0 \cf4 .chatPerson.userId intValue] <=\cf7 10100\cf4 && [
  22632. \f2\b \cf8 self
  22633. \f0\b0 \cf4 .chatPerson.userId intValue] >=\cf7 10000\cf4 ) \{\
  22634. \f2\b \cf8 return
  22635. \f0\b0 \cf4
  22636. \f2\b \cf8 NO
  22637. \f0\b0 \cf4 ;\
  22638. \}\
  22639. \f2\b \cf8 if
  22640. \f0\b0 \cf4 (
  22641. \f2\b \cf8 self
  22642. \f0\b0 \cf4 .isGroupMessages) \{\
  22643. \f2\b \cf8 return
  22644. \f0\b0 \cf4
  22645. \f2\b \cf8 NO
  22646. \f0\b0 \cf4 ;\
  22647. \}\
  22648. \cf2 //
  22649. \f1 \'ca\'c7\'b7\'f1\'b1\'bb\'c0\'ad\'c8\'eb\'ba\'da\'c3\'fb\'b5\'a5
  22650. \f0 \cf4 \
  22651. \f2\b \cf8 if
  22652. \f0\b0 \cf4 (
  22653. \f2\b \cf8 self
  22654. \f0\b0 \cf4 .isBeenBlack > \cf7 0\cf4 ) \{\
  22655. [g_App showAlert:Localized(\cf6 @"TO_BLACKLIST"\cf4 )];\
  22656. \f2\b \cf8 return
  22657. \f0\b0 \cf4
  22658. \f2\b \cf8 YES
  22659. \f0\b0 \cf4 ;\
  22660. \}
  22661. \f2\b \cf8 else
  22662. \f0\b0 \cf4 \
  22663. \cf2 // if (self.friendStatus != 2 && self.friendStatus != 10) \{\cf4 \
  22664. \cf2 // [g_App showAlert:Localized(@"JX_NoFriendsWithMe")];\cf4 \
  22665. \cf2 // return YES;\cf4 \
  22666. \cf2 // \}else\cf4 \
  22667. \{\
  22668. \f2\b \cf8 return
  22669. \f0\b0 \cf4
  22670. \f2\b \cf8 NO
  22671. \f0\b0 \cf4 ;\
  22672. \}\
  22673. \}\
  22674. \
  22675. \f2\b \cf8 return
  22676. \f0\b0 \cf4
  22677. \f2\b \cf8 NO
  22678. \f0\b0 \cf4 ;\
  22679. \}\
  22680. \
  22681. - (
  22682. \f2\b \cf8 BOOL
  22683. \f0\b0 \cf4 )\cf11 checkCameraLimits\cf4 \{\
  22684. \cf12 ///\cf4
  22685. \f1 \cf2 \'cf\'c8\'c5\'d0\'b6\'cf\'c9\'e3\'cf\'f1\'cd\'b7\'d3\'b2\'bc\'fe\'ca\'c7\'b7\'f1\'ba\'c3\'d3\'c3
  22686. \f0 \cf4 \
  22687. \f2\b \cf8 if
  22688. \f0\b0 \cf4 ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])\
  22689. \{\
  22690. \cf2 //
  22691. \f1 \'d3\'c3\'bb\'a7\'ca\'c7\'b7\'f1\'d4\'ca\'d0\'ed\'c9\'e3\'cf\'f1\'cd\'b7\'ca\'b9\'d3\'c3
  22692. \f0 \cf4 \
  22693. NSString * mediaType = AVMediaTypeVideo;\
  22694. AVAuthorizationStatus authorizationStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType];\
  22695. \cf2 //
  22696. \f1 \'b2\'bb\'d4\'ca\'d0\'ed\'b5\'af\'b3\'f6\'cc\'e1\'ca\'be\'bf\'f2
  22697. \f0 \cf4 \
  22698. \f2\b \cf8 if
  22699. \f0\b0 \cf4 (authorizationStatus == AVAuthorizationStatusRestricted|| authorizationStatus == AVAuthorizationStatusDenied) \{\
  22700. \
  22701. UIAlertController * alert = [UIAlertController alertControllerWithTitle:Localized(\cf6 @"JX_CameraNotTake"\cf4 ) message:
  22702. \f2\b \cf8 nil
  22703. \f0\b0 \cf4 preferredStyle:UIAlertControllerStyleAlert];\
  22704. UIAlertAction * action = [UIAlertAction actionWithTitle:Localized(\cf6 @"JXSettingVC_Set"\cf4 ) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) \{\
  22705. \cf2 //
  22706. \f1 \'ce\'de\'c8\'a8\'cf\'de
  22707. \f0
  22708. \f1 \'d2\'fd\'b5\'bc\'c8\'a5\'bf\'aa\'c6\'f4
  22709. \f0 \cf4 \
  22710. NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];\
  22711. \f2\b \cf8 if
  22712. \f0\b0 \cf4 ([[UIApplication sharedApplication] canOpenURL:url]) \{\
  22713. [[UIApplication sharedApplication] openURL:url];\
  22714. \}\
  22715. \}];\
  22716. UIAlertAction * actionCancel = [UIAlertAction actionWithTitle:Localized(\cf6 @"JX_Cencal"\cf4 ) style:UIAlertActionStyleCancel handler:^(UIAlertAction *
  22717. \f2\b \cf8 _Nonnull
  22718. \f0\b0 \cf4 action) \{\
  22719. \}];\
  22720. [alert addAction:action];\
  22721. [alert addAction:actionCancel];\
  22722. \
  22723. [
  22724. \f2\b \cf8 self
  22725. \f0\b0 \cf4 presentViewController:alert animated:
  22726. \f2\b \cf8 YES
  22727. \f0\b0 \cf4 completion:
  22728. \f2\b \cf8 nil
  22729. \f0\b0 \cf4 ];\
  22730. \f2\b \cf8 return
  22731. \f0\b0 \cf4
  22732. \f2\b \cf8 NO
  22733. \f0\b0 \cf4 ;\
  22734. \}
  22735. \f2\b \cf8 else
  22736. \f0\b0 \cf4 \{\
  22737. \cf2 //
  22738. \f1 \'d5\'e2\'c0\'ef\'ca\'c7\'c9\'e3\'cf\'f1\'cd\'b7\'bf\'c9\'d2\'d4\'ca\'b9\'d3\'c3\'b5\'c4\'b4\'a6\'c0\'ed\'c2\'df\'bc\'ad
  22739. \f0 \cf4 \
  22740. \f2\b \cf8 return
  22741. \f0\b0 \cf4
  22742. \f2\b \cf8 YES
  22743. \f0\b0 \cf4 ;\
  22744. \}\
  22745. \}
  22746. \f2\b \cf8 else
  22747. \f0\b0 \cf4 \{\
  22748. \cf2 //
  22749. \f1 \'d3\'b2\'bc\'fe\'ce\'ca\'cc\'e2\'cc\'e1\'ca\'be
  22750. \f0 \cf4 \
  22751. [g_App showAlert:Localized(\cf6 @"JX_CameraBad"\cf4 )];\
  22752. \f2\b \cf8 return
  22753. \f0\b0 \cf4
  22754. \f2\b \cf8 NO
  22755. \f0\b0 \cf4 ;\
  22756. \}\
  22757. \}\
  22758. \
  22759. - (
  22760. \f2\b \cf8 void
  22761. \f0\b0 \cf4 )\cf11 showCallMsg\cf4 :(NSNotification *)notifice\{\
  22762. JXMessageObject *msg = (JXMessageObject *)notifice.object;\
  22763. \f2\b \cf8 if
  22764. \f0\b0 \cf4 (msg==
  22765. \f2\b \cf8 nil
  22766. \f0\b0 \cf4 )\{\
  22767. \f2\b \cf8 return
  22768. \f0\b0 \cf4 ;\
  22769. \}\
  22770. _messageText.text = msg.content;\
  22771. [
  22772. \f2\b \cf8 self
  22773. \f0\b0 \cf4 sendIt:
  22774. \f2\b \cf8 nil
  22775. \f0\b0 \cf4 ];\
  22776. \}\
  22777. \
  22778. - (
  22779. \f2\b \cf8 void
  22780. \f0\b0 \cf4 )\cf11 addWaitGroupSendViewWithMsgNum\cf4 :(NSInteger )msgNum \cf11 withType\cf4 :(NSInteger )type\{\
  22781. _sendedNum = \cf7 0\cf4 ;\
  22782. \f2\b \cf8 self
  22783. \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
  22784. \f2\b \cf8 self
  22785. \f0\b0 \cf4 .groupUploadObjArray =
  22786. \f2\b \cf8 nil
  22787. \f0\b0 \cf4 ;\
  22788. \f2\b \cf8 self
  22789. \f0\b0 \cf4 .groupSendMsgArray =
  22790. \f2\b \cf8 nil
  22791. \f0\b0 \cf4 ;\
  22792. _groupSendType = type;\
  22793. \f2\b \cf8 self
  22794. \f0\b0 \cf4 .groupSendAllNum =
  22795. \f2\b \cf8 self
  22796. \f0\b0 \cf4 .userIds.count * msgNum;\
  22797. _isGroupSendCancel =
  22798. \f2\b \cf8 NO
  22799. \f0\b0 \cf4 ;\
  22800. \f2\b \cf8 self
  22801. \f0\b0 \cf4 .imgsAndVideosDic =
  22802. \f2\b \cf8 nil
  22803. \f0\b0 \cf4 ;\
  22804. \
  22805. \f2\b \cf8 self
  22806. \f0\b0 \cf4 .waitGroupSendView = [[UIView alloc] initWithFrame:
  22807. \f2\b \cf8 self
  22808. \f0\b0 \cf4 .view.bounds];\
  22809. \f2\b \cf8 self
  22810. \f0\b0 \cf4 .waitGroupSendView.backgroundColor = [UIColor clearColor];\
  22811. [
  22812. \f2\b \cf8 self
  22813. \f0\b0 \cf4 .view addSubview:
  22814. \f2\b \cf8 self
  22815. \f0\b0 \cf4 .waitGroupSendView];\
  22816. [
  22817. \f2\b \cf8 self
  22818. \f0\b0 \cf4 .view bringSubviewToFront:
  22819. \f2\b \cf8 self
  22820. \f0\b0 \cf4 .waitGroupSendView];\
  22821. \
  22822. UIView *centerView = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , \cf7 100\cf4 , \cf7 80\cf4 )];\
  22823. centerView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:\cf7 0.5\cf4 ];\
  22824. centerView.layer.cornerRadius = \cf7 5.f\cf4 ;\
  22825. centerView.layer.masksToBounds =
  22826. \f2\b \cf8 YES
  22827. \f0\b0 \cf4 ;\
  22828. [
  22829. \f2\b \cf8 self
  22830. \f0\b0 \cf4 .waitGroupSendView addSubview:centerView];\
  22831. centerView.center =
  22832. \f2\b \cf8 self
  22833. \f0\b0 \cf4 .waitGroupSendView.center;\
  22834. \
  22835. UILabel *lab = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 20\cf4 , \cf7 100\cf4 , \cf7 20\cf4 )];\
  22836. [lab setTextColor:[UIColor whiteColor]];\
  22837. [lab setFont:g_factory.font12];\
  22838. [lab setText:\cf6 @"
  22839. \f1 \'d5\'fd\'d4\'da\'b7\'a2\'cb\'cd\'a3\'ba
  22840. \f0 "\cf4 ];\
  22841. [lab setTextAlignment:NSTextAlignmentCenter];\
  22842. [lab setBackgroundColor:[UIColor clearColor]];\
  22843. [centerView addSubview:lab];\
  22844. \
  22845. \f2\b \cf8 self
  22846. \f0\b0 \cf4 .waitGroupSendLable = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 40\cf4 , \cf7 100\cf4 , \cf7 20\cf4 )];\
  22847. [
  22848. \f2\b \cf8 self
  22849. \f0\b0 \cf4 .waitGroupSendLable setTextAlignment:NSTextAlignmentCenter];\
  22850. [
  22851. \f2\b \cf8 self
  22852. \f0\b0 \cf4 .waitGroupSendLable setBackgroundColor:[UIColor clearColor]];\
  22853. [
  22854. \f2\b \cf8 self
  22855. \f0\b0 \cf4 .waitGroupSendLable setTextColor:[UIColor whiteColor]];\
  22856. [
  22857. \f2\b \cf8 self
  22858. \f0\b0 \cf4 .waitGroupSendLable setFont:g_factory.font12];\
  22859. [
  22860. \f2\b \cf8 self
  22861. \f0\b0 \cf4 .waitGroupSendLable setText:[NSString stringWithFormat:\cf6 @"%ld/%ld"\cf4 ,(
  22862. \f2\b \cf8 long
  22863. \f0\b0 \cf4 )_sendedNum,(
  22864. \f2\b \cf8 long
  22865. \f0\b0 \cf4 )
  22866. \f2\b \cf8 self
  22867. \f0\b0 \cf4 .groupSendAllNum]];\
  22868. [centerView addSubview:
  22869. \f2\b \cf8 self
  22870. \f0\b0 \cf4 .waitGroupSendLable];\
  22871. \
  22872. UIButton *cancelButton = [[UIButton alloc] initWithFrame:CGRectMake(\cf7 85\cf4 , \cf7 5\cf4 , \cf7 10\cf4 , \cf7 10\cf4 )];\
  22873. [cancelButton setImage:[UIImage imageNamed:\cf6 @"close_preview"\cf4 ] forState:UIControlStateNormal];\
  22874. [cancelButton addTarget:
  22875. \f2\b \cf8 self
  22876. \f0\b0 \cf4 action:
  22877. \f2\b \cf8 @selector
  22878. \f0\b0 \cf4 (groupSendCancel) forControlEvents:UIControlEventTouchUpInside];\
  22879. [centerView addSubview:cancelButton];\
  22880. \
  22881. \}\
  22882. \
  22883. - (
  22884. \f2\b \cf8 void
  22885. \f0\b0 \cf4 )\cf11 groupSendCancel\cf4 \{\
  22886. UIAlertController *alert = [[UIAlertController alloc] init];\
  22887. alert.title = \cf6 @"
  22888. \f1 \'ca\'c7\'b7\'f1\'cd\'a3\'d6\'b9\'b7\'a2\'cb\'cd
  22889. \f0 "\cf4 ;\
  22890. UIAlertAction *cancel = [UIAlertAction actionWithTitle:\cf6 @"
  22891. \f1 \'c8\'a1\'cf\'fb
  22892. \f0 "\cf4 style:UIAlertActionStyleCancel handler:
  22893. \f2\b \cf8 nil
  22894. \f0\b0 \cf4 ];\
  22895. UIAlertAction *ok = [UIAlertAction actionWithTitle:\cf6 @"
  22896. \f1 \'c8\'b7\'c8\'cf
  22897. \f0 "\cf4 style:UIAlertActionStyleDefault handler:^(UIAlertAction *
  22898. \f2\b \cf8 _Nonnull
  22899. \f0\b0 \cf4 action) \{\
  22900. _isGroupSendCancel =
  22901. \f2\b \cf8 YES
  22902. \f0\b0 \cf4 ;\
  22903. [
  22904. \f2\b \cf8 self
  22905. \f0\b0 \cf4 .waitGroupSendView removeFromSuperview];\
  22906. \}];\
  22907. [alert addAction:cancel];\
  22908. [alert addAction:ok];\
  22909. [
  22910. \f2\b \cf8 self
  22911. \f0\b0 \cf4 presentViewController:alert animated:
  22912. \f2\b \cf8 YES
  22913. \f0\b0 \cf4 completion:
  22914. \f2\b \cf8 nil
  22915. \f0\b0 \cf4 ];\
  22916. \}\
  22917. \
  22918. - (
  22919. \f2\b \cf8 void
  22920. \f0\b0 \cf4 )\cf11 keepOnGroupSend\cf4 :(NSNotification *)notifice\{\
  22921. _sendedNum ++;\
  22922. JXMessageObject *msg = (JXMessageObject *)notifice.object;\
  22923. \f2\b \cf8 if
  22924. \f0\b0 \cf4 (
  22925. \f2\b \cf8 self
  22926. \f0\b0 \cf4 .waitGroupSendView) \{\
  22927. [
  22928. \f2\b \cf8 self
  22929. \f0\b0 \cf4 .waitGroupSendLable setText:[NSString stringWithFormat:\cf6 @"%ld/%ld"\cf4 ,(
  22930. \f2\b \cf8 long
  22931. \f0\b0 \cf4 )_sendedNum,(
  22932. \f2\b \cf8 long
  22933. \f0\b0 \cf4 )
  22934. \f2\b \cf8 self
  22935. \f0\b0 \cf4 .groupSendAllNum]];\
  22936. \}\
  22937. \f2\b \cf8 if
  22938. \f0\b0 \cf4 (_sendedNum ==
  22939. \f2\b \cf8 self
  22940. \f0\b0 \cf4 .groupSendAllNum) \{\
  22941. \f2\b \cf8 if
  22942. \f0\b0 \cf4 (
  22943. \f2\b \cf8 self
  22944. \f0\b0 \cf4 .waitGroupSendView) \{\
  22945. [
  22946. \f2\b \cf8 self
  22947. \f0\b0 \cf4 .waitGroupSendView removeFromSuperview];\
  22948. [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
  22949. \}\
  22950. \f2\b \cf8 return
  22951. \f0\b0 \cf4 ;\
  22952. \}\
  22953. \f2\b \cf8 if
  22954. \f0\b0 \cf4 (msg.isLastGroupSend) \{\
  22955. \f2\b \cf8 switch
  22956. \f0\b0 \cf4 (_groupSendType) \{\
  22957. \f2\b \cf8 case
  22958. \f0\b0 \cf4 groupsend_msgType_text:\{\
  22959. [
  22960. \f2\b \cf8 self
  22961. \f0\b0 \cf4 sendIt:
  22962. \f2\b \cf8 nil
  22963. \f0\b0 \cf4 ];\
  22964. \f2\b \cf8 break
  22965. \f0\b0 \cf4 ;\
  22966. \}\
  22967. \f2\b \cf8 case
  22968. \f0\b0 \cf4 groupsend_msgType_shake:\{\
  22969. [
  22970. \f2\b \cf8 self
  22971. \f0\b0 \cf4 onShake];\
  22972. \f2\b \cf8 break
  22973. \f0\b0 \cf4 ;\
  22974. \}\
  22975. \f2\b \cf8 case
  22976. \f0\b0 \cf4 groupsend_msgType_addressbook:\{\
  22977. JXSelectAddressBookVC *selectVC =
  22978. \f2\b \cf8 self
  22979. \f0\b0 \cf4 .groupUploadObjArray.lastObject;\
  22980. [
  22981. \f2\b \cf8 self
  22982. \f0\b0 \cf4 selectAddressBookVC:selectVC doneAction:
  22983. \f2\b \cf8 self
  22984. \f0\b0 \cf4 .groupSendMsgArray];\
  22985. \f2\b \cf8 break
  22986. \f0\b0 \cf4 ;\
  22987. \}\
  22988. \f2\b \cf8 case
  22989. \f0\b0 \cf4 groupsend_msgType_card:\{\
  22990. JXSelectFriendsVC *vc =
  22991. \f2\b \cf8 self
  22992. \f0\b0 \cf4 .groupSendMsgArray.lastObject;\
  22993. [
  22994. \f2\b \cf8 self
  22995. \f0\b0 \cf4 onAfterAddMember:vc];\
  22996. \f2\b \cf8 break
  22997. \f0\b0 \cf4 ;\
  22998. \}\
  22999. \f2\b \cf8 case
  23000. \f0\b0 \cf4 groupsend_msgType_collect:\{\
  23001. \f2\b \cf8 if
  23002. \f0\b0 \cf4 ([
  23003. \f2\b \cf8 self
  23004. \f0\b0 \cf4 .groupSendMsgArray.lastObject isKindOfClass:[WeiboData
  23005. \f2\b \cf8 class
  23006. \f0\b0 \cf4 ]]) \{\
  23007. WeiboData *data =
  23008. \f2\b \cf8 self
  23009. \f0\b0 \cf4 .groupSendMsgArray.lastObject;\
  23010. WeiboViewControlle *vc =
  23011. \f2\b \cf8 nil
  23012. \f0\b0 \cf4 ;\
  23013. [
  23014. \f2\b \cf8 self
  23015. \f0\b0 \cf4 weiboVC:vc didSelectWithData:data];\
  23016. \}
  23017. \f2\b \cf8 else
  23018. \f0\b0 \cf4 \{\
  23019. [
  23020. \f2\b \cf8 self
  23021. \f0\b0 \cf4 collectionMsgSendAll:
  23022. \f2\b \cf8 self
  23023. \f0\b0 \cf4 .groupSendMsgArray];\
  23024. \}\
  23025. \f2\b \cf8 break
  23026. \f0\b0 \cf4 ;\
  23027. \}\
  23028. \f2\b \cf8 case
  23029. \f0\b0 \cf4 groupsend_msgType_location:\{\
  23030. [
  23031. \f2\b \cf8 self
  23032. \f0\b0 \cf4 onSelLocation:
  23033. \f2\b \cf8 self
  23034. \f0\b0 \cf4 .mapData];\
  23035. \f2\b \cf8 break
  23036. \f0\b0 \cf4 ;\
  23037. \}\
  23038. \f2\b \cf8 default
  23039. \f0\b0 \cf4 :\
  23040. \f2\b \cf8 break
  23041. \f0\b0 \cf4 ;\
  23042. \}\
  23043. \}\
  23044. \}\
  23045. \
  23046. - (
  23047. \f2\b \cf8 void
  23048. \f0\b0 \cf4 )\cf11 keepOnUplpadGroupSend\cf4 \{\
  23049. _sendedNum++;\
  23050. \f2\b \cf8 if
  23051. \f0\b0 \cf4 (_sendedNum >
  23052. \f2\b \cf8 self
  23053. \f0\b0 \cf4 .groupSendAllNum) \{\
  23054. \f2\b \cf8 return
  23055. \f0\b0 \cf4 ;\
  23056. \}\
  23057. [
  23058. \f2\b \cf8 self
  23059. \f0\b0 \cf4 .waitGroupSendLable setText:[NSString stringWithFormat:\cf6 @"%ld/%ld"\cf4 ,(
  23060. \f2\b \cf8 long
  23061. \f0\b0 \cf4 )_sendedNum,(
  23062. \f2\b \cf8 long
  23063. \f0\b0 \cf4 )
  23064. \f2\b \cf8 self
  23065. \f0\b0 \cf4 .groupSendAllNum]];\
  23066. \f2\b \cf8 if
  23067. \f0\b0 \cf4 (_sendedNum %
  23068. \f2\b \cf8 self
  23069. \f0\b0 \cf4 .groupUploadObjArray.count == \cf7 0\cf4 ) \{\
  23070. \f2\b \cf8 if
  23071. \f0\b0 \cf4 ((_sendedNum /
  23072. \f2\b \cf8 self
  23073. \f0\b0 \cf4 .groupUploadObjArray.count) % _onceSendNum == \cf7 0\cf4 ) \{\
  23074. \f2\b \cf8 if
  23075. \f0\b0 \cf4 (_groupSendType == groupsend_msgType_image) \{\
  23076. [
  23077. \f2\b \cf8 self
  23078. \f0\b0 \cf4 sendPhotos:
  23079. \f2\b \cf8 self
  23080. \f0\b0 \cf4 .groupUploadObjArray withOriginal:_isOriginal];\
  23081. \}
  23082. \f2\b \cf8 else
  23083. \f0\b0 \cf4
  23084. \f2\b \cf8 if
  23085. \f0\b0 \cf4 (_groupSendType == groupsend_msgType_video)\{\
  23086. [
  23087. \f2\b \cf8 self
  23088. \f0\b0 \cf4 sendMedias:
  23089. \f2\b \cf8 self
  23090. \f0\b0 \cf4 .groupUploadObjArray isSave:_isOriginal];\
  23091. \}
  23092. \f2\b \cf8 else
  23093. \f0\b0 \cf4
  23094. \f2\b \cf8 if
  23095. \f0\b0 \cf4 (_groupSendType == groupsend_msgType_audio)\{\
  23096. [
  23097. \f2\b \cf8 self
  23098. \f0\b0 \cf4 sendVoices:
  23099. \f2\b \cf8 self
  23100. \f0\b0 \cf4 .groupUploadObjArray];\
  23101. \}
  23102. \f2\b \cf8 else
  23103. \f0\b0 \cf4
  23104. \f2\b \cf8 if
  23105. \f0\b0 \cf4 (_groupSendType == groupsend_msgType_file)\{\
  23106. [
  23107. \f2\b \cf8 self
  23108. \f0\b0 \cf4 sendFiles:
  23109. \f2\b \cf8 self
  23110. \f0\b0 \cf4 .groupUploadObjArray];\
  23111. \}
  23112. \f2\b \cf8 else
  23113. \f0\b0 \cf4
  23114. \f2\b \cf8 if
  23115. \f0\b0 \cf4 (_groupSendType == groupsend_msgType_imagesAndVideos)\{\
  23116. [
  23117. \f2\b \cf8 self
  23118. \f0\b0 \cf4 sendImagesAndVideos:
  23119. \f2\b \cf8 self
  23120. \f0\b0 \cf4 .imgsAndVideosDic];\
  23121. \}\
  23122. \}\
  23123. \}\
  23124. \}\
  23125. \cf2 //\cf4 \
  23126. \cf2 //\cf4 \
  23127. \cf2 //\cf4 \
  23128. \f2\b \cf8 @end
  23129. \f0\b0 \cf4 \
  23130. }