123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493 |
- {\rtf1\ansi\ansicpg936\cocoartf2513
- \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;\f1\fnil\fcharset134 PingFangSC-Regular;\f2\fnil\fcharset0 Menlo-Bold;
- \f3\fnil\fcharset0 HelveticaNeue;\f4\fnil\fcharset134 PingFangSC-Semibold;\f5\fnil\fcharset0 AppleColorEmoji;
- }
- {\colortbl;\red255\green255\blue255;\red93\green108\blue121;\red255\green255\blue255;\red0\green0\blue0;
- \red100\green56\blue32;\red196\green26\blue22;\red28\green0\blue207;\red155\green35\blue147;\red28\green70\blue74;
- \red57\green0\blue160;\red15\green104\blue160;\red93\green108\blue121;\red11\green79\blue121;\red108\green54\blue169;
- \red50\green109\blue116;\red74\green85\blue96;\red14\green14\blue255;}
- {\*\expandedcolortbl;;\csgenericrgb\c36526\c42188\c47515;\csgenericrgb\c100000\c100000\c100000;\csgenericrgb\c0\c0\c0\c85000;
- \csgenericrgb\c39147\c22031\c12446;\csgenericrgb\c77000\c10200\c8600;\csgenericrgb\c11000\c0\c81000;\csgenericrgb\c60759\c13753\c57628;\csgenericrgb\c10981\c27276\c28869;
- \csgenericrgb\c22454\c0\c62803;\csgenericrgb\c5882\c40784\c62745;\csgenericrgb\c36526\c42188\c47515\c35000;\csgenericrgb\c4314\c30980\c47451;\csgenericrgb\c42190\c21278\c66379;
- \csgenericrgb\c19418\c42935\c45455;\csgenericrgb\c29020\c33333\c37647;\csgenericrgb\c5500\c5500\c100000;}
- \margl1440\margr1440\vieww9000\viewh8400\viewkind0
- \deftab593
- \pard\tx593\pardeftab593\pardirnatural\partightenfactor0
- \f0\fs24 \cf2 \cb3 //\cf4 \
- \cf2 // JXChatViewController.m\cf4 \
- \cf2 //\cf4 \
- \cf2 // Created by Reese on 13-8-11.\cf4 \
- \cf2 // Copyright (c) 2013
- \f1 \'c4\'ea
- \f0 Reese. All rights reserved.\cf4 \
- \cf2 //
- \f1 \'a3\'bf
- \f0 1111\cf4 \
- \
- \cf5 #import \cf6 "JXChatViewController.h"\cf4 \
- \cf5 #import \cf6 "CYWebAddPointVC.h"\cf4 \
- \cf5 #import \cf6 "ChatCacheFileUtil.h"\cf4 \
- \cf5 #import \cf6 "VoiceConverter.h"\cf4 \
- \cf5 #import \cf6 "Photo.h"\cf4 \
- \cf5 #import \cf6 "NSData+XMPP.h"\cf4 \
- \cf5 #import \cf6 "AppDelegate.h"\cf4 \
- \cf5 #import \cf6 "JXEmoji.h"\cf4 \
- \cf5 #import \cf6 "FaceViewController.h"\cf4 \
- \cf5 #import \cf6 "gifViewController.h"\cf4 \
- \cf5 #import \cf6 "emojiViewController.h"\cf4 \
- \cf5 #import \cf6 "SCGIFImageView.h"\cf4 \
- \cf2 //#import "JXImageView.h"\cf4 \
- \cf5 #import \cf6 "JXSelectImageView.h"\cf4 \
- \cf5 #import \cf6 "emojiViewController.h"\cf4 \
- \cf5 #import \cf6 "JXTableView.h"\cf4 \
- \cf5 #import \cf6 "LXActionSheet.h"\cf4 \
- \cf5 #import \cf6 "JXVolumeView.h"\cf4 \
- \cf5 #import \cf6 "myMediaVC.h"\cf4 \
- \cf5 #import \cf6 "JXMediaObject.h"\cf4 \
- \cf5 #import \cf6 "FMDatabase.h"\cf4 \
- \cf5 #import \cf6 "JXMyTools.h"\cf4 \
- \cf5 #if TAR_IM\cf4 \
- \cf5 #ifdef Meeting_Version\cf4 \
- \cf5 #import \cf6 "JXMeetingObject.h"\cf4 \
- \cf5 #import \cf6 "AskCallViewController.h"\cf4 \
- \cf5 #import \cf6 "JXAVCallViewController.h"\cf4 \
- \cf5 #endif\cf4 \
- \cf5 #endif\cf4 \
- \cf5 #ifdef Live_Version\cf4 \
- \cf5 #import \cf6 "JXLiveJidManager.h"\cf4 \
- \cf5 #endif\cf4 \
- \cf5 #import \cf6 "JXUserInfoVC.h"\cf4 \
- \cf5 #import \cf6 "JXRoomMemberVC.h"\cf4 \
- \cf5 #import \cf6 "JXRoomObject.h"\cf4 \
- \cf5 #import \cf6 "JXRoomRemind.h"\cf4 \
- \cf5 #import \cf6 "JXSelFriendVC.h"\cf4 \
- \cf5 #import \cf6 "JXMyFile.h"\cf4 \
- \cf5 #import \cf6 "JXShareFileObject.h"\cf4 \
- \cf5 #import \cf6 "JXFileDetailViewController.h"\cf4 \
- \
- \cf5 #import \cf6 "JXMapData.h"\cf4 \
- \cf5 #import \cf6 "JXSendRedPacketViewController.h"\cf4 \
- \
- \cf5 #import \cf6 "JXredPacketDetailVC.h"\cf4 \
- \cf5 #import \cf6 "JXOpenRedPacketVC.h"\cf4 \
- \cf2 //
- \f1 \'cc\'ed\'bc\'d3
- \f0 VC
- \f1 \'d7\'aa\'b3\'a1\'b6\'af\'bb\'ad
- \f0 \cf4 \
- \cf5 #import \cf6 "DMScaleTransition.h"\cf4 \
- \cf2 //
- \f1 \'b8\'f7\'d6\'d6
- \f0 Cell\cf4 \
- \cf5 #import \cf6 "JXBaseChatCell.h"\cf4 \
- \cf5 #import \cf6 "JXMessageCell.h"\cf4 \
- \cf5 #import \cf6 "JXImageCell.h"\cf4 \
- \cf5 #import \cf6 "JXFileCell.h"\cf4 \
- \cf5 #import \cf6 "JXVideoCell.h"\cf4 \
- \cf5 #import \cf6 "JXAudioCell.h"\cf4 \
- \cf5 #import \cf6 "JXLocationCell.h"\cf4 \
- \cf5 #import \cf6 "JXCardCell.h"\cf4 \
- \cf5 #import \cf6 "JXRedPacketCell.h"\cf4 \
- \cf5 #import \cf6 "JXRemindCell.h"\cf4 \
- \cf5 #import \cf6 "JXGifCell.h"\cf4 \
- \cf5 #import \cf6 "JXSystemImage1Cell.h"\cf4 \
- \cf5 #import \cf6 "JXSystemImage2Cell.h"\cf4 \
- \cf5 #import \cf6 "JXAVCallCell.h"\cf4 \
- \cf5 #import \cf6 "JXLinkCell.h"\cf4 \
- \cf5 #import \cf6 "JXShakeCell.h"\cf4 \
- \cf5 #import \cf6 "JXNewShakeCell.h"\cf4 \
- \cf5 #import \cf6 "JXMergeRelayCell.h"\cf4 \
- \cf5 #import \cf6 "JXShareCell.h"\cf4 \
- \cf5 #import \cf6 "JXTransferCell.h"\cf4 \
- \cf5 #import \cf6 "JXReplyCell.h"\cf4 \
- \
- \cf5 #import \cf6 "EmojiTextAttachment.h"\cf4 \
- \cf5 #import \cf6 "NSAttributedString+EmojiExtension.h"\cf4 \
- \
- \cf5 #import \cf6 "ImageBrowserViewController.h"\cf4 \
- \cf5 #import \cf6 "JXRelayVC.h"\cf4 \
- \cf5 #import \cf6 "webpageVC.h"\cf4 \
- \cf5 #import \cf6 "JX_DownListView.h"\cf4 \
- \cf5 #import \cf6 "JXReadListVC.h"\cf4 \
- \cf5 #import \cf6 <AssetsLibrary/AssetsLibrary.h>\cf4 \
- \cf5 #import \cf6 "UIImageView+WebCache.h"\cf4 \
- \cf5 #import \cf6 "JXCameraVC.h"\cf4 \
- \cf5 #import \cf6 "JXChatSettingVC.h"\cf4 \
- \cf5 #import \cf6 "JXVerifyDetailVC.h"\cf4 \
- \cf5 #import \cf6 "JXDevice.h"\cf4 \
- \cf5 #import \cf6 "JXChatLogVC.h"\cf4 \
- \cf5 #import \cf6 "JXSelectFriendsVC.h"\cf4 \
- \cf5 #import \cf6 "JXMsgViewController.h"\cf4 \
- \cf5 #import \cf6 "WeiboViewControlle.h"\cf4 \
- \cf5 #import \cf6 "ObjUrlData.h"\cf4 \
- \cf5 #import \cf6 "JXSynTask.h"\cf4 \
- \cf5 #import \cf6 "JXGoogleMapVC.h"\cf4 \
- \cf5 #import \cf6 "RITLPhotosViewController.h"\cf4 \
- \cf5 #import \cf6 "RITLPhotosDataManager.h"\cf4 \
- \cf5 #import \cf6 "JXActionSheetVC.h"\cf4 \
- \cf5 #import \cf6 "JXInputVC.h"\cf4 \
- \cf5 #import \cf6 "JXRoomPool.h"\cf4 \
- \cf5 #import \cf6 "KKImageEditorViewController.h"\cf4 \
- \cf5 #import \cf6 "JXTransferViewController.h"\cf4 \
- \cf5 #import \cf6 "JXTransferDeatilVC.h"\cf4 \
- \cf5 #import \cf6 "JXSelectAddressBookVC.h"\cf4 \
- \cf5 #import \cf6 "JXInputMoneyVC.h"\cf4 \
- \cf5 #import \cf6 "JXGroupHelperListVC.h"\cf4 \
- \cf5 #import \cf6 "JXGroupHeplerModel.h"\cf4 \
- \cf5 #import \cf6 "JXAutoReplyAideVC.h"\cf4 \
- \cf5 #import \cf6 "JXLabelObject.h"\cf4 \
- \cf5 #import \cf6 "JXEmojiCell.h"\cf4 \
- \cf5 #import \cf6 "JXFaceCustomCell.h"\cf4 \
- \cf5 #import \cf6 "CYGroupSendHelperViewController.h"\cf4 \
- \cf5 #import \cf6 "DYAdAlertView.h"\cf4 \
- \cf5 #import \cf6 "DYWKWebVC.h"\cf4 \
- \cf5 #import \cf6 "DYAdModel.h"\cf4 \
- \cf5 #import \cf6 "STAlertView.h"\cf4 \
- \cf5 #import \cf6 "XLsn0wInputBox.h"\cf4 \
- \cf5 #import \cf6 "JLGroupActivityModel.h"\cf4 \
- \cf5 #import \cf6 "DSHPopupContainer.h"\cf4 \
- \cf5 #import \cf6 "JLSelectView.h"\cf4 \
- \cf5 #import \cf6 "MISFloatingBall.h"\cf4 \
- \cf5 #import \cf6 "CYWebCustomerServiceVC.h"\cf4 \
- \cf5 #import \cf6 "JXUserDetialVc.h"\cf4 \
- \cf5 #import \cf6 "JXtopShowVIew.h"\cf4 \
- \cf5 #import \cf6 "JxChatGetNoticePersonVc.h"\cf4 \
- \
- \
- \cf5 #import \cf6 "JXMyBaseInFovc.h"\cf4 \
- \cf5 #import \cf6 "JXSelecAttionPerson.h"\cf4 \
- \cf5 #import \cf6 "JxnoticeScrollView.h"\cf4 \
- \cf5 #import \cf6 "JXSelfUserInfoVC.h"\cf4 \
- \cf5 #import \cf6 "JXCsHomeVc.h"\cf4 \
- \cf5 #import \cf6 "JXSiDaiWebView.h"\cf4 \
- \cf5 #import \cf6 "JXBigReelVc.h"\cf4 \
- \cf5 #import \cf6 "JXLuckRescueFundVc.h"\cf4 \
- \cf5 #import \cf6 "JXApplyViewController.h"\cf4 \
- \cf5 #import \cf6 "JXGoldMangVc.h"\cf4 \
- \
- \cf5 #define faceHeight (THE_DEVICE_HAVE_HEAD ? \cf7 253\cf5 : \cf7 218\cf5 )\cf4 \
- \cf5 #define PAGECOUNT \cf7 50\cf4 \
- \cf5 #define NOTICE_WIDTH \cf7 120\cf5 \cf2 //
- \f1 \'b5\'f7\'d5\'fb\'c1\'bd\'cc\'f5\'b9\'ab\'b8\'e6\'bc\'e4\'b5\'c4\'be\'e0\'c0\'eb
- \f0 \cf4 \
- \
- \cf5 #define UpdateAcceptCallMsg @\cf6 "UpdateAcceptCallMsg"\cf4 \
- \
- \
- \cf5 #define tableBarHHH \cf7 53\cf4 \
- \
- \cf5 #define keboardHHH \cf7 44\cf4 \
- \
- \
- \cf5 #define groupsend_msgType_text \cf7 1\cf4 \
- \cf5 #define groupsend_msgType_image \cf7 2\cf4 \
- \cf5 #define groupsend_msgType_video \cf7 3\cf4 \
- \cf5 #define groupsend_msgType_audio \cf7 4\cf4 \
- \cf5 #define groupsend_msgType_file \cf7 5\cf4 \
- \cf5 #define groupsend_msgType_shake \cf7 6\cf4 \
- \cf5 #define groupsend_msgType_addressbook \cf7 7\cf4 \
- \cf5 #define groupsend_msgType_card \cf7 8\cf4 \
- \cf5 #define groupsend_msgType_collect \cf7 9\cf4 \
- \cf5 #define groupsend_msgType_imagesAndVideos \cf7 10\cf4 \
- \cf5 #define groupsend_msgType_location \cf7 11\cf4 \
- \
- \f2\b \cf8 @interface
- \f0\b0 \cf4 \cf9 JXChatViewController\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 >\{\
- \
- \cf10 CGRect\cf4 _lastFrame;\
- \}\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIButton\cf4 *\cf11 selectButton\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf9 DSHPopupContainer\cf4 *\cf11 container\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 )\cf9 JLGroupActivityModel\cf4 *\cf11 activityModel\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 deltaY\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 deltaHeight\cf4 ;\
- \cf2 //@property (nonatomic, strong) DMAlphaTransition *alphaTransition;\cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf9 DMScaleTransition\cf4 *\cf11 scaleTransition\cf4 ;\
- \cf2 //@property (nonatomic, strong) DMSlideTransition *slideTransition;\cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSArray\cf4 *\cf11 allChatImageArr\cf4 ;\cf2 //
- \f1 \'cf\'fb\'cf\'a2\'bc\'c7\'c2\'bc\'c0\'ef\'cb\'f9\'d3\'d0\'cd\'bc\'c6\'ac
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isReadDelete\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 copy
- \f0\b0 \cf4 ) \cf10 NSMutableString\cf4 *\cf11 sendText\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSMutableString\cf4 *\cf11 names\cf4 ; \cf2 //
- \f1 \'c8\'ba\'b7\'a2\'d6\'fa\'ca\'d6\'b1\'ea\'c7\'a9\'c6\'b4\'bd\'d3\'d7\'d6\'b7\'fb\'b4\'ae
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSMutableString\cf4 *\cf11 names2\cf4 ; \cf2 //
- \f1 \'c8\'ba\'b7\'a2\'d6\'fa\'ca\'d6\'c8\'ba\'d7\'e9\'c6\'b4\'bd\'d3\'d7\'d6\'b7\'fb\'b4\'ae
- \f0 \cf4 \
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSTimer\cf4 *\cf11 timer\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 loginStatus\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSTimer\cf4 *\cf11 enteringTimer\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSTimer\cf4 *\cf11 noEnteringTimer\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isSendEntering\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isGetServerMsg\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 int
- \f0\b0 \cf4 \cf11 serverMsgPage\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 * \cf11 atMemberArray\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 copy
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 userNickName\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 firstGetUser\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 onlinestate\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 publicMenuBar\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSArray\cf4 *\cf11 menuList\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 selMenuIndex\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 withdrawIndex\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 recordArray\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 copy
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 recordName\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isRecording\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 recordStarNum\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf9 ATMHud\cf4 *\cf11 chatWait\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 int
- \f0\b0 \cf4 \cf11 sendIndex\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf9 JXLocationVC\cf4 *\cf11 locVC\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf9 JXGoogleMapVC\cf4 *\cf11 gooMap\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 int
- \f0\b0 \cf4 \cf11 isBeenBlack\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 int
- \f0\b0 \cf4 \cf11 friendStatus\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 copy
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 meetingNo\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isAudioMeeting\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isTalkMeeting\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 int
- \f0\b0 \cf4 \cf11 groupMessagesIndex\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf9 JXMessageObject\cf4 *\cf11 shakeMsg\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 screenShotView\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 screenShotImageView\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 backGroundImageView\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isSelectMore\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 selectMoreArr\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 selectMoreView\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 int
- \f0\b0 \cf4 \cf11 readDelNum\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isAdmin\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIButton\cf4 *\cf11 shareMore\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 talkTimeLabel\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIButton\cf4 *\cf11 jumpNewMsgBtn\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf9 WeiboData\cf4 *\cf11 collectionData\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 taskList\cf4 ; \cf2 //
- \f1 \'c8\'ce\'ce\'f1\'c1\'d0\'b1\'ed
- \f0 \cf4 \
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSArray\cf4 *\cf11 imgDataArr\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 int
- \f0\b0 \cf4 \cf11 indexNum\cf4 ; \cf2 //
- \f1 \'cf\'fb\'cf\'a2\'d6\'d8\'b7\'a2\'b4\'ab\'c0\'b4\'b5\'c4
- \f0 cell.tag\cf4 \
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSDictionary\cf4 *\cf11 dataDict\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isMapMsg\cf4 ; \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'b5\'c4\'ca\'c7\'b2\'bb\'ca\'c7\'b5\'d8\'cd\'bc\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf9 JXMapData\cf4 *\cf11 mapData\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 objToMsg\cf4 ;\cf2 //
- \f1 \'bb\'d8\'b8\'b4\'cb\'ad\'b5\'c4\'cf\'fb\'cf\'a2\'a3\'ac\'b4\'e6
- \f0 json
- \f1 \'ca\'fd\'be\'dd
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 hisReplyMsg\cf4 ; \cf2 //
- \f1 \'bb\'d8\'b8\'b4\'c0\'fa\'ca\'b7\'cb\'ae\'d3\'a1
- \f0 \cf4 \
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 copy
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 meetUrl\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 shareView\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 noticeView\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIScrollView\cf4 *\cf11 noticeScrollView\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 noticeImgV\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 noticeLabel\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 showNoticeView\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 leftLabel\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 rightLabel\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSTimer\cf4 *\cf11 noticeTimer\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 noticeStr\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 leftW\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 rightW\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 noticeStrW\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 int
- \f0\b0 \cf4 \cf11 noticeHeight\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIButton\cf4 *\cf11 textViewBtn\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 noticeView2\cf4 ;\
- \cf12 /**
- \f1 \cf2 \'cd\'b7\'b2\'bf\'d7\'dc\'b8\'f6\'cd\'b7\'b2\'bf
- \f3 */
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 topSaiView\cf4 ;\
- \cf12 /**
- \f1 \cf2 \'b4\'e6\'b7\'c5\'f7\'bb\'d7\'d3\'d3\'eb
- \f3
- \f1 \'b7\'c9\'b3\'b5
- \f3 */
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIScrollView\cf4 *\cf11 shaiziScrollView\cf4 ;\
- \
- \cf12 /**
- \f1 \cf2 \'c8\'fb\'d7\'d3\'d3\'eb\'c8\'fc\'b3\'b5\'b5\'c4
- \f3
- \f1 \'b4\'e6\'b7\'c5\'b5\'c4
- \f3 VIew*/
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 shaiziIMGView\cf4 ;\
- \cf12 /**
- \f1 \cf2 \'cc\'d8\'b1\'f0\'b9\'d8\'d0\'c4
- \f3 */
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 tebieView\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 noticeImgV2\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 noticeLabel2\cf4 ;\
- \
- \cf12 /**
- \f1 \cf2 \'f7\'bb\'d7\'d3\'cd\'bc\'c6\'ac
- \f3 */
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 shaiziIMG\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 totalValueL\cf4 ;\
- \
- \cf12 /**
- \f1 \cf2 \'bc\'c7\'c2\'bc\'c8\'fc\'b3\'b5\'b5\'c4
- \f3 */
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 copy
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 indexCarSubType\cf4 ;\cf2 //3\cf4 \
- \cf12 /**
- \f1 \cf2 \'bc\'c7\'c2\'bc\'c8\'fb\'d7\'d3\'b5\'c4
- \f3 */
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 copy
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 indexSubType\cf4 ;\
- \cf12 /**
- \f1 \cf2 \'b1\'ea\'bb\'c6
- \f3 */
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 copy
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 indexYellowSubType\cf4 ; \cf2 //4\cf4 \
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 weak
- \f0\b0 \cf4 ) \cf9 JXtopShowVIew\cf4 *\cf11 showTopView\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 showNoticeView2\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 leftLabel2\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 rightLabel2\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSTimer\cf4 *\cf11 noticeTimer2\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 noticeStr2\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 leftW2\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 rightW2\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 noticeStrW2\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 int
- \f0\b0 \cf4 \cf11 noticeHeight2\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 scrollBottom\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isGotoLast\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isSyncMsg\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isFirst\cf4 ; \cf2 //
- \f1 \'b5\'da\'d2\'bb\'b4\'ce\'b5\'f7\'d3\'c3
- \f0 GetRoom\cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isDisable\cf4 ; \cf2 //
- \f1 \'c8\'ba\'d7\'e9\'ca\'c7\'b7\'f1\'bd\'fb\'d3\'c3
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIImage\cf4 *\cf11 screenImage\cf4 ; \cf2 //
- \f1 \'bc\'c7\'c2\'bc\'d2\'bb\'cf\'c2\'c6\'c1\'c4\'bb\'bf\'ec\'d5\'d5
- \f0 \cf4 \
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSArray\cf4 *\cf11 helperArr\cf4 ;\cf2 //
- \f1 \'c8\'ba\'d6\'fa\'ca\'d6\'ca\'fd\'be\'dd
- \f0 \cf4 \
- \
- \cf2 //
- \f1 \'ba\'ec\'b0\'fc\'b5\'e3\'bb\'f7\'ba\'f3\'b5\'c4\'bd\'e7\'c3\'e6
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 redBaseView\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 openImgV\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 redBackV\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSDictionary\cf4 *\cf11 redPacketDict\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isDidRedPacketRemind\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 tintLab\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 seeLab\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 CGFloat\cf4 \cf11 lastY\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isRefresh\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIImageView\cf4 *\cf11 audioIcon\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isShowAT\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isSendRedPacket\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isRefreshing\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIView\cf4 *\cf11 waitGroupSendView\cf4 ; \cf2 //
- \f1 \'c8\'ba\'b7\'a2\'cc\'e1\'ca\'be\'b4\'b0\'bf\'da
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UILabel\cf4 *\cf11 waitGroupSendLable\cf4 ; \cf2 //
- \f1 \'c8\'ba\'b7\'a2\'ca\'b5\'ca\'b1\'b8\'fc\'d0\'c2\'d2\'d1\'b7\'a2\'cb\'cd\'ca\'fd\'c1\'bf
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 sendedNum\cf4 ; \cf2 //
- \f1 \'c8\'ba\'b7\'a2\'d2\'d1\'b7\'a2\'cb\'cd\'ca\'fd\'c1\'bf
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 groupUploadObjArray\cf4 ; \cf2 //
- \f1 \'c8\'ba\'b7\'a2\'d0\'e8\'d2\'aa\'c9\'cf\'b4\'ab\'b5\'c4\'ca\'fd\'be\'dd
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 onceSendNum\cf4 ; \cf2 //
- \f1 \'c8\'ba\'b7\'a2\'c3\'bf\'d7\'e9\'b7\'a2\'cb\'cd\'b5\'c4\'cf\'fb\'cf\'a2\'ca\'fd\'c1\'bf
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isOriginal\cf4 ; \cf2 //
- \f1 \'ca\'c7\'b7\'f1\'b1\'a3\'b4\'e6\'b1\'be\'b5\'d8
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 groupSendType\cf4 ; \cf2 //
- \f1 \'c8\'ba\'b7\'a2\'cf\'fb\'cf\'a2\'c0\'e0\'d0\'cd
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 groupSendMsgArray\cf4 ; \cf2 //
- \f1 \'c8\'ba\'b7\'a2\'b5\'c4\'c4\'da\'c8\'dd
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 ) \cf10 NSInteger\cf4 \cf11 groupSendAllNum\cf4 ; \cf2 //
- \f1 \'c8\'ba\'b7\'a2\'cf\'fb\'cf\'a2\'d7\'dc\'ca\'fd
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 \cf11 isGroupSendCancel\cf4 ; \cf2 //
- \f1 \'c8\'a1\'cf\'fb\'c8\'ba\'b7\'a2
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSDictionary\cf4 *\cf11 imgsAndVideosDic\cf4 ;\cf2 //
- \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
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 imgArr\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIButton\cf4 *\cf11 showBtn\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf9 STAlertView\cf4 *\cf11 alert\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf9 MISFloatingBall\cf4 *\cf11 floating\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 int
- \f0\b0 \cf4 \cf11 keyboardHeight\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 assign
- \f0\b0 \cf4 )
- \f2\b \cf8 int
- \f0\b0 \cf4 \cf11 keyboardHeightNav\cf4 ;\
- \cf12 /**
- \f1 \cf2 \'bb\'f1\'c8\'a1\'c8\'ba\'d6\'d0\'cb\'f9\'d3\'d0\'b5\'c4\'c8\'cb\'d4\'b1
- \f3 */
- \f0 \cf4 \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 dataArrGetGroundPersonArr\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 copy
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 jidStr\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 NSMutableArray\cf4 *\cf11 tempArrMM\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIScrollView\cf4 *\cf11 noticeViewScrollView\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 strong
- \f0\b0 \cf4 ) \cf10 UIButton\cf4 *\cf11 attioPersonBtn\cf4 ;\
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 weak
- \f0\b0 \cf4 ) \cf9 DYAdAlertView\cf4 *\cf11 showLongViewc\cf4 ;\
- \
- \f2\b \cf8 @property
- \f0\b0 \cf4 (
- \f2\b \cf8 nonatomic
- \f0\b0 \cf4 ,
- \f2\b \cf8 copy
- \f0\b0 \cf4 ) \cf10 NSString\cf4 *\cf11 strURLGoback\cf4 ;\
- \f2\b \cf8 @end
- \f0\b0 \cf4 \
- \
- \f2\b \cf8 @implementation
- \f0\b0 \cf4 \cf13 JXChatViewController\cf4 \
- \f2\b \cf8 @synthesize
- \f0\b0 \cf4 \cf11 chatPerson\cf4 ,\cf11 roomId\cf4 ,\cf11 chatRoom\cf4 ;\
- \
- - (
- \f2\b \cf8 id
- \f0\b0 \cf4 )\cf11 init\cf4 \
- \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 = [
- \f2\b \cf8 super
- \f0\b0 \cf4 \cf14 init\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!\cf15 _room\cf4 ) \{\
- \cf15 _room\cf4 = [[\cf9 roomData\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
- \}\
- \cf15 _dataArrGetGroundPersonArr\cf4 =[\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
- \cf15 _lotterDict\cf4 =[\cf10 NSDictionary\cf4 \cf14 dictionary\cf4 ];\
- \cf15 _userNickName\cf4 = \cf5 g_myself\cf4 .\cf15 userNickname\cf4 ;\
- \cf15 _selectIndexAaaa\cf4 =\cf7 100000000\cf4 ;\
- \cf15 _tempArrMM\cf4 =[\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightHeader\cf4 = \cf7 0\cf4 ;\cf2 // JX_SCREEN_TOP;\cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightFooter\cf4 = \cf7 0\cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 hidden\cf4 =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 courseId\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
- \cf2 //self.heightFooter = THE_DEVICE_HAVE_HEAD ? JX_SCREEN_BOTTOM : 56;\cf4 \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 isHiddenFooter\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightFooter\cf4 = \cf7 0\cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([\cf15 _lastMsg\cf4 .\cf15 fromUserId\cf4 \cf14 isEqualToString\cf4 :\cf6 @"10000"\cf4 ]) \{\
- \cf2 //self.heightFooter=0;\cf4 \
- \}\
- \cf15 _oneAtttenPersonArr\cf4 =[\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 isGotoBack\cf4 =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 isGotoLast\cf4 =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \cf15 _orderRedPacketArray\cf4 = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
- \cf15 _atMemberArray\cf4 = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
- \cf15 _selectMoreArr\cf4 = [\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 roomJid\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
- \cf15 _taskList\cf4 = [\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
- \cf10 NSMutableArray\cf4 *list = [[\cf9 JXSynTask\cf4 \cf15 sharedInstance\cf4 ] \cf15 getTaskWithUserId\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (\cf10 NSInteger\cf4 i = \cf7 0\cf4 ; i < list.\cf14 count\cf4 ; i ++) \{\
- \cf9 JXSynTask\cf4 *task = list[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (task.\cf15 endTime\cf4 ) \{\
- [\cf15 _taskList\cf4 \cf14 addObject\cf4 :task];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [task
- \f2\b \cf8 delete
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 newMsgCount\cf4 > \cf7 100\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 newMsgCount\cf4 = \cf7 100\cf4 ;\
- \}\
- \cf2 //self.view.frame = CGRectMake(0, 0, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-JX_SCREEN_TOP-self.heightFooter);\cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 groupMessagesIndex\cf4 = \cf7 0\cf4 ;\
- \cf15 _disableSay\cf4 = \cf7 0\cf4 ;\
- \cf15 _serverMsgPage\cf4 = \cf7 0\cf4 ;\
- \cf15 _isRecording\cf4 =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \cf15 _recordStarNum\cf4 = \cf7 0\cf4 ;\
- \
- \cf15 _pool\cf4 = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
- \cf15 _array\cf4 = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
- \
- \cf15 _isReadDelete\cf4 = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 isOpenReadDel\cf4 \cf14 boolValue\cf4 ];\
- \
- \cf15 _recordArray\cf4 = [\cf10 NSMutableArray\cf4 \cf14 array\cf4 ];\
- \cf15 _chatWait\cf4 = [[\cf9 ATMHud\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 current_chat_userId\cf4 )\
- [\cf5 g_xmpp\cf4 .\cf15 chatingUserIds\cf4 \cf14 addObject\cf4 :\cf15 current_chat_userId\cf4 ];\
- \
- \}\
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (roomGroupActivityRefresh:) \cf14 name\cf4 :\cf5 kRoomGroupActivityRefresh\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'b7\'c0\'b3\'b7\'bb\'d8\'d0\'de\'b8\'c4
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (RoomRemind_RoomIsRedMoneyGroupActivityRefresh:) \cf14 name\cf4 :\cf5 kRoomRemind_RoomIsRedMoneyGroupActivityRefresh\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'c7\'eb\'ba\'ec\'b0\'fc\'bd\'d3\'bf\'da
- \f0 \cf4 \
- \
- \
- \
- \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (roomIsisAttritionRecall:) \cf14 name\cf4 :\cf5 kroomIsAttritionRecallRefresh\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'b7\'c0\'b3\'b7\'bb\'d8\'d0\'de\'b8\'c4
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (groupLevelNameRefresh:) \cf14 name\cf4 :\cf5 kgroupLevelNameRefresh\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'c8\'ba\'cd\'b7\'cf\'ce\'d0\'de\'b8\'c4
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (roomIsOpenIntegral:) \cf14 name\cf4 :\cf5 kisOpenIntegralRefresh\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'c8\'ba\'cd\'b7\'cf\'ce\'bf\'aa\'b9\'d8\'d0\'de\'b8\'c4
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (audioPlayEnd:) \cf14 name\cf4 :\cf5 kCellVoiceStartNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'bf\'aa\'ca\'bc\'c2\'bc\'d2\'f4
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (cardCellClick:) \cf14 name\cf4 :\cf5 kCellShowCardNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (locationCellClick:) \cf14 name\cf4 :\cf5 kCellLocationNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidImage:) \cf14 name\cf4 :\cf5 kCellImageNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'d5\'d5\'c6\'ac
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidRedPacket:) \cf14 name\cf4 :\cf5 kcellRedPacketDidTouchNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'c6\'d5\'cd\'a8\'ba\'ec\'b0\'fc\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidTransfer:) \cf14 name\cf4 :\cf5 kcellTransferDidTouchNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'d7\'aa\'d5\'cb\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- \cf2 //[g_notify addObserver:self selector:@selector(onDidHeadImage:) name:kCellHeadImageNotification object:nil];\cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (longGesHeadImageNotification:) \cf14 name\cf4 :\cf5 kCellLongGesHeadImageNotification\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (resendMsgNotif:) \cf14 name\cf4 :\cf5 kCellResendMsgNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'d6\'d8\'b7\'a2\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (deleteMsgNotif:) \cf14 name\cf4 :\cf5 kCellDeleteMsgNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'c9\'be\'b3\'fd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (showReadPersons:) \cf14 name\cf4 :\cf5 kCellShowReadPersonsNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'b2\'e9\'bf\'b4\'d2\'d1\'b6\'c1\'c1\'d0\'b1\'ed
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (hideKeyboard:) \cf14 name\cf4 :\cf5 kHiddenKeyboardNotification\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidSystemImage1:) \cf14 name\cf4 :\cf5 kCellSystemImage1DidTouchNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'b5\'a5\'cc\'f5\'cd\'bc\'ce\'c4\'cf\'fb\'cf\'a2\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidSystemImage2:) \cf14 name\cf4 :\cf5 kCellSystemImage2DidTouchNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'b6\'e0\'cc\'f5\'cd\'bc\'ce\'c4\'cf\'fb\'cf\'a2\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidAVCall:) \cf14 name\cf4 :\cf5 kCellSystemAVCallNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'d2\'f4\'ca\'d3\'c6\'b5\'cd\'a8\'bb\'b0
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidFile:) \cf14 name\cf4 :\cf5 kCellSystemFileNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'ce\'c4\'bc\'fe\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidLink:) \cf14 name\cf4 :\cf5 kCellSystemLinkNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'c1\'b4\'bd\'d3\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidShake:) \cf14 name\cf4 :\cf5 kCellSystemShakeNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'b4\'c1\'d2\'bb\'b4\'c1\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidMergeRelay:) \cf14 name\cf4 :\cf5 kCellSystemMergeRelayNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'ba\'cf\'b2\'a2\'d7\'aa\'b7\'a2\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidShare:) \cf14 name\cf4 :\cf5 kCellShareNotification\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'b7\'d6\'cf\'ed
- \f0 cell
- \f1 \'b5\'e3\'bb\'f7
- \f0 \cf4 \
- \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidRemind:) \cf14 name\cf4 :\cf5 kCellRemindNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'bf\'d8\'d6\'c6\'cf\'fb\'cf\'a2\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidReply:) \cf14 name\cf4 :\cf5 kCellReplyNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'bb\'d8\'b8\'b4\'cf\'fb\'cf\'a2\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidMessageReadDel:) \cf14 name\cf4 :\cf5 kCellMessageReadDelNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'ce\'c4\'b1\'be\'cf\'fb\'cf\'a2\'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (openReadDelNotif:) \cf14 name\cf4 :\cf5 kOpenReadDelNotif\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ]; \cf2 //
- \f1 \'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9\'bf\'aa\'b9\'d8
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (refreshChatLogNotif:) \cf14 name\cf4 :\cf5 kRefreshChatLogNotif\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (reloadNotif:) \cf14 name\cf4 :\cf5 kChatVCReloadNotif\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onLoginChanged:) \cf14 name\cf4 :\cf5 kXmppLoginNotifaction\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'bc\'e0\'cc\'fd\'cf\'b5\'cd\'b3\'bd\'d8\'c6\'c1
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (userDidTakeScreenshot:) \cf14 name\cf4 :\cf14 UIApplicationUserDidTakeScreenshotNotification\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onGroupHelper) \cf14 name\cf4 :\cf5 kUpdateChatVCGroupHelperData\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'b8\'fc\'d0\'c2\'c8\'ba\'d6\'fa\'ca\'d6
- \f0 \cf4 \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (updateMsgSynTaskNotif:) \cf14 name\cf4 :\cf5 kUpdateMsgSynTask\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (chatVCMessageSync:) \cf14 name\cf4 :\cf5 kChatVCMessageSync\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf14 NSLog\cf4 (\cf6 @"timetime6 -- %f"\cf4 , [[\cf10 NSDate\cf4 \cf14 date\cf4 ] \cf14 timeIntervalSince1970\cf4 ]);\
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (updateTransferMsgFileSize:) \cf14 name\cf4 :\cf5 kUpdateTransferMsgFileSize\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (keepOnGroupSend:) \cf14 name\cf4 :\cf5 kKeepOnSendGroupSendMessage\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [\cf5 g_notify\cf4 \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (applicationWillEnterForeground) \cf14 name\cf4 :\cf5 kApplicationWillEnterForeground\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- \}\
- \cf12 /**
- \f1 \cf2 \'b8\'fc\'b6\'e0
- \f3 */
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 xxxClick\cf4 \{\
- \
- \cf9 JXRoomMemberVC\cf4 * vc = [\cf9 JXRoomMemberVC\cf4 \cf14 alloc\cf4 ];\
- \cf2 // vc.chatRoom = [[JXXMPP sharedInstance].roomPool joinRoom:roomdata.roomJid title:roomdata.name isNew:NO];\cf4 \
- \cf2 // vc.room = roomdata;\cf4 \
- vc.\cf15 roomId\cf4 = \cf15 roomId\cf4 ;\
- vc.\cf15 room\cf4 =
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 room\cf4 ;\
- vc.\cf15 delegate\cf4 =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- vc = [vc \cf14 init\cf4 ];\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- [\cf5 g_navigation\cf4 \cf15 pushViewController\cf4 :vc \cf15 animated\cf4 :
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}\
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 applicationWillEnterForeground\cf4 \{\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'b7\'fe\'ce\'f1\'c6\'f7\'ca\'b1\'bc\'e4
- \f0 \cf4 \
- \cf2 // [g_server getCurrentTimeToView:self];\cf4 \
- \cf2 // [g_server tigaseMucMsgsWithRoomId:<#(NSString *)#> StartTime:<#(long)#> EndTime:<#(long)#> PageIndex:<#(int)#> PageSize:<#(int)#> toView:<#(id)#>];\cf4 \
- \cf2 // [self messageSync];\cf4 \
- \}\
- \
- \
- \cf2 //
- \f1 \'c9\'e8\'d6\'c3\'b5\'a5\'c1\'c4
- \f0 title\cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 setChatTitle\cf4 :(\cf10 NSString\cf4 *)userName \{\
- \
- \cf10 NSString\cf4 *str =
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 onlinestate\cf4 ? \cf5 Localized\cf4 (\cf6 @"JX_OnLine"\cf4 ) : \cf5 Localized\cf4 (\cf6 @"JX_OffLine"\cf4 );\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([\cf5 g_config\cf4 .\cf15 isOpenOnlineStatus\cf4 \cf14 boolValue\cf4 ]) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 _tempChat\cf4 ==\cf7 11\cf4 ) \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 title\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@
- \f1 \'c1\'d9\'ca\'b1\'bb\'e1\'bb\'b0
- \f0 (%@) "\cf4 ,userName, str];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 _tempChat\cf4 ==\cf7 11\cf4 ) \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 title\cf4 =[\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%@(%@)"\cf4 ,userName, \cf6 @"
- \f1 \'c1\'d9\'ca\'b1\'bb\'e1\'bb\'b0
- \f0 "\cf4 ] ;\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 title\cf4 = userName;\
- \}\
- \}\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 setAudioIconFrame\cf4 ];\
- \}\
- \
- \cf2 //
- \f1 \'b8\'fc\'d0\'c2\'c0\'eb\'cf\'df\'cf\'fb\'cf\'a2\'c8\'ce\'ce\'f1
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 updateMsgSynTaskNotif\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
- \
- \cf10 NSString\cf4 *userId = notif.\cf14 object\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([userId \cf14 isEqualToString\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 userId\cf4 ]) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 roomJid\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
- \cf15 _taskList\cf4 = [[\cf9 JXSynTask\cf4 \cf15 sharedInstance\cf4 ] \cf15 getTaskWithUserId\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 roomJid\cf4 ];\
- \}\
- \}\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 -
- \f4 \'d3\'c3\'bb\'a7\'bd\'d8\'c6\'c1\'cd\'a8\'d6\'aa\'ca\'c2\'bc\'fe
- \f0\b0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 userDidTakeScreenshot\cf4 :(\cf10 NSNotification\cf4 *)notification \{\
- \cf2 //
- \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
- \f0 \cf4 \
- \cf10 NSArray\cf4 *allDelMsg = [[\cf9 JXMessageObject\cf4 \cf15 sharedInstance\cf4 ] \cf15 fetchDelMessageWithUserId\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 userId\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (allDelMsg.\cf14 count\cf4 > \cf7 0\cf4 ) \{\
- \cf9 JXMessageObject\cf4 *msg = [[\cf9 JXMessageObject\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
- msg.\cf15 type\cf4 = [\cf10 NSNumber\cf4 \cf14 numberWithInt\cf4 :\cf15 kWCMessageTypeDelMsgScreenshots\cf4 ];\
- msg.\cf15 timeSend\cf4 = [\cf10 NSDate\cf4 \cf14 date\cf4 ];\
- msg.\cf15 toUserId\cf4 =
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 userId\cf4 ;\
- msg.\cf15 fromUserId\cf4 = \cf5 MY_USER_ID\cf4 ;\
- msg.\cf15 content\cf4 = \cf5 Localized\cf4 (\cf6 @"JX_TheOtherTookAScreenshotOfTheConversation"\cf4 );\
- [msg \cf15 insert\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [\cf5 g_xmpp\cf4 \cf15 sendMessage\cf4 :msg \cf15 roomName\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onLoginChanged\cf4 :(\cf10 NSNotification\cf4 *)notifacation\{\
- \
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 ([\cf9 JXXMPP\cf4 \cf15 sharedInstance\cf4 ].\cf15 isLogined\cf4 )\{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf5 login_status_ing\cf4 :\{\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf5 login_status_no\cf4 :\{\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf5 login_status_yes\cf4 :\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 roomJid\cf4 .\cf14 length\cf4 > \cf7 0\cf4 && [
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 groupStatus\cf4 \cf14 integerValue\cf4 ] == \cf7 0\cf4 ) \{\
- [\cf5 g_xmpp\cf4 .\cf15 roomPool\cf4 .\cf15 pool\cf4 \cf14 removeObjectForKey\cf4 :\cf15 chatPerson\cf4 .\cf15 userId\cf4 ];\
- [\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 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 \cf15 isNew\cf4 :
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \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 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 \cf15 isNew\cf4 :
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 actionTitle\cf4 :(\cf9 JXLabel\cf4 *)sender \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 isRecording\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 chatCell\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 \cf15 stopRecordIndexNum\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )\cf15 _array\cf4 .\cf14 count\cf4 - \cf7 1\cf4 ];\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9\'cd\'a8\'d6\'aa
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 openReadDelNotif\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isOpen = [notif.\cf14 object\cf4 \cf14 boolValue\cf4 ];\
- \cf15 _isReadDelete\cf4 = isOpen;\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 ----
- \f4 \'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9\'bf\'aa\'b9\'d8
- \f0\b0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 switchValueChange\cf4 :(\cf10 UIButton\cf4 *)but\{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (but.\cf14 tag\cf4 == \cf7 2000\cf4 ) \{\
- but.\cf14 tag\cf4 = \cf7 1000\cf4 ;\
- but.\cf14 selected\cf4 = !but.\cf14 selected\cf4 ;\
- \cf15 _isReadDelete\cf4 = !\cf15 _isReadDelete\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 _isReadDelete\cf4 ) \{\
- but.\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 lightGrayColor\cf4 ];\
- [\cf5 g_App\cf4 \cf15 showAlert\cf4 :\cf5 Localized\cf4 (\cf6 @"JX_ReadDeleteTip"\cf4 )];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- but.\cf14 backgroundColor\cf4 = [\cf10 UIColor\cf4 \cf14 clearColor\cf4 ];\
- \}\
- \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 (), ^\{\
- but.\cf14 tag\cf4 = \cf7 2000\cf4 ;\
- \});\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'d6\'d8\'d0\'c2\'bc\'d3\'d4\'d8
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 refreshChatLogNotif\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 isGetServerMsg\cf4 =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [\cf15 _array\cf4 \cf14 removeAllObjects\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 refresh\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 tableView\cf4 \cf14 reloadData\cf4 ];\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 reloadNotif\cf4 :(\cf10 NSNotification\cf4 *)notif \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 isGetServerMsg\cf4 =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [\cf15 _array\cf4 \cf14 removeAllObjects\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 tableView\cf4 \cf14 reloadData\cf4 ];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 cardCellClick\cf4 :(\cf10 NSNotification\cf4 *) notification\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 recording\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \cf9 JXMessageObject\cf4 *msg = notification.\cf14 object\cf4 ;\
- \cf10 NSString\cf4 * objectId = msg.\cf15 objectId\cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 firstGetUser\cf4 =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \cf2 // [g_server getUser:objectId toView:self];\cf4 \
- \cf9 JXUserInfoVC\cf4 * vc = [\cf9 JXUserInfoVC\cf4 \cf14 alloc\cf4 ];\
- vc.\cf15 userId\cf4 = objectId;\
- vc.\cf15 isJustShow\cf4 =
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 courseId\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ;\
- vc.\cf15 fromAddType\cf4 = \cf7 2\cf4 ;\
- vc = [vc \cf14 init\cf4 ];\
- [\cf5 g_navigation\cf4 \cf15 pushViewController\cf4 :vc \cf15 animated\cf4 :
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 locationCellClick\cf4 :(\cf10 NSNotification\cf4 *)notification\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 recording\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \cf9 JXMessageObject\cf4 *msg = notification.\cf14 object\cf4 ;\
-
- \f2\b \cf8 double
- \f0\b0 \cf4 location_x = [msg.\cf15 location_x\cf4 \cf14 doubleValue\cf4 ];\
-
- \f2\b \cf8 double
- \f0\b0 \cf4 location_y = [msg.\cf15 location_y\cf4 \cf14 doubleValue\cf4 ];\
- \
- \cf9 JXMapData\cf4 * mapData = [[\cf9 JXMapData\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
- mapData.\cf15 latitude\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%f"\cf4 ,location_x];\
- mapData.\cf15 longitude\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%f"\cf4 ,location_y];\
- \cf10 NSArray\cf4 * locations = \cf7 @[\cf4 mapData\cf7 ]\cf4 ;\
- mapData.\cf15 title\cf4 = msg.\cf15 objectId\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf5 g_config\cf4 .\cf15 isChina\cf4 ) \{\
- \cf9 JXLocationVC\cf4 * vc = [\cf9 JXLocationVC\cf4 \cf14 alloc\cf4 ];\
- vc.\cf15 placeNames\cf4 = msg.\cf15 objectId\cf4 ;\
- vc.\cf15 locations\cf4 = [\cf10 NSMutableArray\cf4 \cf14 arrayWithArray\cf4 :locations];\
- vc.\cf15 locationType\cf4 = \cf15 JXLocationTypeShowStaticLocation\cf4 ;\
- vc = [vc \cf14 init\cf4 ];\
- [\cf5 g_navigation\cf4 \cf15 pushViewController\cf4 :vc \cf15 animated\cf4 :
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf15 _gooMap\cf4 = [\cf9 JXGoogleMapVC\cf4 \cf14 alloc\cf4 ] ;\
- \cf15 _gooMap\cf4 .\cf15 locations\cf4 = [\cf10 NSMutableArray\cf4 \cf14 arrayWithArray\cf4 :locations];\
- \cf15 _gooMap\cf4 .\cf15 locationType\cf4 = \cf15 JXGooLocationTypeShowStaticLocation\cf4 ;\
- \cf15 _gooMap\cf4 .\cf15 placeNames\cf4 = msg.\cf15 objectId\cf4 ;\
- \cf15 _gooMap\cf4 = [\cf15 _gooMap\cf4 \cf14 init\cf4 ];\
- [\cf5 g_navigation\cf4 \cf15 pushViewController\cf4 :\cf15 _gooMap\cf4 \cf15 animated\cf4 :
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 viewDidAppear\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )animated\{\
- [
- \f2\b \cf8 super
- \f0\b0 \cf4 \cf14 viewDidAppear\cf4 :animated];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (\cf10 UIGestureRecognizer\cf4 *gesture
- \f2\b \cf8 in
- \f0\b0 \cf4
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 window\cf4 .\cf14 gestureRecognizers\cf4 ) \{\
- \cf14 NSLog\cf4 (\cf6 @"gesture = %@"\cf4 ,gesture);\
- gesture.\cf14 delaysTouchesBegan\cf4 =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \cf14 NSLog\cf4 (\cf6 @"delaysTouchesBegan = %@"\cf4 ,gesture.\cf14 delaysTouchesBegan\cf4 ?\cf6 @"YES"\cf4 :\cf6 @"NO"\cf4 );\
- \cf14 NSLog\cf4 (\cf6 @"delaysTouchesEnded = %@"\cf4 ,gesture.\cf14 delaysTouchesEnded\cf4 ?\cf6 @"YES"\cf4 :\cf6 @"NO"\cf4 );\
- \}\
- \
- \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 (), ^\{\
- \
- \cf2 // [_table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:_array.count-1 inSection:0] atScrollPosition:UITableViewScrollPositionNone animated:NO];\cf4 \
- \cf2 // [_table reloadData];\cf4 \
- \});\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 getEmojsData\cf4 \{\
- \cf2 // [g_server faceClollectListType:@"0" View:self];\cf4 \
- \cf2 // [g_server getFaceList:@"0" View:self];\cf4 \
- [\cf5 g_server\cf4 \cf15 getFaceListByGradeToView\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \cf2 // JXUserObject *user = [[JXUserObject sharedInstance] getUserById:];\cf4 \
- [\cf5 g_server\cf4 \cf15 roomMemberGetMemberListByPageWithRoomId\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 roomId\cf4 \cf15 joinTime\cf4 :\cf7 1555649346\cf4 \cf15 toView\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- [\cf5 g_server\cf4 \cf15 getbubbleFontByUserId\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 \cf15 ToView\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 activityView\cf4 \{\
- \cf2 // [self.view addSubview:self.showBtn];\cf4 \
- \cf15 _imgArr\cf4 = [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 setImgArr\cf4 ];\
- \}\
- -(\cf10 NSMutableArray\cf4 *)\cf11 setImgArr\cf4 \{\
- \cf10 NSMutableArray\cf4 *arr = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ]\cf14 initWithCapacity\cf4 :\cf7 0\cf4 ];\
- \cf2 // for (int i = 1; i<=5; i++) \{\cf4 \
- \cf9 DYAdModel\cf4 *adModel = [[\cf9 DYAdModel\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
- adModel.\cf15 imgStr\cf4 = \cf6 @"
- \f1 \'c0\'f1\'ce\'ef
- \f0 "\cf4 ;\
- adModel.\cf15 linkUrl\cf4 = \cf6 @"http://www.baidu.com"\cf4 ;\
- [arr \cf14 addObject\cf4 :adModel];\
- \cf2 // \}\cf4 \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 arr;\
- \}\
- \
- -(\cf10 UIButton\cf4 *)\cf11 showBtn\cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!\cf15 _showBtn\cf4 ) \{\
- \cf15 _showBtn\cf4 = [\cf10 UIButton\cf4 \cf14 buttonWithType\cf4 :\cf14 UIButtonTypeCustom\cf4 ];\
- \cf15 _showBtn\cf4 .\cf14 center\cf4 =
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 center\cf4 ;\
- \cf15 _showBtn\cf4 .\cf14 bounds\cf4 = \cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf7 0\cf4 , \cf7 100\cf4 , \cf7 60\cf4 );\
- [\cf15 _showBtn\cf4 \cf14 setTitle\cf4 :\cf6 @"
- \f1 \'b5\'af\'a1\'a2\'b5\'af\'a1\'a2\'b5\'af
- \f0 "\cf4 forState:\cf14 UIControlStateNormal\cf4 ];\
- [\cf15 _showBtn\cf4 \cf14 setTitleColor\cf4 :[\cf10 UIColor\cf4 \cf14 orangeColor\cf4 ] \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
- [\cf15 _showBtn\cf4 \cf14 addTarget\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 action\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (showAdAlertView) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 \cf15 _showBtn\cf4 ;\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showAdAlertView\cf4 \{\
- [\cf9 DYAdAlertView\cf4 \cf15 showInView\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 \cf15 theDelegate\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 theADInfo\cf4 :\cf15 _imgArr\cf4 \cf15 placeHolderImage\cf4 :\cf6 @"1"\cf4 ];\
- \}\
- -(
- \f2\b \cf8 void
- \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 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )showCancelButton \cf11 type\cf4 :(\cf9 DYAdModelType\cf4 )type \cf11 success\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )success\{\
- \cf10 NSMutableArray\cf4 *arr = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ]\cf14 initWithCapacity\cf4 :\cf7 0\cf4 ];\
- \cf9 DYAdModel\cf4 *adModel = [[\cf9 DYAdModel\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
- adModel.\cf15 imgStr\cf4 = image;\
- adModel.\cf15 linkUrl\cf4 = linkUrl;\
- adModel.\cf15 audio\cf4 = audio;\
- adModel.\cf15 duration\cf4 = duration;\
- adModel.\cf15 content\cf4 = content;\
- adModel.\cf15 showCancelButton\cf4 = showCancelButton;\
- adModel.\cf15 type\cf4 = type;\
- adModel.\cf15 success\cf4 = success;\
- [arr \cf14 addObject\cf4 :adModel];\
- \cf15 _imgArr\cf4 = arr;\
- \
- [\cf15 _showLongViewc\cf4 \cf14 removeFromSuperview\cf4 ];\
- \cf9 DYAdAlertView\cf4 *showLongView= [\cf9 DYAdAlertView\cf4 \cf15 showInView\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 \cf15 theDelegate\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 theADInfo\cf4 :arr \cf15 placeHolderImage\cf4 :\cf6 @"1"\cf4 ];\
- showLongView.\cf14 userInteractionEnabled\cf4 =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 _strURLGoback\cf4 .\cf14 length\cf4 >\cf7 0\cf4 ) \{\
- [[[\cf10 UIApplication\cf4 \cf14 sharedApplication\cf4 ].\cf14 windows\cf4 \cf14 objectAtIndex\cf4 :\cf7 0\cf4 ] \cf14 addSubview\cf4 :showLongView];\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 showLongViewc\cf4 =showLongView;\
- \
- \cf2 //[showLongView.titleLong addTarget:self action:@selector(gotoGouCaiBtb) forControlEvents:UIControlStateNormal];\cf4 \
- \
- \}\
- \
- \cf2 //
- \f1 \'c8\'a5\'c7\'c0\'ba\'ec\'b0\'fc
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showAdAlertViewImageRedPackage\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 :(\cf9 JLGroupActivityModel\cf4 *)content \cf11 showCancelButton\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )showCancelButton \cf11 type\cf4 :(\cf9 DYAdModelType\cf4 )type \cf11 success\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )success\{\
- \cf10 NSMutableArray\cf4 *arr = [[\cf10 NSMutableArray\cf4 \cf14 alloc\cf4 ]\cf14 initWithCapacity\cf4 :\cf7 0\cf4 ];\
- \cf9 DYAdModel\cf4 *adModel = [[\cf9 DYAdModel\cf4 \cf14 alloc\cf4 ]\cf14 init\cf4 ];\
- adModel.\cf15 imgStr\cf4 = image;\
- adModel.\cf15 linkUrl\cf4 = linkUrl;\
- adModel.\cf15 code\cf4 = content.\cf15 code\cf4 ;\
- adModel.
- \f2\b \cf8 id
- \f0\b0 \cf4 = content.
- \f2\b \cf8 id
- \f0\b0 \cf4 ;\
- adModel.\cf15 num\cf4 = content.\cf15 num\cf4 ;\
- adModel.\cf15 money\cf4 = content.\cf15 money\cf4 ;\
- adModel.\cf15 imgUrl\cf4 = content.\cf15 imgUrl\cf4 ;\
- adModel.\cf15 audio\cf4 = audio;\
- adModel.\cf15 duration\cf4 = duration;\
- adModel.\cf15 content\cf4 = content.\cf15 content\cf4 ;\
- adModel.\cf15 showCancelButton\cf4 = showCancelButton;\
- adModel.\cf15 type\cf4 = type;\
- adModel.\cf15 success\cf4 = success;\
- [arr \cf14 addObject\cf4 :adModel];\
- \cf15 _imgArr\cf4 = arr;\
- \
- \cf15 _isShowRedPackage\cf4 =\cf7 1\cf4 ;\
- \
- [\cf15 _showLongViewc\cf4 \cf14 removeFromSuperview\cf4 ];\
- \
- \cf9 DYAdAlertView\cf4 *showLongView= [\cf9 DYAdAlertView\cf4 \cf15 showInView\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 \cf15 theDelegate\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 theADInfo\cf4 :arr \cf15 placeHolderImage\cf4 :\cf6 @"1"\cf4 ];\
- showLongView.\cf14 userInteractionEnabled\cf4 =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 _strURLGoback\cf4 .\cf14 length\cf4 >\cf7 0\cf4 ) \{\
- \
- [[[\cf10 UIApplication\cf4 \cf14 sharedApplication\cf4 ].\cf14 windows\cf4 \cf14 objectAtIndex\cf4 :\cf7 0\cf4 ] \cf14 addSubview\cf4 :showLongView];\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 showLongViewc\cf4 =showLongView;\
- \
- \
- \}\
- \
- \
- \cf2 //
- \f1 \'d7\'ee\'d0\'c2\'c8\'ba\'b9\'ab\'b8\'e6
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showLatestBroadcastTitle\cf4 :(\cf10 NSString\cf4 *)title \cf11 message\cf4 :(\cf10 NSString\cf4 *)message \{\
- \cf10 NSArray\cf4 *buttons = \cf7 @[\cf6 @"
- \f1 \'d6\'aa\'b5\'c0\'c1\'cb
- \f0 "\cf7 ]\cf4 ;\
- \cf10 NSData\cf4 * data = [\cf10 NSData\cf4 \cf14 dataWithContentsOfURL\cf4 :[\cf10 NSURL\cf4 \cf14 URLWithString\cf4 :\cf6 @""\cf4 ]];\
- \cf10 UIImage\cf4 *image = [\cf10 UIImage\cf4 \cf14 imageWithData\cf4 :data];\
- [\cf15 _alert\cf4 \cf15 hide\cf4 :
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \cf9 STAlertView\cf4 *alert = [[\cf9 STAlertView\cf4 \cf14 alloc\cf4 ] \cf15 initWithTitle\cf4 :title\
- \cf15 image\cf4 :image\
- \cf15 message\cf4 :message\
- \cf15 buttonTitles\cf4 :buttons];\
- \cf15 _alert\cf4 = alert;\
- alert.\cf15 hideWhenTapOutside\cf4 =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [alert \cf15 setDidShowHandler\cf4 :^\{\
- \cf14 NSLog\cf4 (\cf6 @"
- \f1 \'cf\'d4\'ca\'be\'c1\'cb
- \f0 "\cf4 );\
- \}];\
- [alert \cf15 setDidHideHandler\cf4 :^\{\
- \cf14 NSLog\cf4 (\cf6 @"
- \f1 \'cf\'fb\'ca\'a7\'c1\'cb
- \f0 "\cf4 );\
- \}];\
- [alert \cf15 setActionHandler\cf4 :^(\cf10 NSInteger\cf4 index) \{\
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 (index) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 0\cf4 :\
- \{\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}];\
- [alert \cf15 show\cf4 :
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- \cf2 //
- \f1 \'b5\'e3\'bb\'f7\'ba\'f3\'cc\'f8\'cd\'f8\'d2\'b3
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 clickAlertViewAtIndex\cf4 :(\cf10 NSInteger\cf4 )index\{\
- \
- \
- \cf9 DYAdModel\cf4 *adModel = [\cf15 _imgArr\cf4 \cf14 objectAtIndex\cf4 :index];\
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 (adModel.\cf15 type\cf4 ) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf15 DYAdModelTypeLongAnimation\cf4 :\
- \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 showLongViewc\cf4 \cf14 removeFromSuperview\cf4 ];\
- [\cf5 g_notify\cf4 \cf14 postNotificationName\cf4 :\cf6 @"longGoback"\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 // webpageVC *webVC = [webpageVC alloc];\cf4 \
- \cf2 // webVC.isGotoBack= YES;\cf4 \
- \cf2 // webVC.isSend = NO;\cf4 \
- \cf2 // webVC.url = adModel.linkUrl;\cf4 \
- \cf2 // webVC = [webVC init];\cf4 \
- \cf2 // [g_navigation.navigationView addSubview:webVC.view];\cf4 \
- [\cf5 g_App\cf4 .\cf15 navigation\cf4 \cf15 popToRootViewController\cf4 ];\
- \
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf15 DYAdModelTypeGiftOpen\cf4 :\
- \{\cf2 //[g_server getRroomActivity:_activityModel.id ToView:self];\cf4 \
- \cf15 _isShowRedPackage\cf4 =\cf7 0\cf4 ;\
-
- \f2\b \cf8 long
- \f0\b0 \cf4 time = (
- \f2\b \cf8 long
- \f0\b0 \cf4 )[[\cf10 NSDate\cf4 \cf14 date\cf4 ] \cf14 timeIntervalSince1970\cf4 ];\
- time = time *\cf7 1000\cf4 + \cf5 g_server\cf4 .\cf15 timeDifference\cf4 ;\
- \cf10 NSString\cf4 *salt = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%ld"\cf4 ,time];\
- [\cf5 g_server\cf4 \cf15 geact_roomgroupTypePackRedsalt\cf4 :salt \cf15 groupTypeDeliveryId\cf4 :adModel.
- \f2\b \cf8 id
- \f0\b0 \cf4 \cf15 ToView\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'b7\'a2\'cd\'f8\'c2\'e7\'c7\'eb\'c7\'f3
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 showAdAlertViewImageString\cf4 :\cf6 @"
- \f1 \'d7\'bc\'b5\'e3\'ba\'ec\'b0\'fc
- \f0 2.gif"\cf4 linkUrl:
- \f2\b \cf8 nil
- \f0\b0 \cf4 \cf5 audio\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 \cf5 duration\cf4 :\cf7 4\cf4 content:
- \f2\b \cf8 nil
- \f0\b0 \cf4 \cf15 showCancelButton\cf4 :
- \f2\b \cf8 YES
- \f0\b0 \cf4 type:(\cf15 DYAdModelTypeGifttOpenAnimation\cf4 ) success:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf15 DYAdModelTypeGifttOpenAnimation\cf4 :\
- \{\
- \cf2 // [self showAdAlertViewImageString:@"
- \f1 \'bb\'f1\'b5\'c3\'bd\'b1\'c0\'f8\'bd\'e7\'c3\'e6
- \f0 .png" linkUrl:_activityModel.imageUrl audio:nil duration:0 content:_activityModel.success?_activityModel.giftName:@"
- \f1 \'c0\'f1\'ce\'ef\'d2\'d1\'c7\'c0\'cd\'ea
- \f0 !" showCancelButton:NO type:(DYAdModelTypeGiftAfterOpen) success:_activityModel.success];\cf4 \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 showAdAlertViewImageString\cf4 :\cf6 @"002.gif"\cf4 \cf15 linkUrl\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 \cf15 audio\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 \cf15 duration\cf4 :\cf7 4\cf4 \cf15 content\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 \cf15 showCancelButton\cf4 :
- \f2\b \cf8 YES
- \f0\b0 \cf4 \cf15 type\cf4 :(\cf15 DYAdModelTypeGifttOpenAnimation\cf4 ) \cf15 success\cf4 :
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf15 DYAdModelTypeGiftAfterOpen\cf4 :\
- \{\
- \cf2 //
- \f1 \'c7\'eb\'c7\'f3\'b7\'fe\'ce\'f1\'c6\'f7
- \f0 \cf4 \
- [\cf5 g_server\cf4 \cf15 getRoomActivityRecordToView\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 setupFloating\cf4 \{\
- \cf15 _floating\cf4 = [[\cf9 MISFloatingBall\cf4 \cf14 alloc\cf4 ] \cf15 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf5 JX_SCREEN_WIDTH\cf4 -\cf7 68\cf4 , \cf5 JX_SCREEN_HEIGHT\cf4 /\cf7 3\cf4 , \cf7 60\cf4 , \cf7 60\cf4 ) \cf15 inSpecifiedView\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 \cf15 effectiveEdgeInsets\cf4 :(\cf14 UIEdgeInsetsZero\cf4 )];\
- \cf2 //
- \f1 \'d7\'d4\'b6\'af\'bf\'bf\'b1\'df
- \f0 \cf4 \
- \cf15 _floating\cf4 .\cf14 contentMode\cf4 =\cf14 UIViewContentModeScaleAspectFit\cf4 ;\
- \cf15 _floating\cf4 .\cf15 autoCloseEdge\cf4 =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\cf2 //chatroom_ribbon\cf4 \
- [\cf15 _floating\cf4 \cf15 setContent\cf4 :[\cf10 UIImage\cf4 \cf14 imageNamed\cf4 :\cf6 @"sidaiDD"\cf4 ] \cf15 contentType\cf4 :\cf15 MISFloatingBallContentTypeImage\cf4 ];\
- \cf15 _floating\cf4 .\cf15 edgePolicy\cf4 = \cf15 MISFloatingBallEdgePolicyLeftRight\cf4 ;\
- [\cf15 _floating\cf4 \cf15 show\cf4 ];\
-
- \f2\b \cf8 __weak
- \f0\b0 \cf4
- \f2\b \cf8 __typeof
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 )weakSelf =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- \cf15 _floating\cf4 .\cf15 clickHandler\cf4 = ^(\cf9 MISFloatingBall\cf4 *
- \f2\b \cf8 _Nonnull
- \f0\b0 \cf4 floatingBall) \{\
- \cf2 // [g_server getAppResource:@"5" ToView:weakSelf];\cf4 \
-
- \f2\b \cf8 long
- \f0\b0 \cf4 time = (
- \f2\b \cf8 long
- \f0\b0 \cf4 )[[\cf10 NSDate\cf4 \cf14 date\cf4 ] \cf14 timeIntervalSince1970\cf4 ];\
- time = (time *\cf7 1000\cf4 + \cf5 g_server\cf4 .\cf15 timeDifference\cf4 );\
- \cf15 _strURLGoback\cf4 =\cf6 @""\cf4 ;\
- \cf10 NSString\cf4 *salt = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"%ld"\cf4 , time];\
- \cf10 NSString\cf4 *jid_room=[[\cf10 NSUserDefaults\cf4 \cf14 standardUserDefaults\cf4 ] \cf14 objectForKey\cf4 :\cf6 @"jid_roomJid"\cf4 ];\
- [\cf5 g_server\cf4 \cf15 getact_act_act_SilkPlanallByJidlist\cf4 :salt \cf15 jid\cf4 :jid_room \cf15 andToView\cf4 :weakSelf];\
- \};\
- \}\
- \
- \
- \cf2 //
- \f1 \'bc\'fc\'c5\'cc\'bc\'e0\'cc\'fd\'ca\'c2\'bc\'fe
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 keyboardAction\cf4 :(\cf10 NSNotification\cf4 *)sender\{\
- \cf2 //
- \f1 \'cd\'a8\'b9\'fd\'cd\'a8\'d6\'aa\'b6\'d4\'cf\'f3\'bb\'f1\'c8\'a1\'bc\'fc\'c5\'cc
- \f0 frame: [value CGRectValue]\cf4 \
- \cf10 NSDictionary\cf4 *useInfo = [sender \cf14 userInfo\cf4 ];\
- \cf10 NSValue\cf4 *value = [useInfo \cf14 objectForKey\cf4 :\cf14 UIKeyboardFrameEndUserInfoKey\cf4 ];\
- \
- \cf2 //self.view.frame = CGRectMake(0, 0, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-JX_SCREEN_TOP);\cf4 \
- \
- \cf2 //
- \f1 \'bc\'fc\'c5\'cc\'b5\'af\'b3\'f6
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([sender.\cf14 name\cf4 \cf14 isEqualToString\cf4 :\cf14 UIKeyboardWillShowNotification\cf4 ])\{\
- \cf2 //
- \f1 \'bc\'fc\'c5\'cc\'b8\'df\'b6\'c8
- \f0 \cf4 \
-
- \f2\b \cf8 int
- \f0\b0 \cf4 aa = [value \cf14 CGRectValue\cf4 ].\cf14 size\cf4 .\cf14 height\cf4 ;\
- \cf15 _keyboardHeight\cf4 =aa;\
- \cf15 _keyboardHeightNav\cf4 =\cf7 44\cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 _array\cf4 .\cf14 count\cf4 >\cf7 10\cf4 ) \{\
- \
- \cf15 _table\cf4 .\cf14 frame\cf4 =\cf14 CGRectMake\cf4 (\cf7 0\cf4 ,-aa,\cf5 self_width\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 -
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightFooter\cf4 );\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- \cf15 _table\cf4 .\cf14 frame\cf4 =\cf14 CGRectMake\cf4 (\cf7 0\cf4 ,\cf7 0\cf4 ,\cf5 self_width\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 -
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightFooter\cf4 );\
- \}\
- \
- \
- \
- \
- [\cf15 inputBar\cf4 \cf15 mas_makeConstraints\cf4 :^(\cf9 MASConstraintMaker\cf4 *make) \{\
- make.\cf15 bottom\cf4 .\cf5 mas_equalTo\cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.mas_bottom).\cf5 mas_offset\cf4 (-(\cf5 JX_SCREEN_HEIGHT\cf4 >=\cf7 812\cf4 ?\cf7 40\cf4 :\cf7 10\cf4 )-aa);\
- make.\cf15 left\cf4 .\cf15 right\cf4 .\cf5 mas_equalTo\cf4 (\cf7 0\cf4 );\
- make.\cf15 height\cf4 .\cf5 mas_equalTo\cf4 (\cf5 tableBarHHH\cf4 );\
- \
- \}];\
- \
- \
- \
- \cf2 // self.tableFooter.frame = CGRectMake(0, JX_SCREEN_HEIGHT-JX_SCREEN_TOP-self.heightFooter-aa-0, JX_SCREEN_WIDTH, self.heightFooter);//\cf4 \
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf14 NSLog\cf4 (\cf6 @"
- \f1 \'bc\'fc\'c5\'cc\'d2\'fe\'b2\'d8
- \f0 -self.heightFooter--%d- keyboardHeight--%d - self.view.frame.size.height--%f"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightFooter\cf4 ,\cf15 _keyboardHeight\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 );\
- \
- \cf2 //
- \f1 \'c8\'e7\'b9\'fb\'ca\'c7\'b1\'ed\'c7\'e9\'bc\'fc\'c5\'cc
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 _faceView\cf4 && !\cf15 _faceView\cf4 .\cf14 hidden\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf7 0\cf4 ,\cf5 keboardHHH\cf4 + \cf5 JX_SCREEN_HEIGHT\cf4 -\cf7 263\cf4 -\cf7 53\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightFooter\cf4 );\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (\cf7 0\cf4 , \cf5 JX_SCREEN_HEIGHT\cf4 -\cf5 JX_SCREEN_TOP\cf4 -
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightFooter\cf4 -\cf5 JX_SCREEN_HEIGHT\cf4 >=\cf7 812\cf4 ?\cf7 44\cf4 :\cf7 14\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightFooter\cf4 );\
- \cf15 _table\cf4 .\cf14 frame\cf4 =\cf14 CGRectMake\cf4 (\cf7 0\cf4 ,\cf7 0\cf4 ,\cf5 self_width\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 -
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightFooter\cf4 -\cf7 0\cf4 );\
- \
- \cf2 //self.tableFooter.frame = CGRectMake(0, self.view.frame.size.height-0, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- \cf15 _keyboardHeight\cf4 =\cf7 0\cf4 ;\
- \cf15 _keyboardHeightNav\cf4 =\cf7 0\cf4 ;\
- \}\
- \
- \
- [\cf15 inputBar\cf4 \cf15 mas_makeConstraints\cf4 :^(\cf9 MASConstraintMaker\cf4 *make) \{\
- make.\cf15 bottom\cf4 .\cf5 mas_equalTo\cf4 (-(\cf5 JX_SCREEN_HEIGHT\cf4 >=\cf7 812\cf4 ?\cf7 40\cf4 :\cf7 10\cf4 ));\
- make.\cf15 left\cf4 .\cf15 right\cf4 .\cf5 mas_equalTo\cf4 (\cf7 0\cf4 );\
- make.\cf15 height\cf4 .\cf5 mas_equalTo\cf4 (\cf5 tableBarHHH\cf4 );\
- \
- \}];\
- \
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 viewDidLoad\cf4 \
- \{\
- [
- \f2\b \cf8 super
- \f0\b0 \cf4 \cf14 viewDidLoad\cf4 ];\
- \
- \
- [[\cf10 NSUserDefaults\cf4 \cf14 standardUserDefaults\cf4 ]\cf14 setObject\cf4 :\cf15 _roomJid\cf4 \cf14 forKey\cf4 :\cf6 @"jid_roomJid"\cf4 ];\
- [[\cf10 NSUserDefaults\cf4 \cf14 standardUserDefaults\cf4 ] \cf14 synchronize\cf4 ];\
- \
- \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 getEmojsData\cf4 ];\
- \cf2 // [g_notify addObserver:self selector:@selector(getEmojsData) name:kEmojiRefresh object:nil];\cf4 \
- \
- [[\cf10 NSNotificationCenter\cf4 \cf14 defaultCenter\cf4 ] \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (keyboardAction:) \cf14 name\cf4 :\cf14 UIKeyboardWillShowNotification\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [[\cf10 NSNotificationCenter\cf4 \cf14 defaultCenter\cf4 ] \cf14 addObserver\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 selector\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (keyboardAction:) \cf14 name\cf4 :\cf14 UIKeyboardWillHideNotification\cf4 \cf14 object\cf4 :
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 backgroundColor\cf4 = \cf5 HEXCOLOR\cf4 (\cf7 0xF9F9F9\cf4 );\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 friendStatus\cf4 = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 chatPerson\cf4 .\cf15 status\cf4 \cf14 intValue\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 customView\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 chatRoom\cf4 .\cf15 roomJid\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 setupFloating\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 setupNotice\cf4 ];\
- \
- \cf2 // _room.members fcb2b6feb1e2408b9b050b8b9ebab9c4\cf4 \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 setupNotice2nd\cf4 ];\
- \
- \
- \
- \cf5 #ifdef DEBUG\cf4 \
- \
- \cf10 UILabel\cf4 *lable = [[\cf10 UILabel\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 80\cf4 , \cf7 150\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf7 50\cf4 )];\
- lable.\cf14 text\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"roomId = %@"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 roomId\cf4 ];\
- lable.\cf14 font\cf4 = [\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 10\cf4 ];\
- lable.\cf14 textColor\cf4 = [\cf10 UIColor\cf4 \cf14 redColor\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 \cf14 addSubview\cf4 :lable];\
- [lable \cf14 sizeToFit\cf4 ];\
- \
- \cf10 UILabel\cf4 *lable1 = [[\cf10 UILabel\cf4 \cf14 alloc\cf4 ] \cf14 initWithFrame\cf4 :\cf14 CGRectMake\cf4 (\cf7 80\cf4 , \cf7 160\cf4 , \cf5 JX_SCREEN_WIDTH\cf4 , \cf7 50\cf4 )];\
- lable1.\cf14 text\cf4 = [\cf10 NSString\cf4 \cf14 stringWithFormat\cf4 :\cf6 @"roomJid = %@"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 chatRoom\cf4 .\cf15 roomJid\cf4 ];\
- lable1.\cf14 font\cf4 = [\cf10 UIFont\cf4 \cf14 systemFontOfSize\cf4 :\cf7 10\cf4 ];\
- lable1.\cf14 textColor\cf4 = [\cf10 UIColor\cf4 \cf14 redColor\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 \cf14 addSubview\cf4 :lable1];\
- [lable1 \cf14 sizeToFit\cf4 ];\
- \cf5 #else\cf4 \
- \
- \cf2 //self.ta\cf4 \
- \cf2 // Release
- \f1 \'c4\'a3\'ca\'bd\'b5\'c4\'b4\'fa\'c2\'eb
- \f0 ...\cf4 \
- \
- \cf5 #endif\cf4 \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 courseId\cf4 .\cf14 length\cf4 > \cf7 0\cf4 ) \{\
- \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 )];\
- btn.\cf14 backgroundColor\cf4 = \cf5 THEMECOLOR\cf4 ;\
- [btn \cf14 setTitle\cf4 :\cf5 Localized\cf4 (\cf6 @"JXUserInfoVC_SendMseeage"\cf4 ) \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
- [btn \cf14 setTitleColor\cf4 :[\cf10 UIColor\cf4 \cf14 whiteColor\cf4 ] \cf14 forState\cf4 :\cf14 UIControlStateNormal\cf4 ];\
- btn.\cf14 titleLabel\cf4 .\cf14 font\cf4 = \cf5 g_factory\cf4 .\cf15 font16\cf4 ;\
- btn.\cf14 layer\cf4 .\cf14 masksToBounds\cf4 =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- btn.\cf14 layer\cf4 .\cf14 cornerRadius\cf4 = btn.\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 /\cf7 2\cf4 ;\
- [btn \cf14 addTarget\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf14 action\cf4 :
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (sendCourseAction) \cf14 forControlEvents\cf4 :\cf14 UIControlEventTouchUpInside\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 tableFooter\cf4 \cf14 addSubview\cf4 :btn];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 createFooterSubViews\cf4 ];\
- \}\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 = \cf14 CGRectMake\cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 x\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 .\cf14 origin\cf4 .\cf14 y\cf4 -
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 - \cf7 10\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 width\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 screenShotView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 );\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 roomJid\cf4 ) \{\
- \cf2 //
- \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
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \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 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 friendStatus\cf4 = \cf7 10\cf4 ;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (\cf9 JXDevice\cf4 *device
- \f2\b \cf8 in
- \f0\b0 \cf4 \cf5 g_multipleLogin\cf4 .\cf15 deviceArr\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([device.\cf15 userId\cf4 \cf14 isEqualToString\cf4 :\cf15 chatPerson\cf4 .\cf15 userId\cf4 ]) \{\
- \cf2 // NSString *str = [device.isOnLine intValue] == 1 ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 onlinestate\cf4 = [device.\cf15 isOnLine\cf4 \cf14 boolValue\cf4 ];\
- \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.remarkName.length > 0 ? chatPerson.remarkName : chatPerson.userNickname,str];\cf4 \
- [
- \f2\b \cf8 self
- \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 ];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- \cf2 // if ([chatPerson.userId rangeOfString:@"android"].location != NSNotFound) \{\cf4 \
- \cf2 //\cf4 \
- \cf2 // NSString *str = [g_multipleLogin.androidUser.isOnLine intValue] == 1 ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
- \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.userNickname,str];\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // if ([chatPerson.userId rangeOfString:@"pc"].location != NSNotFound) \{\cf4 \
- \cf2 // NSString *str = [g_multipleLogin.pcUser.isOnLine intValue] == 1 ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
- \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.userNickname,str];\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // if ([chatPerson.userId rangeOfString:@"mac"].location != NSNotFound) \{\cf4 \
- \cf2 // NSString *str = [g_multipleLogin.macUser.isOnLine intValue] == 1 ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
- \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.userNickname,str];\cf4 \
- \cf2 // \}\cf4 \
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 isGroupMessages\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 title\cf4 = \cf5 Localized\cf4 (\cf6 @"JX_GroupHair"\cf4 );\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 setAudioIconFrame\cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [g_server getUser:chatPerson.userId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- [g_server getUser:MY_USER_ID toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [g_server roomGetRoom:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- \cf5 #if IS_AUTO_JOIN_ROOM\cf4 \
- \cf2 //
- \f1 \'bd\'f8\'c8\'ba\'d7\'e9
- \f0
- \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
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![g_xmpp.roomPool getRoom:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userId] && [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.groupStatus intValue] == \cf7 0\cf4 ) \{\
- [g_xmpp.roomPool joinRoom:chatPerson.userId title:chatPerson.userNickname lastDate:
- \f2\b \cf8 nil
- \f0\b0 \cf4 isNew:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- chatRoom = [[JXXMPP sharedInstance].roomPool joinRoom:chatPerson.userId title:chatPerson.userNickname lastDate:
- \f2\b \cf8 nil
- \f0\b0 \cf4 isNew:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \cf5 #endif\cf4 \
- \}\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid ||
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length <= \cf7 0\cf4 ) \{\
- \cf2 //
- \f1 \'cd\'ac\'b2\'bd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 messageSync];\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (chatPerson.lastInput.length > \cf7 0\cf4 ) \{\
- \
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 0.5\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
- \
- _messageText.inputView =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- [_messageText reloadInputViews];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 doBeginEdit];\
- [_messageText becomeFirstResponder];\
- [_faceView removeFromSuperview];\
- \});\
- \}\
-
- \f2\b \cf8 long
- \f0\b0 \cf4 time = (
- \f2\b \cf8 long
- \f0\b0 \cf4 )[[NSDate date] timeIntervalSince1970];\
- time = (time *\cf7 1000\cf4 + g_server.timeDifference);\
- NSString *salt = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , time];\
- [g_server UserRoomAttentionattentionLastInfo:salt userId:g_server.myself.userId jid:_roomJid andToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- \
- \
- \
- \
- \
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatVCMessageSync\cf4 :(NSNotification *)noti \{\
-
- \f2\b \cf8 long
- \f0\b0 \cf4
- \f2\b \cf8 long
- \f0\b0 \cf4 timeSend = [noti.object longLongValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.timeSend = [NSDate dateWithTimeIntervalSince1970:timeSend];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 messageSync];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 messageSync\cf4 \{\
- \
-
- \f2\b \cf8 double
- \f0\b0 \cf4 syncTimeLen = \cf7 0\cf4 ;\
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- \cf2 // syncTimeLen = [g_myself.groupChatSyncTimeLen doubleValue];\cf4 \
- \cf2 // syncTimeLen = 0;\cf4 \
- syncTimeLen = [g_myself.chatSyncTimeLen doubleValue];\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- s = chatPerson.userId;\
- syncTimeLen = [g_myself.chatSyncTimeLen doubleValue];\
- \}\
- \
- \cf2 //
- \f1 \'cd\'ac\'b2\'bd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.downloadTime timeIntervalSince1970] < [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.timeSend timeIntervalSince1970] && _taskList.count<=\cf7 0\cf4 && syncTimeLen != -\cf7 2\cf4 ) \{\
-
- \f2\b \cf8 long
- \f0\b0 \cf4
- \f2\b \cf8 long
- \f0\b0 \cf4 chatSyncTimeLen = \cf7 0\cf4 ;\
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 ([g_myself.chatSyncTimeLen integerValue]) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 0\cf4 : \cf2 // 0.04 1
- \f1 \'d0\'a1\'ca\'b1
- \f0 \cf4 \
- chatSyncTimeLen = \cf7 3600000\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 1\cf4 : \cf2 // 1
- \f1 \'cc\'ec
- \f0 \cf4 \
- chatSyncTimeLen = \cf7 86400000\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 7\cf4 : \cf2 // 7
- \f1 \'cc\'ec
- \f0 \cf4 \
- chatSyncTimeLen = \cf7 604800017\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 30\cf4 : \cf2 // 30
- \f1 \'cc\'ec
- \f0 \cf4 \
- chatSyncTimeLen = \cf7 2629800000\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 90\cf4 : \cf2 // 90
- \f1 \'cc\'ec
- \f0 \cf4 \
- chatSyncTimeLen = \cf7 7889400000\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 365\cf4 : \cf2 //365
- \f1 \'cc\'ec
- \f0 \cf4 \
- chatSyncTimeLen = \cf7 31557600000\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 -\cf7 1\cf4 : \cf2 //
- \f1 \'d3\'c0\'be\'c3
- \f0 (20
- \f1 \'c4\'ea
- \f0 )\cf4 \
- chatSyncTimeLen = \cf7 631152000000\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 long
- \f0\b0 \cf4 endTime = [[NSDate date] timeIntervalSince1970] * \cf7 1000\cf4 ;\
-
- \f2\b \cf8 long
- \f0\b0 \cf4 starTime = endTime - chatSyncTimeLen;\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSyncMsg =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'bd\'f8\'c8\'ba\'ca\'b1\'bc\'e4
- \f0 \cf4 \
- NSString* myUserId = MY_USER_ID;\
-
- \f2\b \cf8 double
- \f0\b0 \cf4 createTime = \cf7 0\cf4 ;\
- NSArray *array = [memberData getSelfMember:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomId];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (memberData *mdata
- \f2\b \cf8 in
- \f0\b0 \cf4 array) \{\
- NSString *userId = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , mdata.userId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([userId isEqualToString:myUserId])\{\
- createTime = mdata.createTime * \cf7 1000\cf4 ;\
- \}\
- \}\
- \cf2 //
- \f1 \'c8\'ba\'d7\'e9\'c9\'be\'b3\'fd\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc\'ca\'b1\'bc\'e4
- \f0 \cf4 \
- NSInteger time1 = \cf7 0\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([g_default valueForKey:s] && ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )) \{\
- time1 = [[g_default valueForKey:s] integerValue];\
- \}\
- NSNumber *lastClearRecordTime = [NSNumber numberWithInteger:time1];\
- \cf2 //
- \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
- \f0 \cf4 \
- NSInteger time2 = \cf7 0\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([g_default valueForKey:\cf6 @"CLEARALLMSGRECORDTIME"\cf4 ] && ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )) \{\
- time2 = [[g_default valueForKey:\cf6 @"CLEARALLMSGRECORDTIME"\cf4 ] integerValue];\
- \}\
- NSNumber *CLEARALLMSGRECORDTIME = [NSNumber numberWithInteger:time2];\
- \cf2 //
- \f1 \'c9\'e8\'d6\'c3\'c2\'fe\'d3\'ce\'b5\'c4\'ca\'b1\'bc\'e4
- \f0 \cf4 \
- NSNumber *synTime = [NSNumber numberWithLong:starTime];\
- \
- \
- \cf2 //
- \f1 \'c8\'eb\'c8\'ba\'ca\'b1\'bc\'e4
- \f0 \cf4 \
- NSInteger time3 = \cf7 0\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (createTime > \cf7 0\cf4 )\{\
- time3 = [[NSString stringWithFormat:\cf6 @"%f"\cf4 , createTime] integerValue];\
- \}\
- NSNumber *joinTime = [NSNumber numberWithInteger:time3];\
- \cf2 //
- \f1 \'c5\'c5\'d0\'f2\'cb\'c4\'b8\'f6\'ca\'b1\'bc\'e4
- \f0
- \f1 \'c8\'eb\'c8\'ba\'ca\'b1\'bc\'e4
- \f0 ,
- \f1 \'c8\'ba\'d7\'e9\'c9\'be\'b3\'fd\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc\'ca\'b1\'bc\'e4
- \f0 ,
- \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
- \f0 ,
- \f1 \'c9\'e8\'d6\'c3\'c2\'fe\'d3\'ce\'b5\'c4\'ca\'b1\'bc\'e4
- \f0 \cf4 \
- NSArray *sortedArray = [\cf7 @[\cf4 joinTime,lastClearRecordTime,synTime,CLEARALLMSGRECORDTIME\cf7 ]\cf4 sortedArrayUsingComparator:^NSComparisonResult(
- \f2\b \cf8 id
- \f0\b0 \cf4
- \f2\b \cf8 _Nonnull
- \f0\b0 \cf4 obj1,
- \f2\b \cf8 id
- \f0\b0 \cf4
- \f2\b \cf8 _Nonnull
- \f0\b0 \cf4 obj2) \{\
- NSComparisonResult result = [obj1 compare: obj2];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 result;\
- \}];\
- NSNumber *time = [sortedArray lastObject];\
- starTime = [time longValue];\
- \cf2 // p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:[NSDate dateWithTimeIntervalSince1970:createTime]];\cf4 \
- [g_server tigaseMucMsgsWithRoomId:s StartTime:starTime EndTime:endTime PageIndex:\cf7 0\cf4 PageSize:PAGECOUNT toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- [g_server tigaseMsgsWithReceiver:s StartTime:starTime EndTime:endTime PageIndex:\cf7 0\cf4 toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.downloadTime =
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.timeSend;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson update];\
- \}\
- \
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 customView\cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 createHeadAndFoot];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableFooter.clipsToBounds =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \cf2 //
- \f1 \'c9\'e8\'d6\'c3\'c1\'c4\'cc\'ec\'b1\'b3\'be\'b0\'cd\'bc\'c6\'ac
- \f0 \cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .backGroundImageView = [[UIImageView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT - JX_SCREEN_BOTTOM-JX_SCREEN_TOP)];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .backGroundImageView.contentMode = UIViewContentModeScaleAspectFill;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .view insertSubview:
- \f2\b \cf8 self
- \f0\b0 \cf4 .backGroundImageView belowSubview:_table];\
- \
- NSData *imageData = [g_constant.userBackGroundImage objectForKey:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userId];\
- UIImage *backGroundImage = [UIImage imageWithContentsOfFile:kChatBackgroundImagePath];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (imageData) \{\
- _table.backgroundColor = [UIColor clearColor];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .backGroundImageView.image = [UIImage imageWithData:imageData];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (backGroundImage) \{\
- _table.backgroundColor = [UIColor clearColor];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .backGroundImageView.image = backGroundImage;\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _table.backgroundColor = HEXCOLOR(\cf7 0xF2F2F2\cf4 );\
- \}\
- \cf2 // _table.allowsSelection = NO;\cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isShowFooterPull =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isShowHeaderPull =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \cf2 // self.tableFooter.backgroundColor = HEXCOLOR(0xD0D0D0);\cf4 \
- \
- CGFloat width = \cf7 120\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([g_constant.sysLanguage isEqualToString:\cf6 @"zh"\cf4 ]) \{\
- width = \cf7 80\cf4 ;\
- \}\
- \cf2 // if (!self.ished) \{\cf4 \
- \
- \cf2 // NSString *str = [NSString stringWithFormat:@"%@(%@)",chatPerson.userNickname,Localized(@"JX_OffLine")];\cf4 \
- \cf2 // CGSize size = [str boundingRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@\{NSFontAttributeName:self.headerTitle.font\} context:nil].size;\cf4 \
- \cf2 // CGFloat n = JX_SCREEN_WIDTH / 2 + size.width / 2;\cf4 \
- \cf2 // CGFloat x = ((JX_SCREEN_WIDTH - n - (JX_SCREEN_WIDTH - btn.frame.origin.x)) / 2) - (width / 2) + n;\cf4 \
- \
- \cf2 // UIButton *readDelBut = [UIFactory createButtonWithImage:@"im_destroy"\cf4 \
- \cf2 // highlight:nil\cf4 \
- \cf2 // target:self\cf4 \
- \cf2 // selector:@selector(switchValueChange:)];\cf4 \
- \cf2 // readDelBut.custom_acceptEventInterval = .25f;\cf4 \
- \cf2 // readDelBut.tag = 2000;\cf4 \
- \cf2 // readDelBut.frame = CGRectMake(JX_SCREEN_WIDTH - 42 - 32, JX_SCREEN_TOP - 33, 22, 22);\cf4 \
- \cf2 // readDelBut.layer.cornerRadius = readDelBut.frame.size.width / 2;\cf4 \
- \cf2 // readDelBut.layer.masksToBounds = YES;\cf4 \
- \cf2 // readDelBut.layer.borderWidth = 1;\cf4 \
- \cf2 // readDelBut.layer.borderColor = [UIColor whiteColor].CGColor;\cf4 \
- \cf2 // [self.tableHeader addSubview:readDelBut];\cf4 \
- \
- NSLog(\cf6 @"timetime203 -- %f"\cf4 , [[NSDate date] timeIntervalSince1970]);\
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 0.3\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
- memberData *data = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:g_myself.userId];\
- \
- _moreView =[JXSelectImageView alloc];\
- _moreView.isDevice = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userId rangeOfString:MY_USER_ID].location != NSNotFound;\
- _moreView.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- _moreView.isGroupMessages =
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages;\
- _moreView.isGroup = _roomJid.length > \cf7 0\cf4 ;\
- _moreView.isWin = [data.role intValue] == \cf7 1\cf4 ;\
- _moreView.onImage =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (pickPhoto);\
- _moreView.backgroundColor=[UIColor whiteColor];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid) \{\cf2 //
- \f1 \'c8\'e7\'b9\'fb\'ca\'c7\'c8\'ba\'c1\'c4
- \f0 \cf4 \
- _moreView.onGift =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (sendGiftToRoom);\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _moreView.onGift =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (sendGift);\
- _moreView.onTransfer =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onTransfer);\
- \}\
- \
- _moreView.onAudioChat =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onChatSip);\
- _moreView.onVideo =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (pickVideo);\
- _moreView.onCard =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onCard);\
- _moreView.onFile =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onFile);\
- _moreView.onLocation =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onLocation);\
- _moreView.onCamera =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onCamera);\
- _moreView.onShake =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onShake);\
- _moreView.onCollection =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onCollection);\
- _moreView.onAddressBook =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onAddressBook);\
- _moreView.onGroupHelper =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onGroupHelper);\
- \
- _moreView = [_moreView initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, faceHeight)];\
- \
- _voice = [[JXVolumeView alloc]initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , \cf7 160\cf4 , \cf7 150\cf4 )];\
- _voice.center =
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.center;\
- \});\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 initAudio];\
- \
- UIButton* btn;\
- UIButton *btn1;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid)\{\
- btn1 = [[UIButton alloc] initWithFrame:CGRectMake(JX_SCREEN_WIDTH-\cf7 18\cf4 -BTN_RANG_UP*\cf7 2\cf4 , JX_SCREEN_TOP -\cf7 18\cf4 -BTN_RANG_UP*\cf7 2\cf4 , \cf7 18\cf4 +BTN_RANG_UP*\cf7 2\cf4 , \cf7 18\cf4 +BTN_RANG_UP*\cf7 2\cf4 )];\
- [btn1 addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onMember) forControlEvents:UIControlEventTouchUpInside];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableHeader addSubview:btn1];\
- \
- \
- btn = [UIFactory createButtonWithImage:\cf6 @"chat_more_black"\cf4 highlight:
- \f2\b \cf8 nil
- \f0\b0 \cf4 target:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onMember)];\
- btn.custom_acceptEventInterval = \cf7 1.0f\cf4 ;\
- btn.frame = CGRectMake(BTN_RANG_UP, BTN_RANG_UP, \cf7 18\cf4 , \cf7 18\cf4 );\
- [btn1 addSubview:btn];\
- \
- \
- UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeSystem];\
- [rightBtn setImage:[UIImage imageNamed:\cf6 @"chat_more_black"\cf4 ] forState:UIControlStateNormal];\
- [rightBtn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onMember) forControlEvents:UIControlEventTouchUpInside];\
- rightBtn.frame=CGRectMake(\cf7 1\cf4 , \cf7 1\cf4 , \cf7 40\cf4 , \cf7 36\cf4 );\
- UIBarButtonItem *rightBarBtn = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .navigationItem.rightBarButtonItem = rightBarBtn;\
- \
- [g_server getRoomMember:roomId userId:[g_myself.userId intValue] toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'c8\'ba\'b3\'c9\'d4\'b1\'a3\'ba
- \f0 \cf4 \
- NSArray * memberArray = [memberData fetchAllMembers:_room.roomId];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = [NSString stringWithFormat:\cf6 @"%@(%ld)"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userNickname, memberArray.count];\
- \
- \
- _dataArrGetGroundPersonArr=[memberArray mutableCopy];\
- \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (memberArray.count > \cf7 0\cf4 ) \{\cf2 //
- \f1 \'b1\'be\'b5\'d8\'d3\'d0
- \f0 \cf4 \
- _room.roomId = roomId;\
- _room.members = [memberArray mutableCopy];\
- \
- memberData *data = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:g_myself.userId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([data.role intValue] == \cf7 1\cf4 || [data.role intValue] == \cf7 2\cf4 ) \{\
- _isAdmin =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _isAdmin =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isFirst =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [g_server getRoom:
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.roomId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \cf2 // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\cf4 \
- [g_server listRoomMember:roomId page:\cf7 0\cf4 toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \cf2 // \});\cf4 \
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- btn1 = [[UIButton alloc] initWithFrame:CGRectMake(JX_SCREEN_WIDTH-\cf7 18\cf4 -BTN_RANG_UP*\cf7 2\cf4 , JX_SCREEN_TOP -\cf7 18\cf4 -BTN_RANG_UP*\cf7 2\cf4 , \cf7 18\cf4 +BTN_RANG_UP*\cf7 2\cf4 , \cf7 18\cf4 +BTN_RANG_UP*\cf7 2\cf4 )];\
- [btn1 addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (createRoom) forControlEvents:UIControlEventTouchUpInside];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableHeader addSubview:btn1];\
- \
- btn = [UIFactory createButtonWithImage:\cf6 @"chat_more_black"\cf4 \
- highlight:
- \f2\b \cf8 nil
- \f0\b0 \cf4 \
- target:
- \f2\b \cf8 self
- \f0\b0 \cf4 \
- selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (createRoom)];\
- btn.custom_acceptEventInterval = \cf7 1.0f\cf4 ;\
- btn.frame = CGRectMake(BTN_RANG_UP, BTN_RANG_UP, \cf7 18\cf4 , \cf7 18\cf4 );\
- [btn1 addSubview:btn];\
- \
- UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeSystem];\
- [rightBtn setImage:[UIImage imageNamed:\cf6 @"chat_more_black"\cf4 ] forState:UIControlStateNormal];\
- [rightBtn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (createRoom) forControlEvents:UIControlEventTouchUpInside];\
- rightBtn.frame=CGRectMake(\cf7 1\cf4 , \cf7 1\cf4 , \cf7 40\cf4 , \cf7 36\cf4 );\
- UIBarButtonItem *rightBarBtn = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .navigationItem.rightBarButtonItem = rightBarBtn;\
- \}\
- \
- _audioIcon = [[UIImageView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , JX_SCREEN_TOP - \cf7 30\cf4 , \cf7 16\cf4 , \cf7 16\cf4 )];\
- _audioIcon.image = [UIImage imageNamed:\cf6 @"audioIcon"\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableHeader addSubview:_audioIcon];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 || [chatPerson.userId rangeOfString:MY_USER_ID].location != NSNotFound ||
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages ||
- \f2\b \cf8 self
- \f0\b0 \cf4 .isHiddenFooter) \{\
- \cf2 // readDelBut.hidden = YES;\cf4 \
- btn.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- btn1.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 /*\cf4 \
- \cf2 if (self.isGroupMessages) \{\cf4 \
- \cf2 self.isShowHeaderPull = NO;\cf4 \
- \cf2 UIView *friendNamesView = [[UIView alloc] initWithFrame:CGRectMake(0, self.tableView.frame.origin.y, JX_SCREEN_WIDTH, 0)];\cf4 \
- \cf2 friendNamesView.backgroundColor = [UIColor whiteColor];\cf4 \
- \cf2 [self.view addSubview:friendNamesView];\cf4 \
- \cf2 \cf4 \
- \cf2 UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(15, 15, 300, 20)];\cf4 \
- \cf2 label.font = [UIFont systemFontOfSize:15.0];\cf4 \
- \cf2 label.textColor = [UIColor lightGrayColor];\cf4 \
- \cf2 label.text = [NSString stringWithFormat:Localized(@"JX_YouWillSendMessagesToFriends"),_userIds.count];\cf4 \
- \cf2 [friendNamesView addSubview:label];\cf4 \
- \cf2 \cf4 \
- \cf2 NSMutableString *names = [NSMutableString string];\cf4 \
- \cf2 for (NSInteger i = 0; i < _userNames.count; i ++) \{\cf4 \
- \cf2 NSString *str = _userNames[i];\cf4 \
- \cf2 if (i == 0) \{\cf4 \
- \cf2 [names appendString:[NSString stringWithFormat:@"[\\"%@",str]];\cf4 \
- \cf2 \}\cf4 \
- \cf2 else if (i == _userNames.count - 1) \{\cf4 \
- \cf2 [names appendString:[NSString stringWithFormat:@",%@\\"]", str]];\cf4 \
- \cf2 \}\cf4 \
- \cf2 else \{\cf4 \
- \cf2 [names appendString:[NSString stringWithFormat:@",%@", str]];\cf4 \
- \cf2 \}\cf4 \
- \cf2 if (_userNames.count == 1) \{\cf4 \
- \cf2 [names appendString:@"\\"]"];\cf4 \
- \cf2 \}\cf4 \
- \cf2 \}\cf4 \
- \cf2 \cf4 \
- \cf2 CGSize size = [names boundingRectWithSize:CGSizeMake(friendNamesView.frame.size.width - 30, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@\{NSFontAttributeName : [UIFont systemFontOfSize:17.0]\} context:nil].size;\cf4 \
- \cf2 \cf4 \
- \cf2 CGFloat height = 0;\cf4 \
- \cf2 if (size.height > 200) \{\cf4 \
- \cf2 height = 200;\cf4 \
- \cf2 \}else \{\cf4 \
- \cf2 height = size.height;\cf4 \
- \cf2 \}\cf4 \
- \cf2 UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame: CGRectMake(15, CGRectGetMaxY(label.frame) + 10, friendNamesView.frame.size.width - 30, height)];\cf4 \
- \cf2 [friendNamesView addSubview:scrollView];\cf4 \
- \cf2 \cf4 \
- \cf2 UILabel *namesLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, friendNamesView.frame.size.width - 30, size.height)];\cf4 \
- \cf2 namesLabel.font = [UIFont systemFontOfSize:17.0];\cf4 \
- \cf2 namesLabel.textColor = [UIColor blackColor];\cf4 \
- \cf2 namesLabel.numberOfLines = 0;\cf4 \
- \cf2 namesLabel.text = names;\cf4 \
- \cf2 [scrollView addSubview:namesLabel];\cf4 \
- \cf2 scrollView.contentSize = CGSizeMake(namesLabel.frame.size.width, size.height);\cf4 \
- \cf2 \cf4 \
- \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 \
- \cf2 NSLog(@"%@", friendNamesView);\cf4 \
- \cf2 \}\cf4 \
- \cf2 */\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isShowHeaderPull =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- UIView *friendNamesView = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableView.frame.origin.y, JX_SCREEN_WIDTH, \cf7 0\cf4 )];\
- friendNamesView.backgroundColor = [UIColor whiteColor];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .view addSubview:friendNamesView];\
- \
- UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 15\cf4 , \cf7 15\cf4 , \cf7 300\cf4 , \cf7 20\cf4 )];\
- label.font = [UIFont systemFontOfSize:\cf7 15.0\cf4 ];\
- label.textColor = [UIColor lightGrayColor];\
- label.text = [NSString stringWithFormat:Localized(\cf6 @"JX_YouWillSendMessagesToFriends"\cf4 ),_userIds.count];\
- [friendNamesView addSubview:label];\
- \
- _names = [NSMutableString string];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _userNames.count; i ++) \{\
- NSString *str = _userNames[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (i == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
- [_names appendString:\cf6 @"
- \f1 \'ba\'c3\'d3\'d1
- \f0 : "\cf4 ];\
- \}\
- [_names appendString:[NSString stringWithFormat:\cf6 @"[\\"%@"\cf4 ,str]];\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (i == _userNames.count - \cf7 1\cf4 ) \{\
- [_names appendString:[NSString stringWithFormat:\cf6 @",%@\\"]"\cf4 , str]];\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [_names appendString:[NSString stringWithFormat:\cf6 @",%@"\cf4 , str]];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_userNames.count == \cf7 1\cf4 ) \{\
- [_names appendString:\cf6 @"\\"]"\cf4 ];\
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
- label.text = \cf6 @"
- \f1 \'c4\'e3\'bd\'ab\'b7\'a2\'cf\'fb\'cf\'a2\'b8\'f8\'a3\'ba
- \f0 "\cf4 ;\
- NSMutableString *nameStr = [NSMutableString string];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _userNmaesWithFriend.count; i ++) \{\
- NSString *str = _userNmaesWithFriend[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (i == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
- [nameStr appendString:\cf6 @"
- \f1 \'b1\'ea\'c7\'a9
- \f0 : "\cf4 ];\
- \}\
- [nameStr appendString:[NSString stringWithFormat:\cf6 @"[\\"%@"\cf4 ,str]];\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (i == _userNmaesWithFriend.count - \cf7 1\cf4 ) \{\
- [nameStr appendString:[NSString stringWithFormat:\cf6 @",%@\\"]"\cf4 , str]];\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [nameStr appendString:[NSString stringWithFormat:\cf6 @",%@"\cf4 , str]];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_userNmaesWithFriend.count == \cf7 1\cf4 ) \{\
- [nameStr appendString:\cf6 @"\\"]"\cf4 ];\
- \}\
- \}\
- _names = nameStr;\
- \}\
- \
- CGSize size = [_names boundingRectWithSize:CGSizeMake(friendNamesView.frame.size.width - \cf7 30\cf4 , MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:\cf7 @\{\cf4 NSFontAttributeName : [UIFont systemFontOfSize:\cf7 17.0\cf4 ]\cf7 \}\cf4 context:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ].size;\
- \
- CGFloat height = \cf7 0\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (size.height > \cf7 200\cf4 ) \{\
- height = \cf7 200\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- height = size.height;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
- height += \cf7 40\cf4 ;\
- \}\
- \
- UIScrollView *scrollView;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
- scrollView = [[UIScrollView alloc] initWithFrame: CGRectMake(\cf7 15\cf4 , CGRectGetMaxY(label.frame) + \cf7 10\cf4 , friendNamesView.frame.size.width - \cf7 30\cf4 , \cf7 70\cf4 )];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- scrollView = [[UIScrollView alloc] initWithFrame: CGRectMake(\cf7 15\cf4 , CGRectGetMaxY(label.frame) + \cf7 10\cf4 , friendNamesView.frame.size.width - \cf7 30\cf4 , height)];\
- \}\
- \
- \cf2 // UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame: CGRectMake(15, CGRectGetMaxY(label.frame) + 10, friendNamesView.frame.size.width - 30, height)];\cf4 \
- [friendNamesView addSubview:scrollView];\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
- size.height = \cf7 30\cf4 ;\
- \}\
- UILabel *namesLabel = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 15\cf4 , \cf7 0\cf4 , friendNamesView.frame.size.width - \cf7 30\cf4 , size.height)];\
- \
- namesLabel.font = [UIFont systemFontOfSize:\cf7 17.0\cf4 ];\
- namesLabel.textColor = [UIColor blackColor];\
- namesLabel.numberOfLines = \cf7 0\cf4 ;\
- namesLabel.text = _names;\
- [scrollView addSubview:namesLabel];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
- _names2 = [NSMutableString string];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _userNamesWithGroup.count; i ++) \{\
- NSString *str = _userNamesWithGroup[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (i == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
- [_names2 appendString:\cf6 @"
- \f1 \'c8\'ba\'d7\'e9
- \f0 : "\cf4 ];\
- \}\
- [_names2 appendString:[NSString stringWithFormat:\cf6 @"[\\"%@"\cf4 ,str]];\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (i == _userNamesWithGroup.count - \cf7 1\cf4 ) \{\
- [_names2 appendString:[NSString stringWithFormat:\cf6 @",%@\\"]"\cf4 , str]];\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [_names2 appendString:[NSString stringWithFormat:\cf6 @",%@"\cf4 , str]];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_userNamesWithGroup.count == \cf7 1\cf4 ) \{\
- [_names2 appendString:\cf6 @"\\"]"\cf4 ];\
- \}\
- \}\
- \
- \
- \
- UILabel *namesLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 15\cf4 , namesLabel.frame.origin.y + size.height, friendNamesView.frame.size.width - \cf7 30\cf4 , \cf7 30\cf4 )];\
- namesLabel2.font = [UIFont systemFontOfSize:\cf7 17.0\cf4 ];\
- namesLabel2.textColor = [UIColor blackColor];\
- namesLabel2.numberOfLines = \cf7 0\cf4 ;\
- namesLabel2.text = _names2;\
- [scrollView addSubview:namesLabel2];\
- \
- size.height = \cf7 400\cf4 ;\
- \}\
- \
- scrollView.contentSize = CGSizeMake(namesLabel.frame.size.width, size.height);\
- \
- friendNamesView.frame = CGRectMake(friendNamesView.frame.origin.x, friendNamesView.frame.origin.y, friendNamesView.frame.size.width, scrollView.frame.origin.y + scrollView.frame.size.height + \cf7 15\cf4 );\
- NSLog(\cf6 @"%@"\cf4 , friendNamesView);\
- \}\
- \
- \cf2 //
- \f1 \'bd\'d8\'c6\'c1
- \f0 \cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView = [[UIView alloc] initWithFrame:CGRectMake(JX_SCREEN_WIDTH - \cf7 80\cf4 - \cf7 10\cf4 , \cf7 100\cf4 , \cf7 80\cf4 , \cf7 130\cf4 )];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.backgroundColor = [UIColor whiteColor];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.layer.cornerRadius = \cf7 5.0\cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.layer.masksToBounds =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .view addSubview:
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView];\
- \
- UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (screenShotViewAction:)];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView addGestureRecognizer:tap];\
- \
- UILabel *screenShotLabel = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 5\cf4 , \cf7 0\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.size.width - \cf7 10\cf4 , \cf7 40\cf4 )];\
- screenShotLabel.font = [UIFont systemFontOfSize:\cf7 11.0\cf4 ];\
- screenShotLabel.numberOfLines = \cf7 0\cf4 ;\
- screenShotLabel.text = Localized(\cf6 @"JX_ThePhotosYouMightWantToSend"\cf4 );\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView addSubview:screenShotLabel];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotImageView = [[UIImageView alloc] initWithFrame:CGRectMake(\cf7 5\cf4 , CGRectGetMaxY(screenShotLabel.frame),
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.size.width - \cf7 10\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.size.height - screenShotLabel.frame.size.height - \cf7 5\cf4 )];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotImageView.layer.cornerRadius = \cf7 5.0\cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotImageView.layer.masksToBounds =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \cf2 // self.screenShotImageView.image = [UIImage imageWithContentsOfFile:ScreenShotImage];\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView addSubview:
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotImageView];\
- \
- \cf2 //
- \f1 \'d0\'c2\'cf\'fb\'cf\'a2\'cc\'f8\'d7\'aa
- \f0 \cf4 \
- _jumpNewMsgBtn = [[UIButton alloc] initWithFrame:CGRectMake(JX_SCREEN_WIDTH - \cf7 105\cf4 , JX_SCREEN_TOP + \cf7 20\cf4 , \cf7 120\cf4 , \cf7 30\cf4 )];\
- _jumpNewMsgBtn.backgroundColor = [UIColor whiteColor];\
- _jumpNewMsgBtn.layer.cornerRadius = _jumpNewMsgBtn.frame.size.height / \cf7 2\cf4 ;\
- _jumpNewMsgBtn.layer.masksToBounds =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [_jumpNewMsgBtn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (jumpNewMsgBtnAction) forControlEvents:UIControlEventTouchUpInside];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .view addSubview:_jumpNewMsgBtn];\
- \
- UILabel *newMsgLabel = [[UILabel alloc] initWithFrame:_jumpNewMsgBtn.bounds];\
- newMsgLabel.text = [NSString stringWithFormat:\cf6 @"%d%@"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .newMsgCount,Localized(\cf6 @"JX_NewMessages"\cf4 )];\
- newMsgLabel.font = [UIFont systemFontOfSize:\cf7 13.0\cf4 ];\
- newMsgLabel.textAlignment = NSTextAlignmentCenter;\
- newMsgLabel.textColor = HEXCOLOR(\cf7 0x4FC557\cf4 );\
- [_jumpNewMsgBtn addSubview:newMsgLabel];\
- \
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(\cf7 10\cf4 , \cf7 10\cf4 , \cf7 10\cf4 , \cf7 10\cf4 )];\
- imageView.image = [UIImage imageNamed:\cf6 @"doubleArrow_up"\cf4 ];\
- [_jumpNewMsgBtn addSubview:imageView];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .newMsgCount > \cf7 20\cf4 ) \{\
- _jumpNewMsgBtn.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _jumpNewMsgBtn.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 setAudioIconFrame\cf4 \{\
- \
- CGSize size = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .title boundingRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:\cf7 @\{\cf4 NSFontAttributeName:[UIFont systemFontOfSize:\cf7 18.0\cf4 ]\cf7 \}\cf4 context:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ].size;\
- CGFloat x = JX_SCREEN_WIDTH/\cf7 2\cf4 + size.width/\cf7 2\cf4 + \cf7 2\cf4 ;\
- _audioIcon.frame = CGRectMake(x, _audioIcon.frame.origin.y, _audioIcon.frame.size.width, _audioIcon.frame.size.height);\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 flag = [g_default boolForKey:kChatVCMessageAudioIsNotPlayback];\
- _audioIcon.hidden = !flag;\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 setupMoreView\cf4 :(NSArray *)array \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (array !=
- \f2\b \cf8 nil
- \f0\b0 \cf4 ) \{\
- [_recordBtnLeft setBackgroundImage:[UIImage imageNamed:\cf6 @"chat_back_reply"\cf4 ] forState:UIControlStateNormal];\
- [_recordBtnLeft removeTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (recordSwitch:) forControlEvents:UIControlEventTouchUpInside];\
- [_recordBtnLeft addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onBackToDefault) forControlEvents:UIControlEventTouchUpInside];\
- \
- _helperArr = array;\
- \cf2 //
- \f1 \'c8\'ba\'d6\'fa\'ca\'d6\'ca\'c2\'bc\'fe
- \f0 \cf4 \
- _moreView.onGroupHelperList =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onGroupHelperList);\
- _moreView.onDidView =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onDidView:);\
- _moreView.helpers = array;\
- _moreView.scrollView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _moreView.helperScrollV.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- [_recordBtnLeft setBackgroundImage:[UIImage imageNamed:\cf6 @"im_input_ptt_normal"\cf4 ] forState:UIControlStateNormal];\
- [_recordBtnLeft setBackgroundImage:[UIImage imageNamed:\cf6 @"im_input_keyboard_normal"\cf4 ] forState:UIControlStateSelected];\
- [_recordBtnLeft removeTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onBackToDefault) forControlEvents:UIControlEventTouchUpInside];\
- [_recordBtnLeft addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (recordSwitch:) forControlEvents:UIControlEventTouchUpInside];\
- \
- _moreView.scrollView.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _moreView.helperScrollV.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [_moreView resetPageControl];\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onBackToDefault\cf4 \{\
- \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setupMoreView:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [inputBar mas_makeConstraints:^(MASConstraintMaker *make) \{\
- make.bottom.mas_equalTo(-(JX_SCREEN_HEIGHT>=\cf7 812\cf4 ?\cf7 40\cf4 :\cf7 10\cf4 ));\
- make.left.right.mas_equalTo(\cf7 0\cf4 );\
- make.height.mas_equalTo(tableBarHHH);\
- \
- \}];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onDidView\cf4 :(JXSelectImageView *)moreView \{\
- JXGroupHeplerModel *model = _helperArr[moreView.viewIndex];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (moreView.isDidSet) \{\
- JXAutoReplyAideVC *vc = [[JXAutoReplyAideVC alloc] init];\
- vc.model = model.helperModel;\
- vc.roomId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomId;\
- vc.roomJid =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (model.helperModel.urlScheme && model.helperModel.urlScheme.length > \cf7 0\cf4 ) \{\
- NSString *url = [NSString stringWithFormat:\cf6 @"%@://roomId=%@&userId=%@"\cf4 ,model.helperModel.urlScheme,
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomId,g_myself.userId];\
- \
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url] options:
- \f2\b \cf8 nil
- \f0\b0 \cf4 completionHandler:^(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 success) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!success) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 didViewActionWithModel:model];\
- \}\
- \}];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 didViewActionWithModel:model];\
- \}\
- \
- \
- \}\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 didViewActionWithModel\cf4 :(JXGroupHeplerModel *)model \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (model.helperModel.type == \cf7 1\cf4 ) \{ \cf2 //
- \f1 \'d7\'d4\'b6\'af\'bb\'d8\'b8\'b4
- \f0 \cf4 \
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (model.helperModel.type == \cf7 2\cf4 ) \{\cf2 //
- \f1 \'cd\'f8\'d2\'b3
- \f0 \cf4 \
- \
- NSDictionary *dict = \cf7 @\{\cf4 \
- \cf6 @"roomId"\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomId,\
- \cf6 @"roomJid"\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid,\
- \cf6 @"userId"\cf4 : g_myself.userId\
- \cf7 \}\cf4 ;\
- NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dict options:NSJSONWritingPrettyPrinted error:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- NSString *json = [[NSString alloc]initWithData:jsonData encoding:NSUTF8StringEncoding];\
- \
- webpageVC *webVC = [webpageVC alloc];\
- webVC.isGotoBack=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.shareParam = json;\
- webVC.title = model.helperModel.name;\
- NSString * url = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,model.helperModel.link];\
- url = [url stringByReplacingOccurrencesOfString:\cf6 @" "\cf4 withString:\cf6 @""\cf4 ];\
- url = [url stringByReplacingOccurrencesOfString:\cf6 @"\\t"\cf4 withString:\cf6 @""\cf4 ];\
- webVC.url = url;\
- webVC = [webVC init];\
- [g_navigation.navigationView addSubview:webVC.view];\
- \
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (model.helperModel.type == \cf7 3\cf4 ) \{\cf2 //
- \f1 \'b5\'e3\'bb\'f7\'b7\'a2\'cb\'cd
- \f0 \cf4 \
- NSMutableDictionary *dict = \cf7 @\{\cf6 @"url"\cf4 :model.helperModel.url,\
- \cf6 @"appName"\cf4 :model.helperModel.appName,\
- \cf6 @"subTitle"\cf4 :model.helperModel.subTitle,\
- \cf7 \}\cf4 .mutableCopy;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (model.helperModel.imageUrl.length > \cf7 0\cf4 ) \{\
- [dict addEntriesFromDictionary:\cf7 @\{\cf6 @"imageUrl"\cf4 :model.helperModel.imageUrl\cf7 \}\cf4 ];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (model.helperModel.appIcon.length > \cf7 0\cf4 ) \{\
- [dict addEntriesFromDictionary:\cf7 @\{\cf6 @"appIcon"\cf4 :model.helperModel.appIcon\cf7 \}\cf4 ];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (model.helperModel.downloadUrl.length > \cf7 0\cf4 ) \{\
- [dict addEntriesFromDictionary:\cf7 @\{\cf6 @"downloadUrl"\cf4 :model.helperModel.downloadUrl\cf7 \}\cf4 ];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (model.helperModel.title.length > \cf7 0\cf4 ) \{\
- [dict addEntriesFromDictionary:\cf7 @\{\cf6 @"title"\cf4 :model.helperModel.title\cf7 \}\cf4 ];\
- \}\
- \
- SBJsonWriter *writer = [[SBJsonWriter alloc] init];\
- NSString *content = [writer stringWithObject:dict];\
- \
- \cf2 // JXMessageObject *msg = [[JXMessageObject alloc] init];\cf4 \
- \cf2 // msg.timeSend = [NSDate date];\cf4 \
- \cf2 // msg.fromUserId = g_myself.userId;\cf4 \
- \cf2 // msg.toUserId = model.roomJid;\cf4 \
- \cf2 // msg.objectId = content;\cf4 \
- \cf2 // msg.type = [NSNumber numberWithInt:kWCMessageTypeShare];\cf4 \
- \cf2 // [msg insert:model.roomJid];\cf4 \
- \cf2 // [self showOneMsg:msg];\cf4 \
- \cf2 // [g_xmpp sendMessage:msg roomName:model.roomId];\cf4 \
- \
- \
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \
- msg.objectId = content;\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeShare];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- msg.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.tempChat=\cf7 1\cf4 ;\
- \}\
- \cf2 //
- \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
- \f0 \cf4 \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}\
- \}\
- \
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 viewWillAppear\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )animated\{\
- [
- \f2\b \cf8 super
- \f0\b0 \cf4 viewWillAppear:animated];\
- \cf2 //
- \f1 \'bd\'f8\'c8\'eb\'bd\'e7\'c3\'e6\'bc\'b4\'bf\'aa\'c6\'f4\'b6\'a8\'ca\'b1\'c6\'f7
- \f0 \cf4 \
- _strURLGoback=\cf6 @"1000"\cf4 ;\
- \cf2 //[self.tableView reloadData];\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .noticeTimer setFireDate:[NSDate distantPast]];\
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 2\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
- \
- \cf2 // [self refresh:nil];\cf4 \
- \});\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isOpen = [g_default boolForKey:kgoucaiComePush];\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isOpen2 = [g_default boolForKey:kGuanXinComePush];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isOpen==\cf7 1\cf4 && isOpen2==\cf7 1\cf4 ) \{\
- _noticeView2.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _noticeViewScrollView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (isOpen==\cf7 1\cf4 && isOpen2==\cf7 0\cf4 ) \{\
- \
- \cf2 // _table.contentInset = UIEdgeInsetsMake(38, 0, 0, 0);\cf4 \
- _noticeViewScrollView.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _noticeViewScrollView.frame=CGRectMake(\cf7 0\cf4 , \cf7 44\cf4 , JX_SCREEN_WIDTH, \cf7 37\cf4 );\
- _noticeView2.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (isOpen==\cf7 0\cf4 && isOpen2==\cf7 1\cf4 )\{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ( _biaotishifoBC==\cf7 1111\cf4 ) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([_lotterDict[\cf6 @"lottery"\cf4 ] intValue]==\cf7 1\cf4 ) \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .showTopView.xiaLineView.hidden=
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _noticeView2.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _noticeViewScrollView.frame=CGRectMake(\cf7 0\cf4 , \cf7 44\cf4 +\cf7 37\cf4 , JX_SCREEN_WIDTH, \cf7 37\cf4 );\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- _noticeViewScrollView.frame=CGRectMake(\cf7 0\cf4 , \cf7 44\cf4 , JX_SCREEN_WIDTH, \cf7 37\cf4 );\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .showTopView.xiaLineView.hidden=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _noticeView2.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .showTopView.xiaLineView.hidden=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- _noticeView2.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- _noticeViewScrollView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (isOpen==\cf7 0\cf4 && isOpen2==\cf7 0\cf4 ) \{\
- _noticeViewScrollView.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .showTopView.xiaLineView.hidden=
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([_lotterDict[\cf6 @"lottery"\cf4 ] intValue]==\cf7 1\cf4 ) \{\
- \
- _noticeView2.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _noticeViewScrollView.frame=CGRectMake(\cf7 0\cf4 , \cf7 44\cf4 +\cf7 37\cf4 , JX_SCREEN_WIDTH, \cf7 37\cf4 );\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- _noticeViewScrollView.frame=CGRectMake(\cf7 0\cf4 , \cf7 44\cf4 , JX_SCREEN_WIDTH, \cf7 37\cf4 );\
- _noticeView2.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- \
- \}\
- \
- \
- \cf2 // [g_notify removeObserver:self];\cf4 \
- \
- \cf2 //[g_notify addObserver:self selector:@selector(roomGroupActivityRefresh:) name:kRoomGroupActivityRefresh object:nil];\cf4 \
- \}\
- \
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 viewDidDisappear\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )animated \{\
- [
- \f2\b \cf8 super
- \f0\b0 \cf4 viewDidDisappear:animated];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .showLongViewc removeFromSuperview];\
- _strURLGoback=\cf6 @""\cf4 ;\
- _keyboardHeight=\cf7 0\cf4 ;\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .lastMsg.fromUserId=\cf6 @""\cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .showLongViewc.hidden=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \cf2 //
- \f1 \'cd\'cb\'b3\'f6\'bd\'e7\'c3\'e6\'bc\'b4\'b9\'d8\'b1\'d5\'b6\'a8\'ca\'b1\'c6\'f7
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .noticeTimer setFireDate:[NSDate distantFuture]];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 viewWillDisappear\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )animated \{\
- [
- \f2\b \cf8 super
- \f0\b0 \cf4 viewWillDisappear:animated];\
- [[UIApplication sharedApplication] setStatusBarHidden:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- _strURLGoback=\cf6 @""\cf4 ;\
- \
- \cf2 // [_floating hide];\cf4 \
- \}\
- \
- \
- \cf2 //json
- \f1 \'b8\'f1\'ca\'bd\'d7\'d6\'b7\'fb\'b4\'ae\'d7\'aa\'d7\'d6\'b5\'e4\'a3\'ba
- \f0 \cf4 \
- \
- - (NSArray *)\cf11 dictionaryWithJsonString\cf4 :(NSString *)jsonString \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (jsonString ==
- \f2\b \cf8 nil
- \f0\b0 \cf4 ) \{\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \
- \}\
- \
- NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];\
- \
- NSError *err;\
- \
- NSArray *dic = [NSJSONSerialization JSONObjectWithData:jsonData\
- \
- options:NSJSONReadingMutableContainers\
- \
- error:&err];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (err) \{\
- \
- NSLog(\cf6 @"json
- \f1 \'bd\'e2\'ce\'f6\'ca\'a7\'b0\'dc\'a3\'ba
- \f0 %@"\cf4 ,err);\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \
- \}\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 dic;\
- \
- \}\
- \cf12 /**
- \f1 \cf2 \'b5\'e3\'bb\'f7
- \f3
- \f1 \'d1\'a1\'d4\'f1
- \f3 */
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 notice2ndClick\cf4 \{\
- \
- JLSelectView *customView = [[JLSelectView alloc] init];\
- customView.backgroundColor=[UIColor cyanColor];\
-
- \f2\b \cf8 __weak
- \f0\b0 \cf4
- \f2\b \cf8 __typeof
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 )weakSelf =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- customView.returnModelBlock = ^(JLSelectModel *model, NSIndexPath *indexPath) \{\
- NSString *title = [NSString stringWithFormat:\cf6 @"%@:"\cf4 , model.data[indexPath.row].subName];\
- [weakSelf.selectButton setTitle:title forState:(UIControlStateNormal)];\
- [weakSelf.container dismiss];\
- \cf2 //
- \f1 \'b1\'a3\'b4\'e6
- \f0 key\cf4 \
- \cf2 //[g_default set];\cf4 \
- JXLabelObject *obj = [JXLabelObject sharedInstance];\
- obj.roomJid = weakSelf.roomJid;\
- obj.selectItem = [NSString stringWithFormat:\cf6 @"%@-%@"\cf4 , model.name, model.data[indexPath.row].subName];\
- [obj updateRecordGroupAnnouncementSelectItem];\
- NSLog(\cf6 @"
- \f1 \'d1\'a1\'d4\'f1\'c1\'cb
- \f0
- \f1 \'bf\'aa\'bd\'b1\'c0\'e0\'d0\'cd
- \f0 %@ -%@-%@"\cf4 ,model.data[indexPath.row].subType , model.name,model.data[indexPath.row].content);\
- \
- JLSelectItemModel *selectItemModel = model.data[indexPath.row];\
- \
- NSString *titleName = [NSString stringWithFormat:\cf6 @" %@"\cf4 ,selectItemModel.subName];\
- \
- [_showTopView.caizongBtn setTitle:titleName forState:UIControlStateNormal];\
- _showTopView.selectItemModel=selectItemModel;\
- \
- \
- \};\
- \
- JXLabelObject *obj = [JXLabelObject sharedInstance];\
- obj.roomJid =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- NSString *groupAnnouncement = [obj fetchAllGroupAnnouncementFromLocal];\
- NSArray *response = [
- \f2\b \cf8 self
- \f0\b0 \cf4 dictionaryWithJsonString: groupAnnouncement];\
- \
- customView.dataArray = response.copy;\
- \cf2 /* customView.dataArray = @[\cf4 \
- \cf2 @\{\cf4 \
- \cf2 @"name":@"
- \f1 \'b9\'d9\'b7\'bd
- \f0 ",\cf4 \
- \cf2 @"data":@[\cf4 \
- \cf2 @\{@"subName":@"
- \f1 \'d2\'bb\'b7\'d6\'c8\'fc\'b3\'b5
- \f0 111111111111111111",@"content":@"
- \f1 \'d2\'bb\'b7\'d6\'c8\'fc\'b3\'b5
- \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
- \f0 "\},\cf4 \
- \cf2 @\{@"subName":@"
- \f1 \'b6\'fe\'b7\'d6\'c8\'fc\'b3\'b5
- \f0 ",@"content":@"
- \f1 \'b6\'fe\'b7\'d6\'c8\'fc\'b3\'b5
- \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
- \f0 "\},\cf4 \
- \cf2 @\{@"subName":@"
- \f1 \'c8\'fd\'b7\'d6\'c8\'fc\'b3\'b5
- \f0 ",@"content":@"
- \f1 \'c8\'fd\'b7\'d6\'c8\'fc\'b3\'b5
- \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
- \f0 "\},\cf4 \
- \cf2 @\{@"subName":@"
- \f1 \'cb\'c4\'b7\'d6\'c8\'fc\'b3\'b5
- \f0 ",@"content":@"
- \f1 \'cb\'c4\'b7\'d6\'c8\'fc\'b3\'b5
- \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
- \f0 "\},\cf4 \
- \cf2 @\{@"subName":@"
- \f1 \'d2\'bb\'b7\'d6\'c8\'fc\'b3\'b5
- \f0 ",@"content":@"
- \f1 \'d2\'bb\'b7\'d6\'c8\'fc\'b3\'b5
- \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
- \f0 "\},\cf4 \
- \cf2 @\{@"subName":@"
- \f1 \'b6\'fe\'b7\'d6\'c8\'fc\'b3\'b5
- \f0 ",@"content":@"
- \f1 \'b6\'fe\'b7\'d6\'c8\'fc\'b3\'b5
- \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
- \f0 "\},\cf4 \
- \cf2 @\{@"subName":@"
- \f1 \'c8\'fd\'b7\'d6\'c8\'fc\'b3\'b5
- \f0 ",@"content":@"
- \f1 \'c8\'fd\'b7\'d6\'c8\'fc\'b3\'b5
- \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
- \f0 "\},\cf4 \
- \cf2 @\{@"subName":@"
- \f1 \'cb\'c4\'b7\'d6\'c8\'fc\'b3\'b5
- \f0 ",@"content":@"
- \f1 \'cb\'c4\'b7\'d6\'c8\'fc\'b3\'b5
- \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
- \f0 "\},\cf4 \
- \cf2 ]\cf4 \
- \cf2 \},\cf4 \
- \cf2 @\{\cf4 \
- \cf2 @"name":@"
- \f1 \'b4\'ab\'cd\'b3
- \f0 ",\cf4 \
- \cf2 @"data":@[\cf4 \
- \cf2 @\{@"subName":@"
- \f1 \'d2\'bb\'b7\'d6\'c8\'fc\'b3\'b5
- \f0 ",@"content":@"
- \f1 \'d2\'bb\'b7\'d6\'c8\'fc\'b3\'b5
- \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
- \f0 "\},\cf4 \
- \cf2 @\{@"subName":@"
- \f1 \'b6\'fe\'b7\'d6\'c8\'fc\'b3\'b5
- \f0 ",@"content":@"
- \f1 \'b6\'fe\'b7\'d6\'c8\'fc\'b3\'b5
- \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
- \f0 "\},\cf4 \
- \cf2 @\{@"subName":@"
- \f1 \'c8\'fd\'b7\'d6\'c8\'fc\'b3\'b5
- \f0 ",@"content":@"
- \f1 \'c8\'fd\'b7\'d6\'c8\'fc\'b3\'b5
- \f5 1\uc0\u65039 \u8419 2\u65039 \u8419 3\u65039 \u8419
- \f0 "\}\cf4 \
- \cf2 ]\cf4 \
- \cf2 \}];*/\cf4 \
- \
- \
- _container = [[DSHPopupContainer alloc] initWithCustomPopupView:customView];\
- _container.maskColor = [[UIColor blackColor] colorWithAlphaComponent:\cf7 .5\cf4 ];\
- [_container show];\
- \}\
- -(CGSize)\cf11 titleBtnWight\cf4 :(NSString *)titBtnW
- \f2\b \cf8 and
- \f0\b0 \cf4 :(UILabel *)\cf11 titBtn\cf4 \{\
- CGSize titleSize = [titBtnW boundingRectWithSize:CGSizeMake(MAXFLOAT, \cf7 24\cf4 ) options:NSStringDrawingUsesLineFragmentOrigin attributes:\cf7 @\{\cf4 NSFontAttributeName:titBtn.font\cf7 \}\cf4 context:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ].size;\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 titleSize;\
- \}\
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 act_UserRoomAttention\cf4 :(NSNotification *)note\{\
- \
- \
- \}\
- \cf12 /**\cf4 \
- \cf12 *\cf4
- \f1 \cf2 \'b4\'f8\'c7\'f2\'b5\'c4
- \f3 topView
- \f0 \cf4 \
- \cf12 */\cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 tebieBtnClick\cf4 \{\
-
- \f2\b \cf8 __weak
- \f0\b0 \cf4
- \f2\b \cf8 __typeof
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 )weakSelf =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- JxChatGetNoticePersonVc *pervc=[[JxChatGetNoticePersonVc alloc]init];\
- pervc.block = ^(memberData *
- \f2\b \cf8 _Nonnull
- \f0\b0 \cf4 responseObject) \{\
- \
- _backUserId=[NSString stringWithFormat:\cf6 @"%ld"\cf4 ,responseObject.userId];\
- [weakSelf.showTopView.tebieGuanXin setTitle:responseObject.userNickName forState:UIControlStateNormal];\
- \
- \
- \};\
- pervc.dataArr=_dataArrGetGroundPersonArr;\
- pervc.roomID=
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .navigationController pushViewController:pervc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}\
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 tebieBtnClickXX\cf4 \{\
- \
-
- \f2\b \cf8 long
- \f0\b0 \cf4 time = (
- \f2\b \cf8 long
- \f0\b0 \cf4 )[[NSDate date] timeIntervalSince1970];\
- time = (time *\cf7 1000\cf4 + g_server.timeDifference);\
- NSString *salt = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , time];\
- \
- [g_server getUserRoomAttentionattentionLastInfo:salt userId:_backUserId jid:_roomJid andToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- \}\
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showBack\cf4 :(memberData *)msguser\{\
- \
- \cf2 //
- \f1 \'cd\'b7\'b2\'bf
- \f0 \cf4 \
- \cf2 // _noticeView2 = [[UIView alloc] initWithFrame:CGRectMake(0,110, JX_SCREEN_WIDTH, 74)];\cf4 \
- \cf2 // _noticeView2.backgroundColor = [UIColor greenColor];\cf4 \
- \cf2 // [self.view addSubview:_noticeView2];\cf4 \
- \
- \}\
- \cf12 /**\cf4
- \f1 \cf2 \'bb\'f1\'c8\'a1\'cb\'f9\'d2\'d4\'d4\'da\'c8\'ba\'c0\'ef\'c3\'e6
- \f3
- \f1 \'b9\'d8\'d0\'c4\'b5\'c4\'d3\'c3\'bb\'a7
- \f3 */
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 createPerson\cf4 :(memberData *)url \cf11 success\cf4 :(
- \f2\b \cf8 void
- \f0\b0 \cf4 (^)(memberData *responseObject))success\{\
- \
- \}\
- \
- \
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 setupNotice2nd\cf4 \{\
- \
- \
- \cf2 //
- \f1 \'cd\'b7\'b2\'bf
- \f0 \cf4 \
- _noticeView2 = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 ,\cf7 44\cf4 , JX_SCREEN_WIDTH, \cf7 37\cf4 )];\
- _noticeView2.backgroundColor = [UIColor whiteColor];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .view addSubview:_noticeView2];\
- \
- JXtopShowVIew *showTopView=[JXtopShowVIew xibJXtopShowVIew];\
- showTopView.frame= _noticeView2.bounds;\
- [_noticeView2 addSubview:showTopView];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .showTopView=showTopView;\
- \
- showTopView.jxGuanXinBlockBtn = ^(UIButton *btn) \{\
- memberData *modelXXX=_tempArrMM[btn.tag];\
- \
-
- \f2\b \cf8 long
- \f0\b0 \cf4 time = (
- \f2\b \cf8 long
- \f0\b0 \cf4 )[[NSDate date] timeIntervalSince1970];\
- time = (time *\cf7 1000\cf4 + g_server.timeDifference);\
- NSString *salt = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , time];\
- \
- NSString *jid_room=[[NSUserDefaults standardUserDefaults] objectForKey:\cf6 @"jid_roomJid"\cf4 ];\
- \
- [g_server getUserRoomAttentionattentionLastInfo:salt userId:[NSString stringWithFormat:\cf6 @"%ld"\cf4 ,modelXXX.userId] jid:jid_room andToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \};\
- \
- \cf2 //[showTopView.tebieGuanXin addTarget:self action:@selector(tebieBtnClickXX) forControlEvents:UIControlEventTouchUpInside];\cf4 \
- [showTopView.tebieBtn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (tebieBtnClick) forControlEvents:UIControlEventTouchUpInside];\
- \
- \
- \
- JXLabelObject *obj = [JXLabelObject sharedInstance];\
- obj.roomJid =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- NSString *selectItem = [obj fetchGroupAnnouncementSelectItemFromLocal];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (selectItem) \{\
- \cf2 //_table.contentInset = UIEdgeInsetsMake(73, 0, 0, 0);\cf4 \
- NSArray *temp = [selectItem componentsSeparatedByString:\cf6 @"-"\cf4 ];\
- \cf2 //NSString *first = temp.firstObject;\cf4 \
- NSString *last = temp.lastObject;\
- \
- \cf2 //NSString *ganF=[temp.firstObject stringByReplacingOccurrencesOfString:@"
- \f1 \'b2\'ca
- \f0 " withString:@""];\cf4 \
- NSString *titleName = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,last];\
- \
- [showTopView.caizongBtn setTitle:[NSString stringWithFormat:\cf6 @" %@:"\cf4 ,titleName] forState:(UIControlStateNormal)];\
- \cf2 //_noticeViewScrollView.hidden = NO;\cf4 \
- \cf2 //_noticeView2.hidden = NO;\cf4 \
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- \cf2 // _table.contentInset = UIEdgeInsetsMake(40, 0, 0, 0);\cf4 \
- \cf2 //_noticeViewScrollView.hidden = NO;\cf4 \
- \cf2 //_noticeView2.hidden = YES;\cf4 \
- \
- [showTopView.caizongBtn setTitle:\cf6 @"
- \f1 \'bf\'aa\'bd\'b1\'bd\'e1\'b9\'fb
- \f0 "\cf4 forState:(UIControlStateNormal)];\
- \}\
- [showTopView.caizongBtn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (notice2ndClick) forControlEvents:(UIControlEventTouchUpInside)];\
- \
- \
- \
- NSString *groupAnnouncement = [obj fetchAllGroupAnnouncementFromLocal];\
- NSArray *response = [
- \f2\b \cf8 self
- \f0\b0 \cf4 dictionaryWithJsonString: groupAnnouncement];\
- NSMutableArray *modelArray = [NSMutableArray array];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSDictionary *dict
- \f2\b \cf8 in
- \f0\b0 \cf4 response) \{\
- [JLSelectModel mj_setupObjectClassInArray:^NSDictionary *\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 \cf7 @\{\cf4 \
- \cf6 @"data"\cf4 : \cf6 @"JLSelectItemModel"\cf4 \
- \cf7 \}\cf4 ;\
- \}];\
- JLSelectModel *model = [JLSelectModel mj_objectWithKeyValues:dict];\
- [modelArray addObject:model];\
- \}\
- \
- \cf2 //
- \f1 \'b2\'f0\'b7\'d6
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (selectItem) \{\
- NSArray *temp = [selectItem componentsSeparatedByString:\cf6 @"-"\cf4 ];\
- NSString *first = temp.firstObject;\
- NSString *last = temp.lastObject;\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (JLSelectModel *model
- \f2\b \cf8 in
- \f0\b0 \cf4 modelArray) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([model.name isEqualToString:first]) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (JLSelectItemModel *selectItemModel
- \f2\b \cf8 in
- \f0\b0 \cf4 model.data) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([selectItemModel.subName isEqualToString:last]) \{\
- groupAnnouncement = selectItemModel.content;\
- showTopView.selectItemModel=selectItemModel;\
- \cf2 //--\cf4 \
- \}\
- \}\
- \}\
- \}\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 // groupAnnouncement = @"";\cf4 \
- \}\
- \
- \
- \
- NSString *allGroupAnnouncement = [obj fetchAllGroupAnnouncementFromLocal];\
- \cf2 //\cf4 \
- \cf2 // if (allGroupAnnouncement == nil) \{\cf4 \
- \cf2 // _noticeView2.hidden = YES;\cf4 \
- \cf2 // \}else \{\cf4 \
- \cf2 // _noticeView2.hidden = NO;\cf4 \
- \cf2 // \}\cf4 \
- \
- \
- \
- \
- \}\
- \
- \cf12 /**\cf4 \
- \cf12 *\cf4
- \f1 \cf2 \'cc\'f8\'d7\'aa\'b9\'d8\'d7\'a2\'ba\'c3\'d3\'d1\'c1\'d0\'b1\'ed
- \f0 \cf4 \
- \cf12 */\cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 attionBtnCLick\cf4 \{\
- \
- \
- \
- \
-
- \f2\b \cf8 __weak
- \f0\b0 \cf4
- \f2\b \cf8 __typeof
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 )weakSelf =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- JxChatGetNoticePersonVc *pervc=[[JxChatGetNoticePersonVc alloc]init];\
- pervc.block = ^(memberData *
- \f2\b \cf8 _Nonnull
- \f0\b0 \cf4 responseObject) \{\
- \
- _backUserId=[NSString stringWithFormat:\cf6 @"%ld"\cf4 ,responseObject.userId];\
- [weakSelf.attioPersonBtn setTitle:responseObject.userNickName forState:UIControlStateNormal];\
- \
- \};\
- pervc.dataArr=_dataArrGetGroundPersonArr;\
- pervc.roomID=
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .navigationController pushViewController:pervc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}\
- \cf2 //
- \f1 \'d7\'ee\'d0\'c2\'b9\'e3\'b8\'e6
- \f0 UI\cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 setupNotice\cf4 \{\
- CGFloat noticHHH=\cf7 37\cf4 ;\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isOpen = [g_default boolForKey:kgoucaiComePush];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isOpen==\cf7 1\cf4 ) \{\
- noticHHH=\cf7 0\cf4 ;\
- \}\
- UIScrollView *noticeViewScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , noticHHH, JX_SCREEN_WIDTH, \cf7 37\cf4 )];\
- noticeViewScrollView.backgroundColor=kRGBColor(\cf7 246\cf4 , \cf7 246\cf4 , \cf7 246\cf4 );\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .view addSubview:noticeViewScrollView];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .noticeViewScrollView=noticeViewScrollView;\
- \
- UIView *lineView1 = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, \cf7 1\cf4 )];\
- lineView1.backgroundColor=[UIColor whiteColor];\
- [noticeViewScrollView addSubview:lineView1];\
- \
- \
- UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 36\cf4 , JX_SCREEN_WIDTH, \cf7 1\cf4 )];\
- lineView.backgroundColor=[UIColor grayColor];\
- [noticeViewScrollView addSubview:lineView];\
- \
- UIButton *attionBtn=[[UIButton alloc]initWithFrame:CGRectMake(\cf7 10\cf4 , \cf7 8\cf4 , \cf7 80\cf4 , \cf7 24\cf4 )];\
- [attionBtn setTitle:\cf6 @"
- \f1 \'cc\'d8\'b1\'f0\'b9\'d8\'d0\'c4
- \f0 "\cf4 forState:UIControlStateNormal];\
- attionBtn.layer.cornerRadius=\cf7 8\cf4 ;\
- attionBtn.layer.masksToBounds=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- attionBtn.backgroundColor=[UIColor whiteColor];\
- [attionBtn setTitleColor:kRGBColor51 forState:UIControlStateNormal];\
- attionBtn.titleLabel.font=[UIFont systemFontOfSize:\cf7 15\cf4 weight:UIFontWeightMedium];\
- [noticeViewScrollView addSubview:attionBtn];\
- attionBtn.contentHorizontalAlignment=UIControlContentHorizontalAlignmentCenter;\
- [attionBtn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (attionBtnCLick) forControlEvents:UIControlEventTouchUpInside];\
- \
- \
- _attioPersonBtn=[[UIButton alloc]initWithFrame:CGRectMake(\cf7 100\cf4 , \cf7 8\cf4 , \cf7 80\cf4 , \cf7 24\cf4 )];\
- [_attioPersonBtn setTitle:\cf6 @"
- \f1 \'d4\'dd\'ce\'de
- \f0 "\cf4 forState:UIControlStateNormal];\
- _attioPersonBtn.layer.cornerRadius=\cf7 8\cf4 ;\
- _attioPersonBtn.layer.masksToBounds=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _attioPersonBtn.backgroundColor=[UIColor whiteColor];\
- [_attioPersonBtn setTitleColor:kRGBColor51 forState:UIControlStateNormal];\
- _attioPersonBtn.titleLabel.font=[UIFont systemFontOfSize:\cf7 15\cf4 weight:UIFontWeightRegular];\
- [noticeViewScrollView addSubview:_attioPersonBtn];\
- [_attioPersonBtn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (attioPersonBtnX) forControlEvents:UIControlEventTouchUpInside];\
- \
- \
- \}\
- \cf12 /**\cf4
- \f1 \cf2 \'bb\'f1\'c8\'a1\'d3\'c3\'bb\'a7\'d7\'ee\'ba\'f3\'d2\'bb\'cc\'f5\'d0\'c5\'cf\'a2
- \f3 */
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 attioPersonBtnX\cf4 \{\
- \
- \
-
- \f2\b \cf8 long
- \f0\b0 \cf4 time = (
- \f2\b \cf8 long
- \f0\b0 \cf4 )[[NSDate date] timeIntervalSince1970];\
- time = (time *\cf7 1000\cf4 + g_server.timeDifference);\
- NSString *salt = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , time];\
- \
- \
- [g_server getUserRoomAttentionattentionLastInfo:salt userId:_backUserId jid:_roomJid andToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 hideNoticeView\cf4 :(UITapGestureRecognizer *)tap \{\
- \cf2 // _noticeView.hidden = YES;\cf4 \
- _noticeHeight = \cf7 0\cf4 ;\
- _table.frame = CGRectMake(\cf7 0\cf4 , JX_SCREEN_TOP, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-JX_SCREEN_TOP-JX_SCREEN_BOTTOM);\
- _jumpNewMsgBtn.frame = CGRectMake(JX_SCREEN_WIDTH - \cf7 105\cf4 , JX_SCREEN_TOP + \cf7 20\cf4 +_noticeHeight, \cf7 120\cf4 , \cf7 30\cf4 );\
- \}\
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 startNoticeTimer\cf4 \{\
- _leftW = \cf7 0\cf4 ;\
- _rightW = _noticeStrW+NOTICE_WIDTH;\
- _noticeTimer = [NSTimer scheduledTimerWithTimeInterval:\cf7 0.04f\cf4 target:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (updateNoticeTimer:) userInfo:
- \f2\b \cf8 nil
- \f0\b0 \cf4 repeats:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .noticeTimer setFireDate:[NSDate distantPast]];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 stopNoticeTimer\cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .timer setFireDate:[NSDate distantFuture]];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 updateNoticeTimer\cf4 :(NSTimer *)timer \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .leftW --;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .rightW --;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .leftLabel.frame = CGRectMake(
- \f2\b \cf8 self
- \f0\b0 \cf4 .leftW, \cf7 0\cf4 , _noticeStrW+NOTICE_WIDTH, \cf7 36\cf4 );\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .rightLabel.frame = CGRectMake(
- \f2\b \cf8 self
- \f0\b0 \cf4 .rightW, \cf7 0\cf4 , _noticeStrW+NOTICE_WIDTH, \cf7 36\cf4 );\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .leftW <= -_noticeStrW-NOTICE_WIDTH) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .leftW = _noticeStrW+NOTICE_WIDTH;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .rightW <= -_noticeStrW-NOTICE_WIDTH) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .rightW = _noticeStrW+NOTICE_WIDTH;\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 setupNoticeWithContent\cf4 :(NSString *)noticeStr \cf11 time\cf4 :(NSString *)noticeTime \{\
- CGSize size = [noticeStr sizeWithAttributes:\cf7 @\{\cf4 NSFontAttributeName:SYSFONT(\cf7 13\cf4 )\cf7 \}\cf4 ];\
- _leftLabel.frame = CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , size.width, \cf7 36\cf4 );\
- _leftLabel.text = noticeStr;\
- _rightLabel.frame = CGRectMake(CGRectGetMaxX(_leftLabel.frame), \cf7 0\cf4 , size.width, \cf7 36\cf4 );\
- _rightLabel.text = noticeStr;\
- _noticeStrW = size.width;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_noticeStrW > _showNoticeView.frame.size.width) \{\
- _rightLabel.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 startNoticeTimer];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _rightLabel.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 stopNoticeTimer];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .noticeTimer invalidate];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .noticeTimer =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (noticeStr.length > \cf7 0\cf4 ) \{\
- NSTimeInterval time = [[NSDate date] timeIntervalSince1970];\
- \cf2 //
- \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
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (time >= \cf7 60\cf4 *\cf7 60\cf4 *\cf7 24\cf4 *\cf7 7\cf4 +[noticeTime intValue]) \{\
- _noticeView.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _noticeHeight = \cf7 36\cf4 *\cf7 2\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _noticeView.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _noticeHeight = \cf7 36\cf4 *\cf7 2\cf4 ;\
- _table.frame = CGRectMake(\cf7 0\cf4 , JX_SCREEN_TOP+_noticeHeight, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-JX_SCREEN_TOP-JX_SCREEN_BOTTOM - _noticeHeight);\
- [_table gotoLastRow:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _noticeView.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _noticeHeight = \cf7 36\cf4 *\cf7 2\cf4 ;\
- \}\
- _jumpNewMsgBtn.frame = CGRectMake(JX_SCREEN_WIDTH - \cf7 105\cf4 , JX_SCREEN_TOP + \cf7 20\cf4 +_noticeHeight, \cf7 120\cf4 , \cf7 30\cf4 );\
- \}\
- \
- \
- \
- \cf2 //
- \f1 \'cc\'f8\'d7\'aa\'b5\'bd\'d0\'c2\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 jumpNewMsgBtnAction\cf4 \{\
- NSIndexPath* indexPat = [NSIndexPath indexPathForRow:\cf7 0\cf4 inSection:\cf7 0\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableView scrollToRowAtIndexPath:indexPat atScrollPosition:UITableViewScrollPositionBottom animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- _jumpNewMsgBtn.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 screenShotViewAction\cf4 :(UITapGestureRecognizer *)tap \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- KKImageEditorViewController *editor = [[KKImageEditorViewController alloc] initWithImage:
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenImage delegate:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- UINavigationController *vc = [[UINavigationController alloc] initWithRootViewController:editor];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 presentViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 completion:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 -
- \f4 \'d5\'d5\'c6\'ac\'b1\'e0\'bc\'ad\'ba\'f3\'b5\'c4\'bb\'d8\'b5\'f7
- \f0\b0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 imageDidFinishEdittingWithImage\cf4 :(UIImage *)image \cf11 asset\cf4 :(PHAsset *)asset\
- \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotImageView.image = image;\
- UIImage *chosedImage =
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotImageView.image;\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1
- \f0 image
- \f1 \'b5\'c4\'b3\'a4\'bf\'ed
- \f0 \cf4 \
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.frame = CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT);\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \
- NSString *name = \cf6 @"jpg"\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
- \cf2 // NSString *userId = self.userIds[i];\cf4 \
- \cf2 //\cf4 \
- \cf2 // NSString *file = [FileInfo getUUIDFileName:name];\cf4 \
- \cf2 // [g_server saveImageToFile:chosedImage file:file isOriginal:NO];\cf4 \
- \cf2 // [self sendImage:file withWidth:imageWidth andHeight:imageHeight userId:userId];\cf4 \
- \cf12 ///
- \f3 \cf2 / [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];
- \f0 \cf4 \
- \cf2 // \}\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_image];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:chosedImage];\
- _onceSendNum = \cf7 10\cf4 ;\
- _isOriginal =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendPhotos:
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray withOriginal:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- NSString *file = [FileInfo getUUIDFileName:name];\
- [g_server saveImageToFile:chosedImage file:file isOriginal:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
- \}\
- \cf2 // NSString* file = [FileInfo getUUIDFileName:name];\cf4 \
- \cf2 //\cf4 \
- \cf2 // file = [FileInfo getUUIDFileName:name];\cf4 \
- \cf2 // [g_server saveImageToFile:chosedImage file:file isOriginal:NO];\cf4 \
- \cf12 ///
- \f3 \cf2 / [self sendImage:file withWidth:imageWidth andHeight:imageHeight];
- \f0 \cf4 \
- \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut toView:self];\cf4 \
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \cf2 // NSFileManager* fileManager=[NSFileManager defaultManager];\cf4 \
- \cf2 // BOOL blDele= [fileManager removeItemAtPath:ScreenShotImage error:nil];\cf4 \
- \cf2 // if (blDele) \{\cf4 \
- \cf2 // NSLog(@"dele success");\cf4 \
- \cf2 // \}else \{\cf4 \
- \cf2 // NSLog(@"dele fail");\cf4 \
- \cf2 // \}\cf4 \
- \}\
- \
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 createFooterSubViews\cf4 \{\
- \
- [inputBar removeFromSuperview];\
- [_publicMenuBar removeFromSuperview];\
- [_selectMoreView removeFromSuperview];\
- \
- \cf2 //
- \f1 \'ca\'e4\'c8\'eb\'cc\'f5
- \f0 \cf4 \
- inputBar = [[UIImageView alloc] initWithImage:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- inputBar.backgroundColor = HEXCOLOR(\cf7 0xF9F9F9\cf4 );\
- inputBar.userInteractionEnabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- inputBar.clipsToBounds =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .view addSubview:inputBar];\
- \
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareMore = [UIFactory createButtonWithImage:\cf6 @"im_show_one_icon"\cf4 highlight:
- \f2\b \cf8 nil
- \f0\b0 \cf4 target:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (shareMore:)];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareMore setImage:[UIImage imageNamed:\cf6 @"im_input_more_normal"\cf4 ] forState:UIControlStateSelected];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareMore.frame = CGRectMake(JX_SCREEN_WIDTH - \cf7 53\cf4 -\cf7 5\cf4 , \cf7 0\cf4 , \cf7 53\cf4 , \cf7 53\cf4 );\
- [inputBar addSubview:
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareMore];\
- CGFloat firstX=\cf7 10\cf4 ;\
- \
- \cf2 /*\cf4 \
- \cf2 if (_menuList.count > 0) \{\cf4 \
- \cf2 self.view.backgroundColor = [UIColor whiteColor];\cf4 \
- \cf2 UIButton *btn = [UIFactory createButtonWithImage:@"lashang" selected:@"lashang" target:self selector:@selector(inputBarSwitch:)];\cf4 \
- \cf2 btn.frame = CGRectMake(10, 8+2, 32, 32);\cf4 \
- \cf2 btn.selected = NO;\cf4 \
- \cf2 [inputBar addSubview:btn];\cf4 \
- \cf2 \cf4 \
- \cf2 UIView *v = [[UIView alloc] initWithFrame:CGRectMake(47, 0, LINE_WH, self.heightFooter)];\cf4 \
- \cf2 v.backgroundColor = THE_LINE_COLOR;\cf4 \
- \cf2 [inputBar addSubview:v];\cf4 \
- \cf2 \cf4 \
- \cf2 firstX = 52;\cf4 \
- \cf2 \cf4 \
- \cf2 inputBar.frame = CGRectMake(inputBar.frame.origin.x, inputBar.frame.size.height, inputBar.frame.size.width, inputBar.frame.size.height);\cf4 \
- \cf2 \cf4 \
- \cf2 \}else \{\cf4 \
- \cf2 firstX = 10;\cf4 \
- \cf2 inputBar.frame = CGRectMake(inputBar.frame.origin.x, 0, inputBar.frame.size.width, inputBar.frame.size.height);\cf4 \
- \cf2 \} */\cf4 \
- \
- UIButton *btn = [UIFactory createButtonWithImage:\cf6 @"im_input_ptt_normal"\cf4 selected:\cf6 @"im_input_keyboard_normal"\cf4 target:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (recordSwitch:)];\
- btn.frame = CGRectMake(\cf7 10\cf4 , \cf7 15\cf4 , \cf7 25\cf4 , \cf7 25\cf4 );\
- btn.selected =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [inputBar addSubview:btn];\
- _recordBtnLeft = btn;\
- \
- \cf2 //eomoj\cf4 \
- btn = [UIFactory createButtonWithImage:\cf6 @"im_input_expression_normal"\cf4 selected:\cf6 @"im_input_keyboard_normal"\cf4 target:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (actionFace:)];\
- 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 );\
- btn.selected =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [inputBar addSubview:btn];\
- _btnFace = btn;\
- \
- _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 )];\
- _messageText.font = SYSFONT(\cf7 18\cf4 );\
- _messageText.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- _messageText.layer.cornerRadius = \cf7 2.0\cf4 ;\
- _messageText.layer.masksToBounds =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _messageText.enablesReturnKeyAutomatically =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _messageText.returnKeyType = UIReturnKeySend;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![
- \f2\b \cf8 self
- \f0\b0 \cf4 changeEmjoyText:chatPerson.lastInput textColor:[UIColor blackColor]]) \{\
- _messageText.text = chatPerson.lastInput;\
- \}\
- [inputBar addSubview:_messageText];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setTableFooterFrame:_messageText];\
- \
- \cf2 //
- \f1 \'c9\'e8\'d6\'c3\'b2\'cb\'b5\'a5
- \f0 \cf4 \
- UIMenuItem *menuItem = [[UIMenuItem alloc]initWithTitle:Localized(\cf6 @"JX_Newline"\cf4 ) action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (selfMenu:)];\
- UIMenuController *menuController = [UIMenuController sharedMenuController];\
- [menuController setMenuItems:[NSArray arrayWithObject:menuItem]];\
- \
- _textViewBtn = [[UIButton alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 10\cf4 , _messageText.frame.size.width, \cf7 12\cf4 )];\
- _textViewBtn.backgroundColor = [UIColor clearColor];\
- [_textViewBtn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (textViewBtnAction:) forControlEvents:UIControlEventTouchUpInside];\
- _textViewBtn.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [_messageText addSubview:_textViewBtn];\
- \
- _talkTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , _messageText.frame.size.width, _messageText.frame.size.height)];\
- _talkTimeLabel.font = [UIFont systemFontOfSize:\cf7 15.0\cf4 ];\
- _talkTimeLabel.text = Localized(\cf6 @"JX_TotalSilence"\cf4 );\
- _talkTimeLabel.textColor = [UIColor lightGrayColor];\
- _talkTimeLabel.textAlignment = NSTextAlignmentCenter;\
- [_messageText addSubview:_talkTimeLabel];\
- _talkTimeLabel.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
- memberData *roomD = [[memberData alloc] init];\
- roomD.roomId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.roomId;\
- memberData *roomData = [roomD getCardNameById:MY_USER_ID];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (([
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.talkTime longLongValue] > \cf7 0\cf4 && !_isAdmin) || [roomData.role intValue] == \cf7 4\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([roomData.role intValue] == \cf7 4\cf4 ) \{\
- _talkTimeLabel.text = Localized(\cf6 @"JX_ProhibitToSpeak"\cf4 );\
- \}\
- _messageText.userInteractionEnabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _shareMore.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _recordBtnLeft.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _btnFace.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _messageText.text =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _talkTimeLabel.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _shareMore.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _recordBtnLeft.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _btnFace.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _messageText.userInteractionEnabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 //
- \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
- \f0 \cf4 \
- btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];\
- btn.frame = CGRectMake(_messageText.frame.origin.x, \cf7 8\cf4 , _messageText.frame.size.width, \cf7 32\cf4 +\cf7 5.5\cf4 );\
- btn.backgroundColor = HEXCOLOR(\cf7 0xFEFEFE\cf4 );\
- btn.layer.borderWidth = \cf7 0.5\cf4 ;\
- btn.layer.borderColor = [[UIColor grayColor] CGColor];\
- [btn setTitle:Localized(\cf6 @"JXChatVC_TouchTalk"\cf4 ) forState:UIControlStateNormal];\
- [btn setTitle:Localized(\cf6 @"JXChatVC_ReleaseEnd"\cf4 ) forState:UIControlEventTouchDown];\
- \cf2 // [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];\cf4 \
- [btn setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];\
- btn.titleLabel.font = g_factory.font15b;\
- \cf2 // [btn setTitleShadowColor:[UIColor blackColor] forState:UIControlStateNormal];\cf4 \
- \cf2 // [btn setTitleShadowOffset:CGSizeMake(1, 1)];\cf4 \
- btn.layer.cornerRadius = \cf7 5\cf4 ;\
- btn.layer.masksToBounds =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [inputBar addSubview:btn];\
- [btn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (recordStart:) forControlEvents:UIControlEventTouchDown];\
- [btn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (recordStop:) forControlEvents:UIControlEventTouchUpInside];\
- [btn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (recordCancel:) forControlEvents:UIControlEventTouchUpOutside];\
- \cf2 //
- \f1 \'ca\'d6\'d6\'b8\'d4\'da
- \f0 control
- \f1 \'b5\'c4
- \f0 bounds
- \f1 \'b7\'b6\'ce\'a7\'c4\'da\'cd\'cf\'b6\'af\'b5\'c4\'b5\'c4\'ca\'c2\'bc\'fe
- \f0 \cf4 \
- [btn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (showVoice:) forControlEvents:UIControlEventTouchDragInside];\
- \cf2 //
- \f1 \'b5\'b1\'ca\'d6\'d6\'b8\'cd\'cf\'b6\'af\'b8\'d5\'ba\'c3\'d4\'da
- \f0 control
- \f1 \'b5\'c4
- \f0 bounds
- \f1 \'b7\'b6\'ce\'a7\'cd\'e2\'b5\'c4\'ca\'c2\'bc\'fe
- \f0 \cf4 \
- [btn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (showCancel:) forControlEvents:UIControlEventTouchDragOutside];\
- \
- btn.selected =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _recordBtn = btn;\
- _recordBtn.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
- \cf2 /* if (_menuList.count > 0) \{\cf4 \
- \cf2 //
- \f1 \'b9\'ab\'d6\'da\'ba\'c5\'b2\'cb\'b5\'a5
- \f0 \cf4 \
- \cf2 _publicMenuBar = [[UIView alloc] init];\cf4 \
- \cf2 _publicMenuBar.frame = CGRectMake(0, 0, JX_SCREEN_WIDTH, inputBar.frame.size.height);\cf4 \
- \cf2 _publicMenuBar.backgroundColor = [UIColor whiteColor];\cf4 \
- \cf2 // _publicMenuBar.layer.borderWidth = .5;\cf4 \
- \cf2 // _publicMenuBar.layer.borderColor = [HEXCOLOR(0xdcdcdc) CGColor];\cf4 \
- \cf2 [self.tableFooter addSubview:_publicMenuBar];\cf4 \
- \cf2 [self createPublicMenu:_menuList];\cf4 \
- \cf2 \} */\cf4 \
- \
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 1\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 createSelectMoreView];\
- \});\
- \
- \
- [inputBar mas_makeConstraints:^(MASConstraintMaker *make) \{\
- make.bottom.mas_equalTo(-(JX_SCREEN_HEIGHT>=\cf7 812\cf4 ?\cf7 40\cf4 :\cf7 10\cf4 ));\
- make.left.right.mas_equalTo(\cf7 0\cf4 );\
- make.height.mas_equalTo(\cf7 53\cf4 );\
- \
- \}];\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showVoice\cf4 :(UIButton *)button \{\
- _voice.isWillCancel =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showCancel\cf4 :(UIButton *)button \{\
- _voice.isWillCancel =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 //
- \f1 \'d2\'fe\'b2\'d8\'cf\'b5\'cd\'b3\'b2\'cb\'b5\'a5\'b5\'c4\'b7\'bd\'b7\'a8
- \f0 \cf4 \
- -(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 canPerformAction\cf4 :(
- \f2\b \cf8 SEL
- \f0\b0 \cf4 )action \cf11 withSender\cf4 :(
- \f2\b \cf8 id
- \f0\b0 \cf4 )sender\
- \{\
- \cf2 //
- \f1 \'d4\'ca\'d0\'ed\'cf\'d4\'ca\'be
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (action ==
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (selfMenu:)) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \cf2 //
- \f1 \'c6\'e4\'cb\'fb\'b2\'bb\'d4\'ca\'d0\'ed\'cf\'d4\'ca\'be
- \f0 \cf4 \
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 selfMenu\cf4 :(
- \f2\b \cf8 id
- \f0\b0 \cf4 )sender \{\
- _messageText.text = [NSString stringWithFormat:\cf6 @"%@\\r"\cf4 ,_messageText.text];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 textViewDidChange:_messageText];\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 textViewBtnAction\cf4 :(UIButton *)btn \{\
- \
- _messageText.inputView =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- [_messageText reloadInputViews];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 createPublicMenu\cf4 :(NSArray *) array \{\
- \
- UIButton *btn = [UIFactory createButtonWithImage:\cf6 @"jiangp"\cf4 selected:\cf6 @"jiangp"\cf4 target:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (publicMenuSwitch:)];\
- btn.frame = CGRectMake(\cf7 10\cf4 , \cf7 8\cf4 , \cf7 32\cf4 , \cf7 32\cf4 );\
- btn.selected =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [_publicMenuBar addSubview:btn];\
- \
- \
- CGFloat btnWidth = (JX_SCREEN_WIDTH - \cf7 52\cf4 ) / array.count;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < array.count; i ++) \{\
- NSDictionary *dict = array[i];\
- NSString *name = dict[\cf6 @"name"\cf4 ];\
- btn = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(btn.frame), \cf7 0\cf4 , btnWidth, _publicMenuBar.frame.size.height)];\
- btn.tag = i;\
- [btn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (publicMenuBtnAction:) forControlEvents:UIControlEventTouchUpInside];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (i == \cf7 0\cf4 ) \{\
- CGRect frame = btn.frame;\
- frame.origin.x = \cf7 52\cf4 ;\
- btn.frame = frame;\
- \}\
- btn.titleLabel.font = SYSFONT(\cf7 15.0\cf4 );\
- [btn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];\
- [btn setTitle:name forState:UIControlStateNormal];\
- [_publicMenuBar addSubview:btn];\
- \
- UIView *v = [[UIView alloc] initWithFrame:CGRectMake(btn.frame.origin.x, \cf7 0\cf4 , LINE_WH, _publicMenuBar.frame.size.height)];\
- v.backgroundColor = THE_LINE_COLOR;\
- [_publicMenuBar addSubview:v];\
- \
- CGSize size = [name boundingRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:\cf7 @\{\cf4 NSFontAttributeName:SYSFONT(\cf7 15.0\cf4 )\cf7 \}\cf4 context:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ].size;\
- CGFloat imageX = (btnWidth - size.width) / \cf7 2\cf4 - \cf7 20\cf4 ;\
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(imageX, (btn.frame.size.height - \cf7 16\cf4 ) / \cf7 2\cf4 , \cf7 15\cf4 , \cf7 15\cf4 )];\
- imageView.image = [UIImage imageNamed:\cf6 @"public_menu"\cf4 ];\
- [btn addSubview:imageView];\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 createSelectMoreView\cf4 \{\
- \
- _selectMoreView = [[UIView alloc] initWithFrame:
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableFooter.bounds];\
- _selectMoreView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _selectMoreView.backgroundColor = [UIColor whiteColor];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableFooter addSubview:_selectMoreView];\
- \
- NSArray *imageNames = \cf7 @[\cf6 @"msf"\cf4 , \cf6 @"msc"\cf4 , \cf6 @"msd"\cf4 , \cf6 @"mse"\cf7 ]\cf4 ;\
- CGFloat w = \cf7 40\cf4 ;\
- CGFloat margin = (JX_SCREEN_WIDTH - imageNames.count * w) / (imageNames.count + \cf7 1\cf4 );\
- CGFloat x = margin;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < imageNames.count; i ++) \{\
- NSString *imageName = imageNames[i];\
- UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(x, \cf7 5\cf4 , w, w)];\
- [btn setBackgroundImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];\
- btn.tag = i;\
- [btn addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (selectMoreViewBtnAction:) forControlEvents:UIControlEventTouchUpInside];\
- [_selectMoreView addSubview:btn];\
- \
- x = CGRectGetMaxX(btn.frame) + margin;\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 selectMoreViewBtnAction\cf4 :(UIButton *)btn \{\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr.count; i ++) \{\
- JXMessageObject *msg1 =
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr[i];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger j = i + \cf7 1\cf4 ; j <
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr.count; j ++) \{\
- JXMessageObject *msg2 =
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr[j];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg1.timeSend timeIntervalSince1970] > [msg2.timeSend timeIntervalSince1970]) \{\
- JXMessageObject *msg = msg1;\
- msg1 = msg2;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr[i] = msg2;\
- msg2 = msg;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr[j] = msg;\
- \}\
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr.count <= \cf7 0\cf4 ) \{\
- [g_App showAlert:Localized(\cf6 @"JX_PleaseSelectTheMessageRecord"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 (btn.tag) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 0\cf4 :\{ \cf2 //
- \f1 \'c5\'fa\'c1\'bf\'d7\'aa\'b7\'a2
- \f0 \cf4 \
- \
- memberData *data = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:g_myself.userId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([data.role integerValue] == \cf7 4\cf4 ) \{\
- [JXMyTools showTipView:\cf6 @"
- \f1 \'d2\'fe\'c9\'ed\'c8\'cb\'b2\'bb\'c4\'dc\'d7\'aa\'b7\'a2\'cf\'fb\'cf\'a2
- \f0 "\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- JXActionSheetVC *actionVC = [[JXActionSheetVC alloc] initWithImages:\cf7 @[]\cf4 names:\cf7 @[\cf4 Localized(\cf6 @"JX_OneByOneForward"\cf4 ),Localized(\cf6 @"JX_MergeAndForward"\cf4 )\cf7 ]\cf4 ];\
- actionVC.tag = \cf7 2457\cf4 ;\
- actionVC.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 presentViewController:actionVC animated:
- \f2\b \cf8 NO
- \f0\b0 \cf4 completion:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 1\cf4 :\{ \cf2 //
- \f1 \'c5\'fa\'c1\'bf\'ca\'d5\'b2\'d8
- \f0 \cf4 \
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:
- \f2\b \cf8 nil
- \f0\b0 \cf4 message:Localized(\cf6 @"JX_CollectedType"\cf4 ) delegate:
- \f2\b \cf8 self
- \f0\b0 \cf4 cancelButtonTitle:Localized(\cf6 @"JX_Cencal"\cf4 ) otherButtonTitles:Localized(\cf6 @"JX_Collection"\cf4 ),
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- alert.tag = \cf7 2457\cf4 ;\
- [alert show];\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 2\cf4 :\{ \cf2 //
- \f1 \'c5\'fa\'c1\'bf\'c9\'be\'b3\'fd
- \f0 \cf4 \
- \
- NSMutableString *msgIds = [NSMutableString string];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr.count; i ++) \{\
- JXMessageObject *msg =
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr[i];\
- NSInteger indexNum = -\cf7 1\cf4 ;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger j = \cf7 0\cf4 ; j < _array.count; j ++) \{\
- JXMessageObject *msg1 = _array[j];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg1.messageId isEqualToString:msg.messageId]) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msgIds.length <= \cf7 0\cf4 ) \{\
- [msgIds appendString:msg1.messageId];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [msgIds appendFormat:\cf6 @",%@"\cf4 ,msg1.messageId];\
- \}\
- indexNum = j;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- s = chatPerson.userId;\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (indexNum == _array.count - \cf7 1\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (indexNum <= \cf7 0\cf4 ) \{\
- JXMessageObject *lastMsg = [_array firstObject];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .lastMsg.content =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- [lastMsg updateLastSend:UpdateLastSendType_None];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- JXMessageObject *newLastMsg = _array[indexNum - \cf7 1\cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .lastMsg.content = newLastMsg.content;\
- [newLastMsg updateLastSend:UpdateLastSendType_None];\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'c9\'be\'b3\'fd\'b1\'be\'b5\'d8\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
- \f0 \cf4 \
- [_array removeObjectAtIndex:indexNum];\
- [msg
- \f2\b \cf8 delete
- \f0\b0 \cf4 ];\
- \
- [_table deleteRow:(
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexNum section:\cf7 0\cf4 ];\
- \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msgIds.length > \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 type = \cf7 1\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid) \{\
- type = \cf7 2\cf4 ;\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex = -\cf7 1\cf4 ;\
- \cf2 // [g_server tigaseDeleteMsgWithMessageId:msgIds type:type deleteType:1 roomJid:self.roomJid toView:self];\cf4 \
- [g_server tigaseDeleteMsgWithMessageId:msgIds type:type deleteType:\cf7 2\cf4 roomJid:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid deleteOrWithdraw:kWCMessageTypeSuperDelete toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 actionQuit];\
- \}\
- \
- \}\
- \
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 3\cf4 :\{\
- JXActionSheetVC *actionVC = [[JXActionSheetVC alloc] initWithImages:\cf7 @[]\cf4 names:\cf7 @[\cf4 Localized(\cf6 @"JX_SaveToTheAlbum"\cf4 )\cf7 ]\cf4 ];\
- actionVC.tag = \cf7 2458\cf4 ;\
- actionVC.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 presentViewController:actionVC animated:
- \f2\b \cf8 NO
- \f0\b0 \cf4 completion:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 inputBarSwitch\cf4 :(UIButton *)btn \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.backgroundColor = [UIColor whiteColor];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter = \cf7 49\cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- _publicMenuBar.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- inputBar.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [UIView animateWithDuration:\cf7 .3\cf4 animations:^\{\
- \cf2 // _publicMenuBar.frame = CGRectMake(_publicMenuBar.frame.origin.x, 0, _publicMenuBar.frame.size.width, _publicMenuBar.frame.size.height);\cf4 \
- \cf2 // inputBar.frame = CGRectMake(inputBar.frame.origin.x, self.tableFooter.frame.size.height, inputBar.frame.size.width, inputBar.frame.size.height);\cf4 \
- \}];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 publicMenuSwitch\cf4 :(UIButton *)btn \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setTableFooterFrame:_messageText];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.backgroundColor = HEXCOLOR(\cf7 0xF9F9F9\cf4 );\
- _publicMenuBar.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- inputBar.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [UIView animateWithDuration:\cf7 .3\cf4 animations:^\{\
- \cf2 // _publicMenuBar.frame = CGRectMake(_publicMenuBar.frame.origin.x, self.tableFooter.frame.size.height, _publicMenuBar.frame.size.width, _publicMenuBar.frame.size.height);\cf4 \
- \cf2 // inputBar.frame = CGRectMake(inputBar.frame.origin.x, 0, inputBar.frame.size.width, inputBar.frame.size.height);\cf4 \
- \}];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 publicMenuBtnAction\cf4 :(UIButton *)btn \{\
- UIWindow *window = [[UIApplication sharedApplication].delegate window];\
- CGRect moreFrame = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableFooter convertRect:btn.frame toView:window];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .selMenuIndex = btn.tag;\
- NSDictionary *dict = _menuList[btn.tag];\
- NSArray *arr = dict[\cf6 @"menuList"\cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!arr || arr.count <= \cf7 0\cf4 ) \{\
- webpageVC *webVC = [webpageVC alloc];\
- webVC.isGotoBack=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.title = [dict objectForKey:\cf6 @"name"\cf4 ];\
- NSString * url = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,[dict objectForKey:\cf6 @"url"\cf4 ]];\
- url = [url stringByReplacingOccurrencesOfString:\cf6 @" "\cf4 withString:\cf6 @""\cf4 ];\
- url = [url stringByReplacingOccurrencesOfString:\cf6 @"\\t"\cf4 withString:\cf6 @""\cf4 ];\
- webVC.url = url;\
- webVC = [webVC init];\
- [g_navigation.navigationView addSubview:webVC.view];\
- \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- CGFloat maxWidth = \cf7 0\cf4 ;\
- NSMutableArray *arrM = [NSMutableArray array];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < arr.count; i ++) \{\
- NSDictionary *dict2 = arr[i];\
- [arrM addObject:dict2[\cf6 @"name"\cf4 ]];\
- NSString *str = dict2[\cf6 @"name"\cf4 ];\
- CGSize size = [str boundingRectWithSize:CGSizeMake(MAXFLOAT, \cf7 20\cf4 ) options:NSStringDrawingUsesLineFragmentOrigin attributes:\cf7 @\{\cf4 NSFontAttributeName:SYSFONT(\cf7 15.0\cf4 )\cf7 \}\cf4 context:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ].size;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (size.width > maxWidth) \{\
- maxWidth = size.width;\
- \}\
- \}\
- JX_DownListView * downListView = [[JX_DownListView alloc] initWithFrame:
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.bounds];\
- downListView.listContents = arrM;\
- downListView.color = HEXCOLOR(\cf7 0xf3f3f3\cf4 );\
- downListView.textColor = [UIColor darkGrayColor];\
- downListView.maxWidth = maxWidth;\
- downListView.showType = DownListView_Center;\
-
- \f2\b \cf8 __weak
- \f0\b0 \cf4
- \f2\b \cf8 typeof
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 ) weakSelf =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- [downListView downlistPopOption:^(NSInteger index, NSString *content) \{\
- [weakSelf showPublicMenuContent:index];\
- \
- \} whichFrame:moreFrame animate:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- [downListView show];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showPublicMenuContent\cf4 :(NSInteger)index \{\
- \
- NSDictionary *dict = _menuList[
- \f2\b \cf8 self
- \f0\b0 \cf4 .selMenuIndex];\
- NSArray *arr = dict[\cf6 @"menuList"\cf4 ];\
- NSDictionary *dict2 = arr[index];\
- \
- NSString *menuId = dict2[\cf6 @"menuId"\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (menuId.length > \cf7 0\cf4 ) \{\
- NSString * url = [NSString stringWithFormat:\cf6 @"%@?access_token=%@"\cf4 ,menuId,g_server.access_token];\
- [g_server requestWithUrl:url toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- webpageVC *webVC = [webpageVC alloc];\
- webVC.isGotoBack=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.title = [dict2 objectForKey:\cf6 @"name"\cf4 ];\
- NSString * url = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,[dict2 objectForKey:\cf6 @"url"\cf4 ]];\
- url = [url stringByReplacingOccurrencesOfString:\cf6 @" "\cf4 withString:\cf6 @""\cf4 ];\
- url = [url stringByReplacingOccurrencesOfString:\cf6 @"\\t"\cf4 withString:\cf6 @""\cf4 ];\
- webVC.url = url;\
- webVC = [webVC init];\
- [g_navigation.navigationView addSubview:webVC.view];\
- \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 initAudio\cf4 \{\
- \cf2 // [[UIDevice currentDevice] setProximityMonitoringEnabled:YES]; //
- \f1 \'bd\'a8\'d2\'e9\'d4\'da\'b2\'a5\'b7\'c5\'d6\'ae\'c7\'b0\'c9\'e8\'d6\'c3
- \f0 yes
- \f1 \'a3\'ac\'b2\'a5\'b7\'c5\'bd\'e1\'ca\'f8\'c9\'e8\'d6\'c3
- \f0 NO
- \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
- \f0 \cf4 \
- \
- \cf2 //
- \f1 \'cc\'ed\'bc\'d3\'bc\'e0\'cc\'fd
- \f0 \cf4 \
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (readTypeMsgCome:) name:kXMPPMessageReadTypeNotification object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (readTypeMsgReceipt:) name:kXMPPMessageReadTypeReceiptNotification object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (sendText:) name:kSendInputNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (newMsgCome:) name:kXMPPNewMsgNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (showMsg:) name:kXMPPShowMsgNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (newReceipt:) name:kXMPPReceiptNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onReceiveFile:) name:kXMPPReceiveFileNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onSendTimeout:) name:kXMPPSendTimeOutNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onQuitRoom:) name:kQuitRoomNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 // [g_notify addObserver:self selector:@selector(changeKeyBoard:) name:UIKeyboardWillShowNotification object:nil];\cf4 \
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onReceiveRoomRemind:) name:kXMPPRoomNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 // [g_notify addObserver:self selector:@selector(onLoginChanged:) name:kXmppLoginNotifaction object:nil];//
- \f1 \'b5\'c7\'c2\'bc\'d7\'b4\'cc\'ac\'b8\'c4\'b1\'e4
- \f0 \cf4 \
- \cf2 //
- \f1 \'d5\'fd\'d4\'da\'ca\'e4\'c8\'eb
- \f0 \cf4 \
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (enteringNotifi:) name:kXMPPMessageEnteringNotification object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'b3\'b7\'bb\'d8\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (withdrawNotifi:) name:kXMPPMessageWithdrawNotification object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (actionQuitChatVC:) name:kActionRelayQuitVC object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'c9\'be\'b3\'fd\'ba\'c3\'d3\'d1
- \f0 \cf4 \
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (delFriend:) name:kDeleteUserNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'d5\'6e\'b3\'cc\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (sendCourseMsg:) name:kSendCourseMsg object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'d0\'de\'b8\'c4\'b1\'b8\'d7\'a2
- \f0 \cf4 \
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (friendRemarkNotifi:) name:kFriendRemark object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'c8\'ba\'b3\'c9\'d4\'b1\'b8\'fc\'d0\'c2
- \f0 \cf4 \
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (roomMembersRefreshNotifi:) name:kRoomMembersRefresh object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'c9\'e8\'d6\'c3\'c1\'c4\'cc\'ec\'b1\'b3\'be\'b0
- \f0 \cf4 \
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (setBackGroundImageViewNotifi:) name:kSetBackGroundImageView object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [g_notify addObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (showCallMsg:) name:UpdateAcceptCallMsg object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- \cf2 //[self.tableFooter addObserver:self forKeyPath:@"frame" options:NSKeyValueObservingOptionNew context:nil];\cf4 \
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 unInitAudio\cf4 \{\
- \cf2 // [[UIDevice currentDevice] setProximityMonitoringEnabled:NO]; //
- \f1 \'bd\'a8\'d2\'e9\'d4\'da\'b2\'a5\'b7\'c5\'d6\'ae\'c7\'b0\'c9\'e8\'d6\'c3
- \f0 yes
- \f1 \'a3\'ac\'b2\'a5\'b7\'c5\'bd\'e1\'ca\'f8\'c9\'e8\'d6\'c3
- \f0 NO
- \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
- \f0 \cf4 \
- \
- \cf2 //
- \f1 \'d2\'c6\'b3\'fd\'bc\'e0\'cc\'fd
- \f0 \cf4 \
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kXMPPNewMsgNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kXMPPSendTimeOutNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kXMPPReceiptNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kSendInputNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kXMPPReceiveFileNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:UIKeyboardWillShowNotification object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kQuitRoomNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kXMPPRoomNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kXmppLoginNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kXMPPMessageEnteringNotification object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kXMPPMessageWithdrawNotification object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kSendCourseMsg object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kFriendRemark object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:UpdateAcceptCallMsg object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- \cf2 // [self.tableFooter removeObserver:self forKeyPath:@"frame"];\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 observeValueForKeyPath\cf4 :(NSString *)keyPath \cf11 ofObject\cf4 :(
- \f2\b \cf8 id
- \f0\b0 \cf4 )object \cf11 change\cf4 :(NSDictionary<NSKeyValueChangeKey,
- \f2\b \cf8 id
- \f0\b0 \cf4 > *)change \cf11 context\cf4 :(
- \f2\b \cf8 void
- \f0\b0 \cf4 *)context \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (THE_DEVICE_HAVE_HEAD) \{\
-
- \f2\b \cf8 id
- \f0\b0 \cf4 newValue = [change objectForKey:NSKeyValueChangeNewKey];\
- CGRect newFrame = [newValue CGRectValue];\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 n = (
- \f2\b \cf8 int
- \f0\b0 \cf4 )newFrame.origin.y;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 m = (
- \f2\b \cf8 int
- \f0\b0 \cf4 )(
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.frame.size.height -
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter);\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (fabs(n - m) < \cf7 2\cf4 ) \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableFooter.frame = CGRectMake(\cf7 0\cf4 , JX_SCREEN_HEIGHT-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter - \cf7 35\cf4 , JX_SCREEN_WIDTH,
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter);\
- _table.frame =CGRectMake(\cf7 0\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightHeader+_noticeHeight,self_width,JX_SCREEN_HEIGHT-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightHeader-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter - \cf7 35\cf4 -_noticeHeight);\
- \}\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 setBackGroundImageViewNotifi\cf4 :(NSNotification *)notif \{\
- UIImage *image = notif.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (image) \{\
- _table.backgroundColor = [UIColor clearColor];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .backGroundImageView.image = image;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .backGroundImageView.image =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- _table.backgroundColor = HEXCOLOR(\cf7 0xF2F2F2\cf4 );\
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 friendRemarkNotifi\cf4 :(NSNotification *)notif \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- JXUserObject *user = notif.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([user.userId isEqualToString:chatPerson.userId]) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setChatTitle:user.remarkName.length > \cf7 0\cf4 ? user.remarkName : user.userNickname];\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 roomMembersRefreshNotifi\cf4 :(NSNotification *)notif \{\
- \
- \cf2 // NSArray * memberArray = [memberData fetchAllMembers:_room.roomId];\cf4 \
-
- \f2\b \cf8 int
- \f0\b0 \cf4 userSize = [notif.object intValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = [NSString stringWithFormat:\cf6 @"%@(%d)"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userNickname, userSize];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 actionQuitChatVC\cf4 :(NSNotification *)notif \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 actionQuit];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 delFriend\cf4 :(NSNotification *)notif \{\
- JXUserObject* user = (JXUserObject *)notif.object;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([chatPerson.userId isEqualToString:user.userId]) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 actionQuit];\
- \}\
- \}\
- \
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendCourseMsg\cf4 :(NSNotification *)notif \{\
- JXMessageObject *msg = (JXMessageObject *)notif.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.toUserId isEqualToString:chatPerson.userId]) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'c8\'ba\'cd\'b7\'cf\'ce\'cb\'a2\'d0\'c2
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 groupLevelNameRefresh\cf4 :(NSNotification *)note \{\
- _groupLevelNameArray = note.object;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [_table reloadData];\
- \
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 refresh\cf4 :(JXMessageObject*)msg\
- \{\
- _isRefreshing =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
- NSMutableArray *arr = [NSMutableArray array];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSDictionary *dict
- \f2\b \cf8 in
- \f0\b0 \cf4
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseArray) \{\
- [arr addObject:dict[\cf6 @"message"\cf4 ]];\
- \}\
- _array = arr;\
- [_table gotoLastRow:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isShowHeaderPull =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_chatLogArray.count > \cf7 0\cf4 ) \{\
- _array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatLogArray;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableView reloadData];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isShowFooterPull =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- [_messageText setInputView:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [_messageText resignFirstResponder];\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 b=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 bPull=
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- NSInteger firstNum = \cf7 1\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([_array count]>\cf7 0\cf4 )\
- firstNum = _array.count;\
- \
- \
- CGFloat allHeight = \cf7 0\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg ==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\{\
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- s = chatPerson.userId;\
- NSMutableArray* p;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGetServerMsg) \{\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'c2\'fe\'d3\'ce\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
- \f0 \cf4 \
- [_wait start];\
-
- \f2\b \cf8 long
- \f0\b0 \cf4 starTime;\
-
- \f2\b \cf8 long
- \f0\b0 \cf4 endTime;\
- JXSynTask *task = _taskList.firstObject;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (task &&
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
- starTime = [task.startTime timeIntervalSince1970] * \cf7 1000\cf4 ;\
- endTime = [task.endTime timeIntervalSince1970] * \cf7 1000\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- JXMessageObject *msg = _array.firstObject;\
- \cf2 // 7
- \f1 \'cc\'ec\'c7\'b0\'b5\'c4\'ca\'b1\'bc\'e4\'b4\'c1
- \f0 \cf4 \
- endTime = [msg.timeSend timeIntervalSince1970] * \cf7 1000\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (endTime == \cf7 0\cf4 ) \{\
- endTime = [[NSDate date] timeIntervalSince1970] * \cf7 1000\cf4 ;\
- \}\
- starTime = \cf7 1262275200000\cf4 ;\
- \}\
- \
- starTime = starTime/\cf7 1000\cf4 ;\
- endTime = endTime/\cf7 1000\cf4 ;\
- \
- \cf2 //
- \f1 \'d0\'c5\'cf\'a2\'b5\'c4\'b7\'a2\'cb\'cd\'ca\'b1\'bc\'e4
- \f0 < starTime = endTime - chatSyncTimeLen; retren;\cf4 \
- \
-
- \f2\b \cf8 long
- \f0\b0 \cf4 chatSyncTimeLen = \cf7 0\cf4 ;\
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 ([g_myself.chatSyncTimeLen integerValue]) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 0\cf4 : \cf2 // 0.04 1
- \f1 \'d0\'a1\'ca\'b1
- \f0 \cf4 \
- chatSyncTimeLen = \cf7 3600\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 1\cf4 : \cf2 // 1
- \f1 \'cc\'ec
- \f0 \cf4 \
- chatSyncTimeLen = \cf7 86400\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 7\cf4 : \cf2 // 7
- \f1 \'cc\'ec
- \f0 \cf4 \
- chatSyncTimeLen = \cf7 604800\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 30\cf4 : \cf2 // 30
- \f1 \'cc\'ec
- \f0 \cf4 \
- chatSyncTimeLen = \cf7 2629800\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 90\cf4 : \cf2 // 90
- \f1 \'cc\'ec
- \f0 \cf4 \
- chatSyncTimeLen = \cf7 7889400\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 365\cf4 : \cf2 //365
- \f1 \'cc\'ec
- \f0 \cf4 \
- chatSyncTimeLen = \cf7 31557600\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 -\cf7 1\cf4 : \cf2 //
- \f1 \'d3\'c0\'be\'c3
- \f0 (20
- \f1 \'c4\'ea
- \f0 )\cf4 \
- chatSyncTimeLen = \cf7 631152000\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 long
- \f0\b0 \cf4 currentTime = [[NSDate date] timeIntervalSince1970];\
-
- \f2\b \cf8 long
- \f0\b0 \cf4 minSyncTime = currentTime - chatSyncTimeLen;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (endTime <= minSyncTime) \{\
- starTime = minSyncTime;\
- endTime = currentTime;\
- \}\
- endTime = endTime*\cf7 1000\cf4 ;\
- starTime = starTime*\cf7 1000\cf4 ;\
- \cf2 // //
- \f1 \'c8\'ba\'d7\'e9\'c9\'be\'b3\'fd\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc\'ca\'b1\'bc\'e4
- \f0 \cf4 \
- \cf2 // NSInteger time1 = 0;\cf4 \
- \cf2 // if ([g_default valueForKey:self.roomId] && ([self.roomJid length]>0)) \{\cf4 \
- \cf2 // time1 = [[g_default valueForKey:self.roomId] integerValue];\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // NSNumber *lastClearRecordTime = [NSNumber numberWithInteger:time1];\cf4 \
- \cf2 // //
- \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
- \f0 \cf4 \
- \cf2 // NSInteger time2 = 0;\cf4 \
- \cf2 // if ([g_default valueForKey:@"CLEARALLMSGRECORDTIME"] && ([self.roomJid length]>0)) \{\cf4 \
- \cf2 // time2 = [[g_default valueForKey:@"CLEARALLMSGRECORDTIME"] integerValue];\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // NSNumber *CLEARALLMSGRECORDTIME = [NSNumber numberWithInteger:time2];\cf4 \
- \cf2 // //
- \f1 \'c9\'e8\'d6\'c3\'c2\'fe\'d3\'ce\'b5\'c4\'ca\'b1\'bc\'e4
- \f0 \cf4 \
- \cf2 // NSNumber *synTime = [NSNumber numberWithLong:starTime];\cf4 \
- \cf2 //\cf4 \
- \cf2 // //
- \f1 \'c5\'c5\'d0\'f2\'cb\'c4\'b8\'f6\'ca\'b1\'bc\'e4
- \f0
- \f1 \'c8\'eb\'c8\'ba\'ca\'b1\'bc\'e4
- \f0 ,
- \f1 \'c8\'ba\'d7\'e9\'c9\'be\'b3\'fd\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc\'ca\'b1\'bc\'e4
- \f0 ,
- \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
- \f0 ,
- \f1 \'c9\'e8\'d6\'c3\'c2\'fe\'d3\'ce\'b5\'c4\'ca\'b1\'bc\'e4
- \f0 \cf4 \
- \cf2 // NSArray *sortedArray = [@[lastClearRecordTime,synTime,CLEARALLMSGRECORDTIME] sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) \{\cf4 \
- \cf2 // NSComparisonResult result = [obj1 compare: obj2];\cf4 \
- \cf2 // return result;\cf4 \
- \cf2 // \}];\cf4 \
- \cf2 // NSNumber *time = [sortedArray lastObject];\cf4 \
- \cf2 // starTime = [time longValue];\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
- [g_server tigaseMucMsgsWithRoomId:s StartTime:starTime EndTime:endTime PageIndex:\cf7 0\cf4 PageSize:PAGECOUNT toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- [g_server tigaseMsgsWithReceiver:s StartTime:starTime EndTime:endTime PageIndex:\cf7 0\cf4 toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'b1\'be\'b5\'d8\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .scrollLine == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 pageCount = \cf7 20\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .newMsgCount > \cf7 20\cf4 ) \{\
- pageCount =
- \f2\b \cf8 self
- \f0\b0 \cf4 .newMsgCount;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .newMsgCount = \cf7 0\cf4 ;\
- \}\
- \
- JXSynTask *task = _taskList.firstObject;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 && task) \{\
- \
- p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:task.endTime];\
- \
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- NSString* myUserId = MY_USER_ID;\
-
- \f2\b \cf8 double
- \f0\b0 \cf4 createTime = \cf7 0\cf4 ;\
- NSArray *array = [memberData getSelfMember:roomId];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (memberData *mdata
- \f2\b \cf8 in
- \f0\b0 \cf4 array) \{\
- NSString *userId = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , mdata.userId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([userId isEqualToString:myUserId])\{\
- createTime = mdata.createTime;\
- \}\
- \}\
- p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:[NSDate dateWithTimeIntervalSince1970:createTime]];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_array.count <= \cf7 0\cf4 &&(!p || p.count <= \cf7 0\cf4 ) && (!
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid ||
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length <= \cf7 0\cf4 )) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGetServerMsg =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- bPull = (p && p.count > \cf7 0\cf4 );\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- p = [[JXMessageObject sharedInstance] fetchAllMessageListWithUser:s];\
- [_array removeAllObjects];\
- bPull =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- \}\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (JXMessageObject *msg
- \f2\b \cf8 in
- \f0\b0 \cf4 p) \{\
- allHeight += [msg.chatMsgHeight floatValue];\
- \}\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGetServerMsg = !bPull;\
- \
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'bf\'da\'c1\'ee\'ba\'ec\'b0\'fc\'bc\'c7\'c2\'bc
- \f0 \cf4 \
- [_orderRedPacketArray removeAllObjects];\
- [_orderRedPacketArray addObjectsFromArray:[
- \f2\b \cf8 self
- \f0\b0 \cf4 fetchRedPacketListWithType:\cf7 3\cf4 ]];\
- \
- b = p.count>\cf7 0\cf4 ;\
- bPull = p.count>=PAGE_SHOW_COUNT;\
- \cf2 // if(_page == 0 || self.scrollLine>0)//
- \f1 \'c8\'e7\'b9\'fb
- \f0 \cf4 \
- \cf2 // [_array removeAllObjects];\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (b)\{\
- NSMutableArray* temp = [[NSMutableArray alloc]init];\
- [temp addObjectsFromArray:p];\
- [temp addObjectsFromArray:_array];\
- [_array removeAllObjects];\
- [_array addObjectsFromArray:temp];\
- [temp removeAllObjects];\
- \cf2 // [temp release];\cf4 \
- \}\
- [p removeAllObjects];\
- \cf2 // [p release];\cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- [_array addObject:msg];\
- \
- \
- JXMessageObject *lastMsg = _array.lastObject;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (lastMsg && lastMsg.isVisible) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
- lastMsg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (lastMsg.isMySend) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([lastMsg.isSend boolValue]) \{\
- [lastMsg updateLastSend:UpdateLastSendType_None];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [lastMsg updateLastSend:UpdateLastSendType_None];\
- \}\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .lastMsg.content = [lastMsg getLastContent];\
- \}\
- \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setIsShowTime];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (b) \{\
- [_pool removeAllObjects];\
- _refreshCount++;\
- \
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 .5\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
- \cf2 //
- \f1 \'cb\'a2\'d0\'c2\'cd\'ea\'b3\'c9
- \f0 \cf4 \
- \
- \
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .scrollLine > \cf7 0\cf4 ) \{\
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 0.5\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
- \
- [_table reloadData];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 scrollToCurrentLine];\
- _isRefreshing =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \});\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg || _page == \cf7 0\cf4 )\{\
- \
- [_table gotoLastRow:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- \cf2 // [_table reloadData];\cf4 \
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isSyncMsg || _isGotoLast) \{\
- \cf2 // [_table gotoLastRow:NO];\cf4 \
- \}\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([_array count]>\cf7 10\cf4 )\{ \cf2 //
- \f1 \'d0\'de\'b8\'c4\'c1\'cb
- \f0
- \f1 \'d4\'ad\'c0\'b4\'ca\'c7\'a1\'b7
- \f0 0\cf4 \
- \
- _table.contentOffset = CGPointMake(\cf7 0\cf4 , allHeight);\
- [_table reloadData];\
- \cf2 // [_table gotoRow: (int)(_array.count - firstNum + 2)];\cf4 \
- \cf2 // [_table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:(int)(_array.count - firstNum) inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];\cf4 \
- \
- \}\
- \}\
- \
- _isRefreshing =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_refreshCount>\cf7 1\cf4 ) \{\
- \
- \cf12 ///\cf4
- \f3 \cf2 [_table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:_array.count-1 inSection:0] atScrollPosition:UITableViewScrollPositionNone animated:NO];
- \f0 \cf4 \
- \}\
- \
- \}\
- \
- \});\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _isRefreshing =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 scrollToCurrentLine\cf4 \{\
- [_table gotoRow:
- \f2\b \cf8 self
- \f0\b0 \cf4 .scrollLine];\
- \cf2 // NSIndexPath *indexPath = [NSIndexPath indexPathForRow:self.scrollLine - 1 inSection:0];\cf4 \
- \cf2 // [_table scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES];\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 didReceiveMemoryWarning\cf4 \
- \{\
- [
- \f2\b \cf8 super
- \f0\b0 \cf4 didReceiveMemoryWarning];\
- \cf2 // Dispose of any resources that can be recreated.\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 dealloc\cf4 \{\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .showLongViewc dissmissDYAdAlertView];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kCellShowCardNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kCellLocationNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kCellImageNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kcellRedPacketDidTouchNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kCellHeadImageNotification object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kHiddenKeyboardNotification object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kUpdateChatVCGroupHelperData object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 name:kKeepOnSendGroupSendMessage object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- NSLog(\cf6 @"JXChatViewController.dealloc"\cf4 );\
- [g_xmpp.chatingUserIds removeObject:current_chat_userId];\
- current_chat_userId =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 unInitAudio];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 free:_pool];\
- [_pool removeAllObjects];\
- \cf2 // [_pool release];\cf4 \
- _pool =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \
- [_array removeAllObjects];\
- \cf2 // [_array release];\cf4 \
- \
- \
- \cf2 // [_messageConent release];\cf4 \
- _faceView.delegate =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \cf2 // [_table release];\cf4 \
- \cf2 // [_moreView release];\cf4 \
- _moreView=
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \
- \cf2 // [_voice release];\cf4 \
- \cf2 // _poolSend = nil;\cf4 \
- \
- _locationVC =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \cf2 // [super dealloc];\cf4 \
- _strURLGoback=\cf6 @""\cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .enteringTimer invalidate];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .enteringTimer =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .noEnteringTimer invalidate];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .noEnteringTimer =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 free\cf4 :(NSMutableArray*)array\{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i=(
- \f2\b \cf8 int
- \f0\b0 \cf4 )[array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
-
- \f2\b \cf8 id
- \f0\b0 \cf4 p = [array objectAtIndex:i];\
- [array removeObjectAtIndex:i];\
- p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'d5\'fd\'d4\'da\'ca\'e4\'c8\'eb
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 enteringNotifi\cf4 :(NSNotification *) notif \{\
- JXMessageObject *msg = notif.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([chatPerson.userId isEqualToString:msg.fromUserId]) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid || msg.isGroup) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = Localized(\cf6 @"JX_Entering"\cf4 );\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .noEnteringTimer = [NSTimer scheduledTimerWithTimeInterval:\cf7 10\cf4 target:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (noEnteringTimerAction:) userInfo:
- \f2\b \cf8 nil
- \f0\b0 \cf4 repeats:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 noEnteringTimerAction\cf4 :(NSNotification *)notif \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .noEnteringTimer invalidate];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .noEnteringTimer =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([chatPerson.userId intValue]<\cf7 10100\cf4 && [chatPerson.userId intValue]>=\cf7 10000\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = chatPerson.userNickname;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 // NSString *str = self.onlinestate ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
- \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.remarkName.length > 0 ? chatPerson.remarkName : chatPerson.userNickname,str];\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setChatTitle:chatPerson.remarkName.length > \cf7 0\cf4 ? chatPerson.remarkName : chatPerson.userNickname];\
- \}\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 ---
- \f4 \'b4\'a5\'c3\'fe\'b9\'d8\'b1\'d5\'bc\'fc\'c5\'cc
- \f2 ----
- \f0\b0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 handleTap\cf4 :(UIGestureRecognizer *)gesture\
- \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .view endEditing:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- \
- \cf5 #pragma mark
- \f2\b \cf16 ----
- \f4 \'bc\'fc\'c5\'cc\'b8\'df\'b6\'c8\'b1\'e4\'bb\'af
- \f2 ------
- \f0\b0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 changeKeyBoard\cf4 :(NSNotification *)aNotifacation\
- \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareMore.selected =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 id
- \f0\b0 \cf4 view = g_navigation.subViews.lastObject;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![view isEqual:
- \f2\b \cf8 self
- \f0\b0 \cf4 ]) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!_messageText.isFirstResponder) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 // return;\cf4 \
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'b5\'bd\'bc\'fc\'c5\'cc
- \f0 frame
- \f1 \'b1\'e4\'bb\'af\'d6\'ae\'c7\'b0\'b5\'c4
- \f0 frame\cf4 \
- NSValue *keyboardBeginBounds=[[aNotifacation userInfo]objectForKey:UIKeyboardFrameBeginUserInfoKey];\
- CGRect beginRect=[keyboardBeginBounds CGRectValue];\
- \
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'b5\'bd\'bc\'fc\'c5\'cc
- \f0 frame
- \f1 \'b1\'e4\'bb\'af\'d6\'ae\'ba\'f3\'b5\'c4
- \f0 frame\cf4 \
- NSValue *keyboardEndBounds=[[aNotifacation userInfo]objectForKey:UIKeyboardFrameEndUserInfoKey];\
- \
- CGRect endRect=[keyboardEndBounds CGRectValue];\
- \
- CGFloat deltaY=endRect.origin.y-beginRect.origin.y;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .deltaY = deltaY;\
- \cf2 //
- \f1 \'c4\'c3
- \f0 frame
- \f1 \'b1\'e4\'bb\'af\'d6\'ae\'ba\'f3\'b5\'c4
- \f0 origin.y-
- \f1 \'b1\'e4\'bb\'af\'d6\'ae\'c7\'b0\'b5\'c4
- \f0 origin.y
- \f1 \'a3\'ac\'c6\'e4\'b2\'ee\'d6\'b5
- \f0 (
- \f1 \'b4\'f8\'d5\'fd\'b8\'ba\'ba\'c5
- \f0 )
- \f1 \'be\'cd\'ca\'c7\'ce\'d2\'c3\'c7
- \f0 self.view
- \f1 \'b5\'c4
- \f0 y
- \f1 \'b7\'bd\'cf\'f2\'c9\'cf\'b5\'c4\'d4\'f6\'c1\'bf
- \f0 \cf4 \
- deltaY=-endRect.size.height;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .deltaHeight = deltaY;\
- \cf2 // NSLog(@"deltaY:%f",deltaY);\cf4 \
- [CATransaction begin];\
- [UIView animateWithDuration:\cf7 0.4f\cf4 animations:^\{\
- \cf2 // [_table setFrame:CGRectMake(0, 0, _table.frame.size.width, self.view.frame.size.height+deltaY-self.heightFooter)];\cf4 \
- \cf2 // [_table gotoLastRow:NO];\cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableFooter.frame = CGRectMake(\cf7 0\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.frame.size.height+deltaY-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter-\cf7 0\cf4 , JX_SCREEN_WIDTH,
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter);\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame = CGRectMake(
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.origin.x,
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableFooter.frame.origin.y -
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.size.height - \cf7 10\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.size.width,
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.size.height);\
- \} completion:^(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 finished) \{\
- \}];\
- [CATransaction commit];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ((_table.contentSize.height > (
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.frame.size.height + deltaY -
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter - \cf7 64\cf4 - \cf7 40\cf4 )) ||
- \f2\b \cf8 self
- \f0\b0 \cf4 .deltaY > \cf7 0\cf4 ) \{\
- \
- [CATransaction begin];\cf2 //
- \f1 \'b4\'b4\'bd\'a8\'cf\'d4\'ca\'bd\'ca\'c2\'ce\'f1
- \f0 \cf4 \
- [UIView animateWithDuration:\cf7 0.1f\cf4 animations:^\{\
- \cf2 // self.tableFooter.frame = CGRectMake(0, self.view.frame.size.height+deltaY-self.heightFooter, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- [_table setFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 +_noticeHeight, _table.frame.size.width,
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.frame.size.height+deltaY-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter-_noticeHeight)];\
- [_table gotoLastRow:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \} completion:^(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 finished) \{\
- \}];\
- [CATransaction commit];\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 theTextAllSpace\cf4 :(NSString *)text \{\
- NSString *string = [text copy];\
- string = [string stringByReplacingOccurrencesOfString:\cf6 @" "\cf4 withString:\cf6 @""\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (string.length <= \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'ce\'c4\'d7\'d6\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendIt\cf4 :(
- \f2\b \cf8 id
- \f0\b0 \cf4 )sender \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
- \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
- \
- NSMutableArray * tempArray = [[NSMutableArray alloc] init];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (memberData * member
- \f2\b \cf8 in
- \f0\b0 \cf4 _atMemberArray) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (member.idStr)\{\
- [tempArray addObject:[NSString stringWithFormat:\cf6 @"%@"\cf4 ,member.idStr]];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [tempArray addObject:[NSString stringWithFormat:\cf6 @"%ld"\cf4 ,member.userId]];\
- \}\
- \}\
- NSString * ObjectIdStr = [tempArray componentsJoinedByString:\cf6 @" "\cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .objToMsg.length > \cf7 0\cf4 ) \{\
- ObjectIdStr =
- \f2\b \cf8 self
- \f0\b0 \cf4 .objToMsg;\
- \}\
- \
- \cf2 // NSString *message = messageText.text;\cf4 \
- NSString *message = [_messageText.textStorage getPlainString];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 theTextAllSpace:message]) \{\
- \cf2 // txt
- \f1 \'c8\'ab\'ca\'c7\'bf\'d5\'b8\'f1
- \f0 \cf4 \
- _messageText.text = \cf6 @""\cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 doEndEdit];\
- \cf2 //
- \f1 \'b2\'bb\'c4\'dc\'b7\'a2\'cb\'cd\'bf\'d5\'b0\'d7\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [g_App showAlert:Localized(\cf6 @"JX_CannotSendBlankMessage"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (message.length > \cf7 0\cf4 ) \{\
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 /*\cf4 \
- \cf2 if (self.isGroupMessages) \{\cf4 \
- \cf2 if (_isGroupSendCancel) \{\cf4 \
- \cf2 return;\cf4 \
- \cf2 \}\cf4 \
- \cf2 msg.toUserId = userId;\cf4 \
- \cf2 msg.isGroupSend = YES;\cf4 \
- \cf2 if ((self.groupMessagesIndex + 1) % _onceSendNum == 0) \{\cf4 \
- \cf2 msg.isLastGroupSend = YES;\cf4 \
- \cf2 \}\cf4 \
- \cf2 \}else \{\cf4 \
- \cf2 msg.toUserId = chatPerson.userId;\cf4 \
- \cf2 \}\cf4 \
- \cf2 msg.isGroup = NO;\cf4 \
- \cf2 */\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- msg.toUserId = userId;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- \}\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.content = message;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .objToMsg.length > \cf7 0\cf4 ) \{\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeReply];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
- \}\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (ObjectIdStr.length > \cf7 0\cf4 )\{\
- msg.objectId = ObjectIdStr;\
- \}\
- \cf2 //
- \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
- \f0 \cf4 \
- \cf2 /*\cf4 \
- \cf2 [msg insert:self.roomJid];\cf4 \
- \cf2 [g_xmpp sendMessage:msg roomName:self.roomJid];//
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \cf2 */\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- msg.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.tempChat=\cf7 1\cf4 ;\
- \}\
- \cf2 //
- \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- [msg insert:userId];\
- [g_xmpp sendMessage:msg roomName:userId];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy)\{\
- \
- \}\
- \cf2 /*\cf4 \
- \cf2 if (self.isGroupMessages) \{\cf4 \
- \cf2 self.groupMessagesIndex ++;\cf4 \
- \cf2 if (msg.isLastGroupSend) \{\cf4 \
- \cf2 return;\cf4 \
- \cf2 \}\cf4 \
- \cf2 if (self.groupMessagesIndex < self.userIds.count) \{\cf4 \
- \cf2 [self sendIt:nil];\cf4 \
- \cf2 \}else if (self.userIds)\{\cf4 \
- \cf2 self.groupMessagesIndex = 0;\cf4 \
- \cf2 _messageText.text = nil;\cf4 \
- \cf2 [self hideKeyboard:YES];\cf4 \
- \cf2 // [g_App showAlert:Localized(@"JX_SendComplete")];\cf4 \
- \cf2 return;\cf4 \
- \cf2 \}\cf4 \
- \cf2 return;\cf4 \
- \cf2 \}\cf4 \
- \cf2 */\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendIt:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
- _messageText.text =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
- \
- \cf2 //
- \f1 \'d0\'b4\'c8\'eb\'ca\'fd\'be\'dd\'bf\'e2
- \f0 \cf4 \
- NSArray *array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds;\
- NSString *userIdsString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userNames;\
- NSString *userNamesString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userNamesWithGroup;\
- NSString *userNamesWithGroupString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- NSString *sendTime = [NSString stringWithFormat:\cf6 @"%@"\cf4 , msg.dictionary[\cf6 @"timeSend"\cf4 ]];\
- \
- array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userNmaesWithFriend;\
- NSString *userNmaesWithFriendString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- \
- JXLabelObject *obj = JXLabelObject.sharedInstance;\
- obj.userId = msg.fromUserId;\
- obj.userIds = userIdsString;\
- obj.text1 = _names;\
- obj.text2 = _names2;\
- obj.userNames = userNamesString;\
- obj.userNamesWithGroup = userNamesWithGroupString;\
- obj.message = msg.content;\
- obj.sendTime = sendTime;\
- obj.userNmaesWithFriend = userNmaesWithFriendString;\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 succeed = [obj insertRecord];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (succeed) \{\
- [g_notify postNotificationName:kGroupHelperRefreshNotif object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_navigation popToViewController:[CYGroupSendHelperViewController
- \f2\b \cf8 class
- \f0\b0 \cf4 ] animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_table.contentSize.height > (JX_SCREEN_HEIGHT +
- \f2\b \cf8 self
- \f0\b0 \cf4 .deltaHeight -
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter - \cf7 64\cf4 - \cf7 40\cf4 - \cf7 20\cf4 )) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .deltaY >= \cf7 0\cf4 ) \{\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableFooter.frame.origin.y != JX_SCREEN_HEIGHT-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter) \{\
- [CATransaction begin];\
- [UIView animateWithDuration:\cf7 0.1f\cf4 animations:^\{\
- \cf2 // self.tableFooter.frame = CGRectMake(0, self.view.frame.size.height+deltaY-self.heightFooter, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- [_table setFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 +_noticeHeight, _table.frame.size.width,
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.frame.size.height+
- \f2\b \cf8 self
- \f0\b0 \cf4 .deltaHeight-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter-_noticeHeight)];\
- \cf2 // [_table gotoLastRow:NO];\cf4 \
- \} completion:^(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 finished) \{\
- \}];\
- [CATransaction commit];\
- \}\
- \}\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'bc\'ec\'b2\'e9\'ca\'c7\'b7\'f1\'d3\'d0\'bf\'da\'c1\'ee\'ba\'ec\'b0\'fc
- \f0 \cf4 \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (JXMessageObject * msg
- \f2\b \cf8 in
- \f0\b0 \cf4 _orderRedPacketArray) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.content caseInsensitiveCompare:_messageText.text] == NSOrderedSame &&[msg.fileSize intValue] != \cf7 2\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 || ![msg.fromUserId isEqualToString:MY_USER_ID]) \{\
- [g_server getRedPacket:msg.objectId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}\
- [_atMemberArray removeAllObjects];\
- [_messageText.textStorage removeAttribute:NSBackgroundColorAttributeName range:NSMakeRange(\cf7 0\cf4 ,_messageText.text.length)];\
- \cf2 // [_messageText.textStorage removeAttribute:NSFontAttributeName range:NSMakeRange(0,_messageText.text.length)];\cf4 \
- [_messageText setText:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [_messageText setAttributedText:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- chatPerson.lastInput = _messageText.text;\
- [chatPerson updateLastInput];\
- \
- \
-
- \f2\b \cf8 long
- \f0\b0 \cf4 time = (
- \f2\b \cf8 long
- \f0\b0 \cf4 )[[NSDate date] timeIntervalSince1970];\
- time = (time *\cf7 1000\cf4 + g_server.timeDifference);\
- NSString *salt = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , time];\
- [g_server getact_UserdeviceLogsecurity:salt userId:g_server.myself.userId andToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- [g_server getact_act_act_getGroupText:salt jid:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid andToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- \
- \
- \
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2\'ba\'f3\'d6\'d8\'d6\'c3\'b5\'d7\'b2\'bf\'bf\'d8\'bc\'fe
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onBackForRecordBtnLeft];\
- \}\
- \
- \cf2 //
- \f1 \'cd\'bc\'c6\'ac
- \f0 piker
- \f1 \'d1\'a1\'d4\'f1\'cd\'ea\'b3\'c9\'ba\'f3\'b5\'f7\'d3\'c3
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendImage\cf4 :(NSString *)file \cf11 withWidth\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 ) width \cf11 andHeight\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 ) height \cf11 userId\cf4 :(NSString *)userId\
- \{\
- \
- \cf2 // NSString *userId = self.userIds[self.groupMessagesIndex];\cf4 \
- \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSString *userId
- \f2\b \cf8 in
- \f0\b0 \cf4 _userIds) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([userId length]>\cf7 10\cf4 )\{\
- msg.toUserId = userId;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid = userId;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = userId;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.fileName = file;\
- msg.content = [[file lastPathComponent] stringByDeletingPathExtension];\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isUpload = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'d0\'c2\'cc\'ed\'bc\'d3\'b5\'c4\'cd\'bc\'c6\'ac\'bf\'ed\'b8\'df
- \f0 \cf4 \
- msg.location_x = [NSNumber numberWithInt:width];\
- msg.location_y = [NSNumber numberWithInt:height];\
- \
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete];\
- \
- [msg insert:userId];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \
- \
- \
- \}\
- \
- \}\
- [g_server uploadFile:file validTime:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:msg.messageId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- \
- \cf2 //
- \f1 \'d0\'b4\'c8\'eb\'ca\'fd\'be\'dd\'bf\'e2
- \f0 \cf4 \
- NSArray *array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds;\
- NSString *userIdsString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userNames;\
- NSString *userNamesString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userNamesWithGroup;\
- NSString *userNamesWithGroupString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- NSString *sendTime = [NSString stringWithFormat:\cf6 @"%@"\cf4 , msg.dictionary[\cf6 @"timeSend"\cf4 ]];\
- \
- array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userNmaesWithFriend;\
- NSString *userNmaesWithFriendString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- \
- JXLabelObject *obj = JXLabelObject.sharedInstance;\
- obj.userId = msg.fromUserId;\
- obj.userIds = userIdsString;\
- obj.text1 = _names;\
- obj.text2 = _names2;\
- obj.userNames = userNamesString;\
- obj.userNamesWithGroup = userNamesWithGroupString;\
- obj.message = \cf6 @"[
- \f1 \'cd\'bc\'c6\'ac
- \f0 ]"\cf4 ;\
- obj.sendTime = sendTime;\
- obj.userNmaesWithFriend = userNmaesWithFriendString;\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 succeed = [obj insertRecord];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (succeed) \{\
- [g_notify postNotificationName:kGroupHelperRefreshNotif object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_navigation popToViewController:[CYGroupSendHelperViewController
- \f2\b \cf8 class
- \f0\b0 \cf4 ] animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- msg.toUserId = userId;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- \}\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.fileName = file;\
- msg.content = [[file lastPathComponent] stringByDeletingPathExtension];\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isUpload = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'d0\'c2\'cc\'ed\'bc\'d3\'b5\'c4\'cd\'bc\'c6\'ac\'bf\'ed\'b8\'df
- \f0 \cf4 \
- msg.location_x = [NSNumber numberWithInt:width];\
- msg.location_y = [NSNumber numberWithInt:height];\
- \
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete];\
- \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \cf2 // if (self.isGroupMessages) \{\cf4 \
- \cf2 // self.groupMessagesIndex ++;\cf4 \
- \cf2 // if (self.groupMessagesIndex < self.userIds.count) \{\cf4 \
- \cf2 // [self sendImage:file withWidth:width andHeight:height];\cf4 \
- \cf2 // \}else if (self.userIds)\{\cf4 \
- \cf2 // self.groupMessagesIndex = 0;\cf4 \
- \cf2 //\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // [msg release];\cf4 \
- [g_server uploadFile:file validTime:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:msg.messageId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- \
- \
-
- \f2\b \cf8 long
- \f0\b0 \cf4 time = (
- \f2\b \cf8 long
- \f0\b0 \cf4 )[[NSDate date] timeIntervalSince1970];\
- time = (time *\cf7 1000\cf4 + g_server.timeDifference);\
- NSString *salt = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , time];\
- [g_server getact_UserdeviceLogsecurity:salt userId:g_server.myself.userId andToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- \
- [g_server getact_act_aact_getGroupImg:salt jid:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid andToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \cf2 //
- \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
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendMedia\cf4 :(JXMediaObject*)p \cf11 userId\cf4 :(NSString *)userId\
- \{\
- NSString* file = p.fileName;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- msg.toUserId = userId;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- \}\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.fileName = file;\
- msg.content = [[file lastPathComponent] stringByDeletingPathExtension];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (p.isVideo)\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeVideo];\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- msg.type = [NSNumber numberWithInt:kWCMessageTypeAudio];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isUpload = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.location_x = [NSNumber numberWithInt:\cf7 100\cf4 ];\
- msg.location_y = [NSNumber numberWithInt:\cf7 100\cf4 ];\
- \cf2 // NSLog(@"hh%hhd",_isReadDelete);\cf4 \
- msg.isReadDel = [NSNumber numberWithInt:_isReadDelete];\
- \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- [g_server uploadFile:p.fileName validTime:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:msg.messageId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \cf2 // [msg release];\cf4 \
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 shareMore\cf4 :(UIButton*)sender \{\
- \cf2 //[messageText setInputView:messageText.inputView?nil: _moreView];\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!_moreView) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \cf2 // sender.selected = !sender.selected;\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_messageText.inputView != _moreView)\{\
- _messageText.inputView = _moreView;\
- _textViewBtn.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \cf15 _moreView\cf4 .\cf14 hidden\cf4 =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \
- \
- [_messageText reloadInputViews];\
- [_messageText becomeFirstResponder];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.hidden) \{\
- ALAssetsLibrary *al = [[ALAssetsLibrary alloc] init];\
- \
- [al enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group,
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 *stop) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (group) \{\
- [group setAssetsFilter:[ALAssetsFilter allPhotos]];\
- [group enumerateAssetsWithOptions:NSEnumerationReverse\cf2 /*
- \f1 \'b1\'e9\'c0\'fa\'b7\'bd\'ca\'bd
- \f0 */\cf4 usingBlock:^(ALAsset *result, NSUInteger index,
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 *stop) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (result) \{\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 photoIndex = [[g_default objectForKey:LastPhotoIndex] intValue];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (photoIndex == index) \{\
- *stop =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- [g_default setObject:[NSNumber numberWithInteger:index] forKey:LastPhotoIndex];\
- NSString *type = [result valueForProperty:ALAssetPropertyType];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([type isEqual:ALAssetTypePhoto])\{\
- UIImage *needImage = [UIImage imageWithCGImage:result.defaultRepresentation.fullScreenImage];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (needImage) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenImage = needImage;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotImageView.image = needImage;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 5\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
- \});\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \}\
- *stop =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \}];\
- *stop =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
- \}\
- \} failureBlock:^(NSError *error) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (error) \{\
- \
- \}\
- \}];\
- \}\
- \
- \
- \cf2 // inputBar.frame=CGRectMake(0,JX_SCREEN_HEIGHT-JX_SCREEN_TOP-53-_messageText.frame.size.height, JX_SCREEN_WIDTH, 53);\cf4 \
- \
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- _moreView.hidden=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \cf2 //
- \f1 \'b1\'e9\'c0\'fa\'cf\'fb\'cf\'a2\'a3\'ac\'cc\'ed\'bc\'d3\'ca\'b1\'bc\'e4
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 setIsShowTime\cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([_array count]<=\cf7 0\cf4 )\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- JXMessageObject *firstMsg=[_array objectAtIndex:\cf7 0\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!firstMsg.isShowTime) \{\
- \
- firstMsg.isShowTime =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [firstMsg updateIsShowTime];\
- firstMsg.chatMsgHeight = [NSString stringWithFormat:\cf6 @"0"\cf4 ];\
- [firstMsg updateChatMsgHeight];\
- \}\
- \
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i = \cf7 0\cf4 ; i < [_array count] -\cf7 1\cf4 ; i++) \{\
- JXMessageObject *firstMsg=[_array objectAtIndex:i];\
- JXMessageObject *secondMsg=[_array objectAtIndex:(i+\cf7 1\cf4 )];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (([secondMsg.timeSend timeIntervalSince1970]-[firstMsg.timeSend timeIntervalSince1970]>\cf7 15\cf4 *\cf7 60\cf4 ))\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!secondMsg.isShowTime) \{\
- secondMsg.isShowTime =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [secondMsg updateIsShowTime];\
- secondMsg.chatMsgHeight = [NSString stringWithFormat:\cf6 @"0"\cf4 ];\
- [secondMsg updateChatMsgHeight];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (secondMsg.isShowTime) \{\
- secondMsg.isShowTime =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [secondMsg updateIsShowTime];\
- secondMsg.chatMsgHeight = [NSString stringWithFormat:\cf6 @"0"\cf4 ];\
- [secondMsg updateChatMsgHeight];\
- \}\
- \}\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 tableView\cf4 :(UITableView *)tableView \cf11 touchesEnded\cf4 :(NSSet *)touches \cf11 withEvent\cf4 :(UIEvent *)event \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \
- \cf2 //
- \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
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 setNewShowTime\cf4 :(JXMessageObject *)msg\{\
- JXMessageObject *lastMsg=[_array lastObject];\
- NSLog(\cf6 @"%f"\cf4 ,[msg.timeSend timeIntervalSince1970]-[lastMsg.timeSend timeIntervalSince1970]);\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (([msg.timeSend timeIntervalSince1970]-[lastMsg.timeSend timeIntervalSince1970]>\cf7 15\cf4 *\cf7 60\cf4 ))\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!msg.isShowTime) \{\
- msg.isShowTime =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [msg updateIsShowTime];\
- msg.chatMsgHeight = [NSString stringWithFormat:\cf6 @"0"\cf4 ];\
- [msg updateChatMsgHeight];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.isShowTime) \{\
- msg.isShowTime =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [msg updateIsShowTime];\
- msg.chatMsgHeight = [NSString stringWithFormat:\cf6 @"0"\cf4 ];\
- [msg updateChatMsgHeight];\
- \}\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 viewDidLayoutSubviews\cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!
- \f2\b \cf8 self
- \f0\b0 \cf4 .scrollBottom) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_table.contentSize.height > _table.bounds.size.height) \{\
- NSLog(\cf6 @"tableScroll ----- 1"\cf4 );\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGotoLast =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \cf2 //[_table setContentOffset:CGPointMake(0, _table.contentSize.height - _table.bounds.size.height) animated:NO];\cf4 \
- \
- \}\
- \}\
- \
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 1\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
- \
- \cf2 // self.scrollBottom = YES;\cf4 \
- \});\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 ---------tableView
- \f4 \'d0\'ad\'d2\'e9
- \f2 ----------------
- \f0\b0 \cf4 \
- -(NSInteger)\cf11 numberOfSectionsInTableView\cf4 :(UITableView *)tableView\
- \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 \cf7 1\cf4 ;\
- \}\
- -(NSInteger)\cf11 tableView\cf4 :(UITableView *)tableView \cf11 numberOfRowsInSection\cf4 :(NSInteger)section\
- \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 _array.count;\
- \}\
- \
- \cf2 //-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath\{\cf4 \
- \cf2 // JXMessageObject *msg=[_array objectAtIndex:indexPath.row];\cf4 \
- \cf2 //\cf4 \
- \cf12 ///
- \f3 \cf2 / bool isContent = NO;
- \f0 \cf4 \
- \cf12 ///
- \f3 \cf2 / //
- \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
- \f0 \cf4 \
- \cf12 ///
- \f3 \cf2 / for (JXMessageObject * obj in g_xmpp.poolSendRead) \{
- \f0 \cf4 \
- \cf12 ///
- \f3 \cf2 / //
- \f1 \'ba\'ac\'d3\'d0\'a3\'ac\'d6\'b1\'bd\'d3\'cc\'f8\'b9\'fd
- \f0 \cf4 \
- \cf12 ///
- \f3 \cf2 / if ([obj.content isEqualToString:msg.messageId]) \{
- \f0 \cf4 \
- \cf12 ///
- \f3 \cf2 / isContent = YES;
- \f0 \cf4 \
- \cf12 ///
- \f3 \cf2 / break;
- \f0 \cf4 \
- \cf12 ///
- \f3 \cf2 / \}
- \f0 \cf4 \
- \cf12 ///
- \f3 \cf2 / \}
- \f0 \cf4 \
- \cf2 //\}\cf4 \
- \
- -(UITableViewCell *)\cf11 tableView\cf4 :(UITableView *)tableView \cf11 cellForRowAtIndexPath\cf4 :(NSIndexPath *)indexPath\
- \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (indexPath.row >= _array.count) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [[JXBaseChatCell alloc] init];\
- \}\
- \
- JXMessageObject *msg=[_array objectAtIndex:indexPath.row];\
- msg.showRead = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.showRead boolValue];\
- \
- \cf2 // NSLog(@"indexPath.row:%ld,%ld",indexPath.section,indexPath.row);\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid)\{\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \cf2 // msg.roomJid = self.roomJid;\cf4 \
- \}\
- \
- \
- \cf2 //
- \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
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \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) \{\
- memberData *member = [[memberData alloc] init];\
- member.roomId = roomId;\
- memberData *roleM = [member getCardNameById:MY_USER_ID];\
- \cf2 //
- \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
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![msg.isReadDel boolValue] && [roleM.role intValue] !=\cf7 4\cf4 ) \{\
- [msg sendAlreadyReadMsg];\
- \}\
- \}\
- \
- \
- \cf2 //
- \f1 \'b7\'b5\'bb\'d8\'b6\'d4\'d3\'a6\'b5\'c4
- \f0 Cell\cf4 \
- JXBaseChatCell * cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 getCell:msg indexPath:indexPath];\
- cell.selectionStyle = UITableViewCellSelectionStyleNone;\
- cell.isSelectMore =
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore;\
- cell.room = _room;\
- cell.isOpenIntegral = _isOpenIntegral;\
- cell.groupLevelNameArray = _groupLevelNameArray;\
- cell.tag=indexPath.row;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (! [msg.toUserId isEqualToString:MY_USER_ID]) \{\
- \
- \cf2 // memberData *data = [self.room getMember:MY_USER_ID];\cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- \cf2 //memberData *data = [self.room getMember:msg.toUserId];\cf4 \
- \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (indexPath.row==_selectIndexAaaa) \{\
- \
- cell.backgroundColor=[UIColor lightGrayColor];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- cell.backgroundColor=[UIColor clearColor];\
- \
- \}\
- \cf2 // BOOL flag = [data.role intValue] == 1 || [data.role intValue] == 2;\cf4 \
- \cf2 // if (!flag && ![self.chatPerson.allowSpeakCourse boolValue]) \{\cf4 \
- \cf2 // cell.isShowRecordCourse = NO;\cf4 \
- \cf2 // \}else \{\cf4 \
- \cf2 // cell.isShowRecordCourse = YES;\cf4 \
- \cf2 // \}\cf4 \
- \
- \
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([chatPerson.userId rangeOfString:MY_USER_ID].location == NSNotFound) \{\
- cell.isShowRecordCourse =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- cell.isShowRecordCourse =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- cell.msg = msg;\
- \
- cell.isCourse =
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ;\
- cell.indexNum = (
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexPath.row;\
- cell.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- cell.chatCellDelegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- cell.checkBox.selected =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (JXMessageObject *selMsg
- \f2\b \cf8 in
- \f0\b0 \cf4
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([selMsg.messageId isEqualToString:msg.messageId]) \{\
- cell.checkBox.selected =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- cell.readDele =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (readDeleWithUser:);\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeShake) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![msg.fileName isEqualToString:\cf6 @"1"\cf4 ]) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .shakeMsg = msg;\
- \}\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
- cell.isShowHead = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowSendCard boolValue] || _isAdmin;\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isWithdraw =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- memberData *myData = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:g_myself.userId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([myData.role intValue] == \cf7 1\cf4 ) \{\
- isWithdraw =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([myData.role intValue] == \cf7 2\cf4 ) \{\
- memberData *msgData = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:msg.fromUserId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msgData.role intValue] == \cf7 1\cf4 || [msgData.role intValue] == \cf7 2\cf4 ) \{\
- isWithdraw =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- isWithdraw =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- cell.isWithdraw = msg.isMySend || isWithdraw;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- cell.isShowHead =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- cell.isWithdraw = msg.isMySend;\
- \}\
- \cf2 // [cell setHeaderImage];\cf4 \
- \cf2 // [cell setCellData];\cf4 \
- \cf2 // [cell setBackgroundImage];\cf4 \
- \cf2 // [cell isShowSendTime];\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeSuperDelete) \{\
- cell.isSelectMore =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- cell.checkBox.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- cell.readView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- cell.isSelectMore =
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore;\
- [cell setHeaderImage];\
- [cell setCellData];\
- [cell setBackgroundImage];\
- [cell isShowSendTime];\
- \}\
- \
- \
- \cf2 //
- \f1 \'b6\'e0\'d1\'a1\'d7\'b4\'cc\'ac\'cf\'c2\'c8\'a1\'cf\'fb
- \f0 cell
- \f1 \'c4\'da\'bf\'d8\'bc\'fe\'b5\'c4\'b5\'e3\'bb\'f7\'ca\'c2\'bc\'fe
- \f0 \cf4 \
- cell.bubbleBg.userInteractionEnabled = !
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore;\
- \
- \cf2 //
- \f1 \'d7\'aa\'c8\'a6\'b5\'c8\'b4\'fd
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.isSend intValue] == transfer_status_ing) \{\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 flag =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < g_xmpp.poolSend.allKeys.count; i ++) \{\
- NSString *msgId = g_xmpp.poolSend.allKeys[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msgId isEqualToString:msg.messageId]) \{\
- flag =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (flag || msg.isShowWait) \{\
- [cell drawIsSend];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [msg updateIsSend:transfer_status_no];\
- cell.sendFailed.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (indexPath.row == _array.count - \cf7 1\cf4 ) \{\
- \cf2 //
- \f1 \'b4\'c1\'d2\'bb\'b4\'c1
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .shakeMsg) \{\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 value = \cf7 0\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .shakeMsg.isMySend) \{\
- value = -\cf7 50\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- value = \cf7 50\cf4 ;\
- \}\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .shakeMsg =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:\cf6 @"transform.translation.x"\cf4 ];\cf12 ///
- \f1 \cf2 \'ba\'e1\'cf\'f2\'d2\'c6\'b6\'af
- \f0 \cf4 \
- \
- animation.toValue = [NSNumber numberWithInt:value];\
- \
- animation.duration = \cf7 .5\cf4 ;\
- \
- animation.removedOnCompletion =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\cf2 //yes
- \f1 \'b5\'c4\'bb\'b0\'a3\'ac\'d3\'d6\'b7\'b5\'bb\'d8\'d4\'ad\'ce\'bb\'d6\'c3\'c1\'cb\'a1\'a3
- \f0 \cf4 \
- \
- animation.repeatCount = \cf7 2\cf4 ;\
- \
- animation.fillMode = kCAFillModeForwards;\
- \
- \cf2 //
- \f1 \'cc\'ed\'bc\'d3\'d5\'f1\'b6\'af
- \f0 \cf4 \
- \cf2 // AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);\cf4 \
- AudioServicesPlaySystemSound(\cf7 1521\cf4 );\
- [_messageText.inputView.superview.layer addAnimation:animation forKey:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_window.layer addAnimation:animation forKey:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- \}\
- \
- \}\
- msg =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \
- NSLog(\cf6 @"lastIndex === %ld"\cf4 , (
- \f2\b \cf8 long
- \f0\b0 \cf4 )indexPath.row);\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isRefresh && _array.count > \cf7 1\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 doAutoScroll:indexPath];\
- \
- \cf2 // [_table gotoLastRow:NO];\cf4 \
- \}\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- -(CGFloat)\cf11 tableView\cf4 :(UITableView *)tableView \cf11 heightForRowAtIndexPath\cf4 :(NSIndexPath *)indexPath\
- \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (indexPath.row >= _array.count) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 \cf7 0\cf4 ;\
- \}\
- JXMessageObject *msg=[_array objectAtIndex:indexPath.row];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid)\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 ([msg.type intValue]) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeText:\
- \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXMessageCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeImage:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXImageCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeCustomFace:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXFaceCustomCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeEmoji:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXEmojiCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVoice:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXAudioCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeLocation:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXLocationCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeGif:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXGifCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideo:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXVideoCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudio:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXVideoCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeCard:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXCardCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeFile:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXFileCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeRemind:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXRemindCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeSuperDelete:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 \cf7 0\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeRedPacket:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXRedPacketCell getChatCellHeight:msg]-\cf7 40\cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeTransfer:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXTransferCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeSystemImage1:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXSystemImage1Cell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeSystemImage2:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXSystemImage2Cell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudioMeetingInvite:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideoMeetingInvite:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudioChatCancel:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudioChatEnd:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideoChatCancel:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideoChatEnd:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAVBusy:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXAVCallCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeLink:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXLinkCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeShake:\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.content.length>\cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXNewShakeCell getChatCellHeight:msg];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXShakeCell getChatCellHeight:msg];\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeMergeRelay:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXMergeRelayCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeShare:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXShareCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeReply:\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXReplyCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [JXBaseChatCell getChatCellHeight:msg];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 tableView\cf4 :(UITableView *)tableView \cf11 didSelectRowAtIndexPath\cf4 :(NSIndexPath *)indexPath\
- \{\
- JXMessageObject *msgModel=[_array objectAtIndex:indexPath.row];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msgModel.content containsString:\cf6 @"-JXBigWhellVc"\cf4 ]) \{\
- \
- JXBigReelVc *vc=[JXBigReelVc
- \f2\b \cf8 new
- \f0\b0 \cf4 ];\
- \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msgModel.content containsString:\cf6 @""\cf4 ]) \{\
- \
- \}\
- \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore) \{\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'b5\'da\'bc\'b8\'b8\'f6
- \f0 Cell
- \f1 \'b1\'bb\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- \
- _selCell = (JXBaseChatCell*)[_table cellForRowAtIndexPath:indexPath];\
- _selCell.checkBox.selected = !_selCell.checkBox.selected;\
- NSLog(\cf6 @"indexNum = %d, isSelect = %d"\cf4 ,_selCell.indexNum, _selCell.checkBox.selected);\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 chatCell:_selCell checkBoxSelectIndexNum:_selCell.indexNum isSelect:_selCell.checkBox.selected];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- \cf2 // [super tableView:tableView didSelectRowAtIndexPath:indexPath];\cf4 \
- \}\
- \}\
- \
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 scrollViewDidScrollToTop\cf4 :(UIScrollView *)scrollView \{\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 scrollViewDidScroll\cf4 :(UIScrollView *)scrollView \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (scrollView.contentOffset.y <= \cf7 0\cf4 ) \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .jumpNewMsgBtn.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (scrollView.contentOffset.y <
- \f2\b \cf8 self
- \f0\b0 \cf4 .lastY) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isRefresh =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isRefresh =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 // self.lastY = scrollView.contentOffset.y;\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 scrollViewWillBeginDragging\cf4 :(UIScrollView *)scrollView \{\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 -----------------
- \f4 \'bb\'f1\'c8\'a1\'b6\'d4\'d3\'a6\'b5\'c4
- \f2 Cell-----------------
- \f0\b0 \cf4 \
- - (JXBaseChatCell *)\cf11 getCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- JXBaseChatCell * cell =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 ([msg.type intValue]) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeText:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatMessageCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeImage:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatImageCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeCustomFace:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatFaceCustomCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeEmoji:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatEmojiCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVoice:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatAudioCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeLocation:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatLocationCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeGif:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatGifCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideo:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatVideoCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudio:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatVideoCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeCard:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatCardCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeFile:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatFileCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeRemind:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatRemindCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeSuperDelete:\
- cell = [[JXBaseChatCell alloc] init];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeRedPacket:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatRedPacketCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeTransfer:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 createTransferCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeSystemImage1:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatSystemImage1Cell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeSystemImage2:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatSystemImage2Cell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudioMeetingInvite:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideoMeetingInvite:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudioChatCancel:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudioChatEnd:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideoChatCancel:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideoChatEnd:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAVBusy:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatAVCallCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeLink:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatLinkCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeShake:\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.content.length>\cf7 0\cf4 ) \{\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatNewShakeCell:msg indexPath:indexPath];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatShakeCell:msg indexPath:indexPath];\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeMergeRelay:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 creatMergeRelayCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeShare:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 createShareCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeReply:\
- cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 createReplyCell:msg indexPath:indexPath];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
- cell = [[JXBaseChatCell alloc] init];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 -----------------------
- \f4 \'b4\'b4\'bd\'a8\'b6\'d4\'d3\'a6\'b5\'c4
- \f2 Cell---------------------
- \f0\b0 \cf4 \
- \cf2 //
- \f1 \'ce\'c4\'b1\'be
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatMessageCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXMessageCell"\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.isReadDel boolValue]) \{\
- identifier = [NSString stringWithFormat:\cf6 @"JXMessageCell_%ld"\cf4 ,indexPath.row];\
- \}\
- JXMessageCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXMessageCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \
- \}\
- \
- \
-
- \f2\b \cf8 __weak
- \f0\b0 \cf4
- \f2\b \cf8 typeof
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 ) weakSelf =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- cell.block = ^(JXMessageObject *msg) \{\
- [weakSelf.view endEditing:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- _strURLGoback=\cf6 @""\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.content containsString:\cf6 @"===jixinJXBigRellV"\cf4 ]) \{ \cf2 //
- \f1 \'d7\'aa\'c5\'cc
- \f0 \cf4 \
- \
- JXBigReelVc *vc = [JXBigReelVc
- \f2\b \cf8 new
- \f0\b0 \cf4 ];\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.content containsString:\cf6 @"===jixinJXLuckRescueFundVc"\cf4 ]) \{\
- \
- JXLuckRescueFundVc *vc = [JXLuckRescueFundVc
- \f2\b \cf8 new
- \f0\b0 \cf4 ];\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.content containsString:\cf6 @"===jixinJXGoldMangVc"\cf4 ]) \{\
- \
- JXGoldMangVc *vc = [JXGoldMangVc
- \f2\b \cf8 new
- \f0\b0 \cf4 ];\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.content containsString:\cf6 @"===jixinJXApplyViewController"\cf4 ]) \{\
- \
- JXApplyViewController *vc = [JXApplyViewController
- \f2\b \cf8 new
- \f0\b0 \cf4 ];\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}\
- \
- \};\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \cf2 //
- \f1 \'cd\'bc\'c6\'ac
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatImageCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXImageCell"\cf4 ;\
- JXImageCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXImageCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \cf2 // cell.chatImage.delegate = self;\cf4 \
- \cf2 // cell.chatImage.didTouch = @selector(onCellImage:);\cf4 \
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \
- \cf2 //
- \f1 \'d7\'d4\'b6\'a8\'d2\'e5\'b1\'ed\'c7\'e9
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatFaceCustomCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXFaceCustomCell"\cf4 ;\
- JXFaceCustomCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXFaceCustomCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \cf2 // cell.chatImage.delegate = self;\cf4 \
- \cf2 // cell.chatImage.didTouch = @selector(onCellImage:);\cf4 \
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \
- \cf2 //
- \f1 \'b1\'ed\'c7\'e9\'b0\'fc
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatEmojiCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXEmojiCell"\cf4 ;\
- JXEmojiCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXEmojiCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \cf2 // cell.chatImage.delegate = self;\cf4 \
- \cf2 // cell.chatImage.didTouch = @selector(onCellImage:);\cf4 \
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \
- \cf2 //
- \f1 \'ca\'d3\'c6\'b5
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatVideoCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXVideoCell"\cf4 ;\
- JXVideoCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXVideoCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
- cell.videoDelegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- cell.indexTag = indexPath.row;\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \cf2 //
- \f1 \'d2\'f4\'c6\'b5
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatAudioCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXAudioCell"\cf4 ;\
- JXAudioCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXAudioCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
- cell.indexNum = (
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexPath.row;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \cf2 //
- \f1 \'ce\'c4\'bc\'fe
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatFileCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXFileCell"\cf4 ;\
- JXFileCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXFileCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \cf2 //
- \f1 \'ce\'bb\'d6\'c3
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatLocationCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXLocationCell"\cf4 ;\
- JXLocationCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXLocationCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \cf2 //
- \f1 \'c3\'fb\'c6\'ac
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatCardCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXCardCell"\cf4 ;\
- JXCardCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXCardCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \cf2 //
- \f1 \'ba\'ec\'b0\'fc
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatRedPacketCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXRedPacketCell"\cf4 ;\
- JXRedPacketCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXRedPacketCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \cf2 //
- \f1 \'b6\'af\'bb\'ad
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatGifCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXGifCell"\cf4 ;\
- JXGifCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXGifCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \cf2 //
- \f1 \'cf\'b5\'cd\'b3\'cc\'e1\'d0\'d1
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatRemindCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXRemindCell"\cf4 ;\
- JXRemindCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXRemindCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \
- \cf2 //
- \f1 \'b5\'a5\'cc\'f5\'cd\'bc\'ce\'c4
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatSystemImage1Cell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXSystemImage1Cell"\cf4 ;\
- JXSystemImage1Cell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXSystemImage1Cell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \
- \cf2 //
- \f1 \'b6\'e0\'cc\'f5\'cd\'bc\'ce\'c4
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatSystemImage2Cell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXSystemImage2Cell"\cf4 ;\
- JXSystemImage2Cell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXSystemImage2Cell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \
- \cf2 //
- \f1 \'d2\'f4\'ca\'d3\'c6\'b5\'cd\'a8\'bb\'b0
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatAVCallCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXAVCallCell"\cf4 ;\
- JXAVCallCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXAVCallCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \
- \cf2 //
- \f1 \'c1\'b4\'bd\'d3
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatLinkCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXLinkCell"\cf4 ;\
- JXLinkCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXLinkCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \
- \cf2 //
- \f1 \'b4\'c1\'d2\'bb\'b4\'c1
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatShakeCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXShakeCell"\cf4 ;\
- JXShakeCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXShakeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \
- \cf2 //
- \f1 \'b4\'c1\'d2\'bb\'b4\'c1\'d0\'c2
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatNewShakeCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXNewShakeCell"\cf4 ;\
- JXNewShakeCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXNewShakeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \
- \cf2 //
- \f1 \'ba\'cf\'b2\'a2\'d7\'aa\'b7\'a2\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 creatMergeRelayCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath\{\
- NSString * identifier = \cf6 @"JXMergeRelayCell"\cf4 ;\
- JXMergeRelayCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXMergeRelayCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \cf2 //
- \f1 \'b7\'d6\'cf\'ed
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 createShareCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath \{\
- NSString * identifier = \cf6 @"JXShareCell"\cf4 ;\
- JXShareCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXShareCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \cf2 //
- \f1 \'d7\'aa\'d5\'cb
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 createTransferCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath \{\
- NSString * identifier = \cf6 @"JXTransferCell"\cf4 ;\
- JXTransferCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXTransferCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \cf2 //
- \f1 \'bb\'d8\'b8\'b4
- \f0 \cf4 \
- - (JXBaseChatCell *)\cf11 createReplyCell\cf4 :(JXMessageObject *)msg \cf11 indexPath\cf4 :(NSIndexPath *)indexPath \{\
- NSString * identifier = \cf6 @"JXReplyCell"\cf4 ;\
- JXReplyCell *cell=[_table dequeueReusableCellWithIdentifier:identifier];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- cell = [[JXReplyCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 cell;\
- \}\
- \
- \cf2 //
- \f1 \'cf\'d4\'ca\'be\'c8\'ab\'c6\'c1\'ca\'d3\'c6\'b5\'b2\'a5\'b7\'c5
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showVideoPlayerWithTag\cf4 :(NSInteger)tag \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .indexNum = (
- \f2\b \cf8 int
- \f0\b0 \cf4 )tag;\
- \
- _player= [JXVideoPlayer alloc];\
- _player.type = JXVideoTypeChat;\
- _player.isShowHide =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ; \cf2 //
- \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
- \f0 \cf4 \
- _player.isStartFullScreenPlay =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ; \cf2 //
- \f1 \'c8\'ab\'c6\'c1\'b2\'a5\'b7\'c5
- \f0 \cf4 \
- _player.didVideoPlayEnd =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (didVideoPlayEnd);\
- _player.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- JXMessageObject *msg = [_array objectAtIndex:tag];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.isMySend && isFileExist(msg.fileName))\
- _player.videoFile = msg.fileName;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- _player.videoFile = msg.content;\
- _player.isReadDel = [msg.isReadDel boolValue];\
- _player = [_player initWithParent:
- \f2\b \cf8 self
- \f0\b0 \cf4 .view];\
- \
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 .2f\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
- [_player
- \f2\b \cf8 switch
- \f0\b0 \cf4 ];\
- \});\
- \}\
- \
- \
- \cf2 //
- \f1 \'cf\'fa\'bb\'d9\'b2\'a5\'b7\'c5\'c6\'f7
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 didVideoPlayEnd\cf4 \{\
- \cf2 // [[UIApplication sharedApplication] setStatusBarHidden:NO];\cf4 \
- JXVideoCell *cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:
- \f2\b \cf8 self
- \f0\b0 \cf4 .indexNum inSection:\cf7 0\cf4 ]];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell.msg.isMySend) \{\
- [cell deleteMsg];\
- \}\
- \}\
- \
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showOneMsg\cf4 :(JXMessageObject*)msg\{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i=\cf7 0\cf4 ;i<[_array count];i++)\{\
- JXMessageObject* p = (JXMessageObject*)[_array objectAtIndex:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.messageId isEqualToString:msg.messageId])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \cf2 //
- \f1 \'c5\'d0\'b6\'cf\'ca\'c7\'b7\'f1\'d5\'b9\'ca\'be\'ca\'b1\'bc\'e4
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setNewShowTime:msg];\
- CGFloat height = \cf7 0\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_array.count > \cf7 0\cf4 ) \{\
- height = [
- \f2\b \cf8 self
- \f0\b0 \cf4 tableView:_table heightForRowAtIndexPath:[NSIndexPath indexPathForRow:_array.count - \cf7 1\cf4 inSection:\cf7 0\cf4 ]];\
- \}\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 flag =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (fabs(_table.contentOffset.y + _table.frame.size.height - _table.contentSize.height) < height) \{\
- flag =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- msg.isShowWait =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [_array addObject:msg];\
- \cf2 // NSLog(@"_array:%d",msg.retainCount);\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeRedPacket) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![_orderRedPacketArray containsObject:msg]) \{\
- [_orderRedPacketArray addObject:msg];\
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isRefreshing) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 @try
- \f0\b0 \cf4 \{\
- [_table insertRow:(
- \f2\b \cf8 int
- \f0\b0 \cf4 )[_array count]-\cf7 1\cf4 section:\cf7 0\cf4 ];\
- \}
- \f2\b \cf8 @catch
- \f0\b0 \cf4 (NSException *exception) \{\
- \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ((flag || msg.isMySend) && !
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSyncMsg) \{\
- \cf2 // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\cf4 \
- \
- \
- [_table gotoLastRow:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- \cf2 // [_table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:_array.count inSection:0] atScrollPosition:UITableViewScrollPositionNone animated:NO];\cf4 \
- \
- \cf2 // \});\cf4 \
- \}\
- \
- \}\
- \
- \cf2 //
- \f1 \'c9\'cf\'b4\'ab\'cd\'ea\'b3\'c9\'ba\'f3\'a3\'ac\'b7\'a2\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 doSendAfterUpload\cf4 :(NSDictionary*)dict\{\
- \
- NSString* msgId = [dict objectForKey:\cf6 @"oUrl"\cf4 ];\
- msgId = [[msgId lastPathComponent] stringByDeletingPathExtension];\
- NSString* oFileName = [dict objectForKey:\cf6 @"oFileName"\cf4 ];\
- \
- \cf2 // NSString *userId = self.userIds[self.groupMessagesIndex];\cf4 \
- \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
- \
- JXMessageObject* p=
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 found=-\cf7 1\cf4 ;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i=(
- \f2\b \cf8 int
- \f0\b0 \cf4 )[_array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
- p = [_array objectAtIndex:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue]==kWCMessageTypeLocation)\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([[p.fileName lastPathComponent] isEqualToString:[oFileName lastPathComponent]])\{\
- found = i;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue]==kWCMessageTypeFile && ![p.isUpload boolValue])\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([[p.fileName lastPathComponent] isEqualToString:[oFileName lastPathComponent]])\{\
- found = i;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (p.content.length > \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([oFileName rangeOfString:p.content].location != NSNotFound) \{\
- found = i;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \cf2 // if([p.content isEqualToString:msgId])\{\cf4 \
- \cf2 // found = i;\cf4 \
- \cf2 // break;\cf4 \
- \cf2 // \}\cf4 \
- p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (found>=\cf7 0\cf4 )\{\cf2 //
- \f1 \'d5\'d2\'b5\'bd\'cf\'fb\'cf\'a2\'cc\'e5
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([[dict objectForKey:\cf6 @"status"\cf4 ] intValue] != \cf7 1\cf4 )\{\
- NSLog(\cf6 @"doUploadFaire"\cf4 );\
- [p updateIsSend:transfer_status_no];\
- JXBaseChatCell* cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 getCell:found];\
- [cell drawIsSend];\
- cell =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- NSLog(\cf6 @"doSendAfterUpload"\cf4 );\
- p.content = [dict objectForKey:\cf6 @"oUrl"\cf4 ];\
- \cf2 // if (self.isGroupMessages) \{\cf4 \
- \cf2 // p.toUserId = userId;\cf4 \
- \cf2 // \}\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- p.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- p.tempChat=\cf7 1\cf4 ;\
- \}\
- \
- [p updateIsUpload:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \cf2 // [g_xmpp sendMessage:p roomName:self.roomJid];//
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSString *userId
- \f2\b \cf8 in
- \f0\b0 \cf4
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (userId.length>\cf7 10\cf4 ) \{\
- [g_xmpp sendMessage:p roomName:userId];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [g_xmpp sendMessage:p roomName:userId];\
- \}\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [g_xmpp sendMessage:p roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}\
- \
- \cf2 // [self.tableView reloadData];\cf4 \
- \}\
- \
- p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds &&
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex >=
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
- [JXMyTools showTipView:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
- \
- \}\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'c9\'cf\'b4\'ab\'cd\'ea\'b3\'c9\'ba\'f3\'a3\'ac\'b7\'a2\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 doUploadError\cf4 :(JXConnection*)downloader\{\
- NSString* msgId = downloader.userData;\
- msgId = [[msgId lastPathComponent] stringByDeletingPathExtension];\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i=(
- \f2\b \cf8 int
- \f0\b0 \cf4 )[_array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
- JXMessageObject* p = [_array objectAtIndex:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.content isEqualToString:msgId])\{\
- [p updateIsSend:transfer_status_no];\
- [[
- \f2\b \cf8 self
- \f0\b0 \cf4 getCell:i] drawIsSend];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onSendTimeout\cf4 :(NSNotification *)notifacation\cf2 //
- \f1 \'b3\'ac\'ca\'b1\'ce\'b4\'ca\'d5\'b5\'bd\'bb\'d8\'d6\'b4
- \f0 \cf4 \
- \{\
- JXMessageObject *msg = (JXMessageObject *)notifacation.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeWithdraw) \{\
- [_wait stop];\
- \cf2 // [g_App showAlert:Localized(@"JX_WithdrawFailed")];\cf4 \
- [JXMyTools showTipView:Localized(\cf6 @"JX_WithdrawFailed"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i=(
- \f2\b \cf8 int
- \f0\b0 \cf4 )[_array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
- JXMessageObject* p = [_array objectAtIndex:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (p == msg)\{\
- \cf2 // NSLog(@"receive:onSendTimeout");\cf4 \
- [[
- \f2\b \cf8 self
- \f0\b0 \cf4 getCell:i] drawIsSend];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onReceiveFile\cf4 :(NSNotification *)notifacation\cf2 //
- \f1 \'ca\'d5\'b5\'bd\'cf\'c2\'d4\'d8\'d7\'b4\'cc\'ac
- \f0 \cf4 \
- \{\
- JXMessageObject *msg = (JXMessageObject *)notifacation.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i=(
- \f2\b \cf8 int
- \f0\b0 \cf4 )[_array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
- JXMessageObject* p = [_array objectAtIndex:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (p == msg)\{\
- \cf2 // NSLog(@"onReceiveFile");\cf4 \
- [[
- \f2\b \cf8 self
- \f0\b0 \cf4 getCell:i] drawIsReceive];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showMsg\cf4 :(NSNotification *)notifacation\{\
- JXMessageObject *msg = (JXMessageObject *)notifacation.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([[msg getTableName] isEqualToString:chatPerson.userId] && msg.isMySend)\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}\
- \
- \cf5 #pragma mark
- \f4\b \cf16 \'bd\'d3\'ca\'dc\'d0\'c2\'cf\'fb\'cf\'a2\'b9\'e3\'b2\'a5
- \f0\b0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 newMsgCome\cf4 :(NSNotification *)notifacation\{\
- \
- \
- JXMessageObject *msg = (JXMessageObject *)notifacation.object;\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
- \cf2 //
- \f1 \'b8\'fc\'d0\'c2
- \f0 title
- \f1 \'d4\'da\'cf\'df\'d7\'b4\'cc\'ac
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid && !
- \f2\b \cf8 self
- \f0\b0 \cf4 .onlinestate && ![msg.fromUserId isEqualToString:MY_USER_ID]) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .onlinestate =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = Localized(\cf6 @"JX_GroupHair"\cf4 );\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([chatPerson.userId intValue]<\cf7 10100\cf4 && [chatPerson.userId intValue]>=\cf7 10000\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = chatPerson.userNickname;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 // NSString *str = self.onlinestate ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
- \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.remarkName.length > 0 ? chatPerson.remarkName : chatPerson.userNickname,str];\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setChatTitle:chatPerson.remarkName.length > \cf7 0\cf4 ? chatPerson.remarkName : chatPerson.userNickname];\
- \}\
- \}\
- \}\
- \}\
- \
- \cf5 #ifdef Live_Version\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([[JXLiveJidManager shareArray] contains:msg.toUserId] || [[JXLiveJidManager shareArray] contains:msg.fromUserId])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \cf5 #endif\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == XMPP_TYPE_NOBLACK) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.fromUserId isEqualToString:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userId]) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isBeenBlack = \cf7 0\cf4 ;\
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!msg.isVisible)\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid || msg.isGroup) \{\cf2 //
- \f1 \'ca\'c7\'b7\'bf\'bc\'e4
- \f0 \cf4 \
- \
- \
- \cf2 // NSLog(@"---chatViewController %@", [msg mj_keyValues]);\cf4 \
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.isRepeat) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.toUserId isEqualToString:chatPerson.userId]||[msg.toId isEqualToString:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid]) \{\cf2 //
- \f1 \'b5\'da\'d2\'bb\'b8\'f6\'c5\'d0\'b6\'cf\'ca\'b1\'b4\'d3
- \f0 MsgView
- \f1 \'bd\'f8\'c8\'eb\'a3\'ac\'b5\'da\'b6\'fe\'b8\'f6\'b4\'d3
- \f0 GroupView
- \f1 \'bd\'f8\'c8\'eb
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.fromId isEqualToString:chatPerson.userId]||[msg.fromId isEqualToString:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid])\cf2 //
- \f1 \'b5\'da\'d2\'bb\'b8\'f6\'c5\'d0\'b6\'cf\'ca\'b1\'b4\'d3
- \f0 MsgView
- \f1 \'bd\'f8\'c8\'eb\'a3\'ac\'b5\'da\'b6\'fe\'b8\'f6\'b4\'d3
- \f0 GroupView
- \f1 \'bd\'f8\'c8\'eb
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeSuperDelete) \{\
- JXMessageObject *newMsg;\
- NSInteger index = \cf7 0\cf4 ;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _array.count; i ++) \{\
- JXMessageObject *withDrawMsg = _array[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.content isEqualToString:withDrawMsg.messageId]) \{\
- newMsg = withDrawMsg;\
- index = i;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!newMsg) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- newMsg.isShowTime =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- newMsg.type = [NSNumber numberWithInt:kWCMessageTypeSuperDelete];\
- \cf2 // newMsg.content = Localized(@"JX_AlreadyWithdraw");\cf4 \
- newMsg.content = \cf6 @""\cf4 ;\
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- s = chatPerson.userId;\
- newMsg.fromUserId = MY_USER_ID;\
- newMsg.toUserId = s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex == _array.count - \cf7 1\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .lastMsg.content = newMsg.content;\
- \}\
- [newMsg updateLastSend:UpdateLastSendType_None];\
- [newMsg update];\
- [newMsg notifyNewMsg];\
- [_wait stop];\
- [_table reloadRow:(
- \f2\b \cf8 int
- \f0\b0 \cf4 )index section:\cf7 0\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type integerValue] == kWCMessageTypeRemind && !msg.isShowRemind) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.fromUserId isEqualToString:MY_USER_ID] && [msg.type intValue] == kWCMessageTypeWithdraw) \{\
- \
- JXMessageObject *newMsg;\
- NSInteger index = \cf7 0\cf4 ;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _array.count; i ++) \{\
- JXMessageObject *withDrawMsg = _array[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.content isEqualToString:withDrawMsg.messageId]) \{\
- newMsg = withDrawMsg;\
- index = i;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!newMsg) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- newMsg.isShowTime =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- newMsg.type = [NSNumber numberWithInt:kWCMessageTypeRemind];\
- newMsg.content = Localized(\cf6 @"JX_AlreadyWithdraw"\cf4 );\
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- s = chatPerson.userId;\
- newMsg.fromUserId = MY_USER_ID;\
- newMsg.toUserId = s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex == _array.count - \cf7 1\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .lastMsg.content = newMsg.content;\
- \}\
- [newMsg updateLastSend:UpdateLastSendType_None];\
- [newMsg update];\
- [newMsg notifyNewMsg];\
- [_wait stop];\
- [_table reloadRow:(
- \f2\b \cf8 int
- \f0\b0 \cf4 )index section:\cf7 0\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.fromUserId isEqualToString:chatPerson.userId] || ([msg.fromUserId isEqualToString:MY_USER_ID] && [msg.toUserId isEqualToString:chatPerson.userId]))\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}\
- msg =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \cf2 //
- \f1 \'b7\'a2\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 newReceipt\cf4 :(NSNotification *)notifacation\{\cf2 //
- \f1 \'d0\'c2\'bb\'d8\'d6\'b4
- \f0 \cf4 \
- \cf2 // NSLog(@"newReceipt");\cf4 \
- JXMessageObject *msg = (JXMessageObject *)notifacation.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg ==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeWithdraw) \{\
- JXMessageObject *msg1 = _array[
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex];\
- msg1.isShowTime =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- msg1.type = [NSNumber numberWithInt:kWCMessageTypeRemind];\
- msg1.content = Localized(\cf6 @"JX_AlreadyWithdraw"\cf4 );\
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- s = chatPerson.userId;\
- msg1.fromUserId = MY_USER_ID;\
- msg1.toUserId = s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex == _array.count - \cf7 1\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .lastMsg.content = msg1.content;\
- \}\
- [msg1 updateLastSend:UpdateLastSendType_None];\
- [msg1 update];\
- [msg1 notifyNewMsg];\
- [_wait stop];\
- [_table reloadRow:(
- \f2\b \cf8 int
- \f0\b0 \cf4 )
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex section:\cf7 0\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeSuperDelete) \{\
- JXMessageObject *msg1 = _array[
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex];\
- msg1.isShowTime =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- msg1.type = [NSNumber numberWithInt:kWCMessageTypeNone];\
- msg1.content = \cf6 @"
- \f1 \'c4\'e3\'c9\'be\'b3\'fd\'c1\'cb\'d2\'bb\'cc\'f5\'cf\'fb\'cf\'a2
- \f0 "\cf4 ;\
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- s = chatPerson.userId;\
- msg1.fromUserId = MY_USER_ID;\
- msg1.toUserId = s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex == _array.count - \cf7 1\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .lastMsg.content = msg1.content;\
- \}\
- [msg1 updateLastSend:UpdateLastSendType_None];\
- [msg1 update];\
- [msg1 notifyNewMsg];\
- [_wait stop];\
- [_table reloadRow:(
- \f2\b \cf8 int
- \f0\b0 \cf4 )
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex section:\cf7 0\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([chatPerson.userId rangeOfString: msg.fromUserId].location != NSNotFound || [chatPerson.userId rangeOfString: msg.toUserId].location != NSNotFound || [msg.toUserId isEqualToString:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid] )\{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i=(
- \f2\b \cf8 int
- \f0\b0 \cf4 )[_array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
- JXMessageObject* p = [_array objectAtIndex:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.messageId isEqualToString:msg.messageId])\{\
- \
- JXBaseChatCell* cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 getCell:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (p != msg) \{\
- cell.msg = msg;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (cell)\
- [cell drawIsSend];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 sharemore
- \f4 \'b0\'b4\'c5\'a5\'d7\'e9\'d0\'ad\'d2\'e9
- \f0\b0 \cf4 \
- \cf2 //
- \f1 \'d5\'d5\'c6\'ac\'d1\'a1\'d4\'f1\'c6\'f7
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 pickPhoto\cf4 \
- \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- RITLPhotosViewController *photoController = RITLPhotosViewController.photosViewController;\
- photoController.configuration.maxCount = \cf7 9\cf4 ;\cf2 //
- \f1 \'d7\'ee\'b4\'f3\'b5\'c4\'d1\'a1\'d4\'f1\'ca\'fd\'c4\'bf
- \f0 \cf4 \
- photoController.configuration.containVideo =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\cf2 //
- \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
- \f0 \cf4 \
- \
- photoController.photo_delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- photoController.thumbnailSize = CGSizeMake(\cf7 320\cf4 , \cf7 320\cf4 );\cf2 //
- \f1 \'cb\'f5\'c2\'d4\'cd\'bc\'b5\'c4\'b3\'df\'b4\'e7
- \f0 \cf4 \
- \cf2 // photoController.defaultIdentifers = self.saveAssetIds;//
- \f1 \'bc\'c7\'c2\'bc\'d2\'d1\'be\'ad\'d1\'a1\'d4\'f1\'b9\'fd\'b5\'c4\'d7\'ca\'d4\'b4
- \f0 \cf4 \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 presentViewController:photoController animated:
- \f2\b \cf8 true
- \f0\b0 \cf4 completion:^\{\}];\
- \
- \cf2 // UIImagePickerController *imgPicker=[[UIImagePickerController alloc]init];\cf4 \
- \cf2 // [imgPicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];\cf4 \
- \cf2 // [imgPicker setDelegate:self];\cf4 \
- \cf2 // [imgPicker setAllowsEditing:NO];\cf4 \
- \cf12 ///
- \f3 \cf2 / [g_App.window addSubview:imgPicker.view];
- \f0 \cf4 \
- \cf2 //\cf4 \
- \cf2 // [self presentViewController:imgPicker animated:YES completion:^\{\}];\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendPhotos\cf4 :(NSArray <
- \f2\b \cf8 id
- \f0\b0 \cf4 > *)datas \cf11 withOriginal\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )isOriginal\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isGroupSendCancel) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
- NSString *name = \cf6 @"jpg"\cf4 ;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < datas.count; i ++) \{\
- UIImage *chosedImage = datas[i];\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
- NSString *file = [FileInfo getUUIDFileName:name];\
- [g_server saveImageToFile:chosedImage file:file isOriginal:isOriginal];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:userId];\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendPhotos:datas withOriginal:isOriginal];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 photosViewController\cf4 :(UIViewController *)viewController \cf11 assets\cf4 :(NSArray <PHAsset *> *)assets \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .imgDataArr = assets;\
- \
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 -
- \f4 \'b7\'a2\'cb\'cd\'cd\'bc\'c6\'ac
- \f0\b0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 photosViewController\cf4 :(UIViewController *)viewController \cf11 datas\cf4 :(NSArray <
- \f2\b \cf8 id
- \f0\b0 \cf4 > *)datas; \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \cf2 // if (datas.count == 0) \{\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i = \cf7 0\cf4 ; i < datas.count; i++) \{\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isGif = [datas[i] isKindOfClass:[NSData
- \f2\b \cf8 class
- \f0\b0 \cf4 ]];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isGif) \{\
- \cf2 // GIF\cf4 \
- NSString *file = [FileInfo getUUIDFileName:\cf6 @"gif"\cf4 ];\
- [g_server saveDataToFile:datas[i] file:file];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImage:file withWidth:\cf7 0\cf4 andHeight:\cf7 0\cf4 userId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 //
- \f1 \'c6\'d5\'cd\'a8\'cd\'bc\'c6\'ac
- \f0 \cf4 \
- UIImage *chosedImage = datas[i];\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1
- \f0 image
- \f1 \'b5\'c4\'b3\'a4\'bf\'ed
- \f0 \cf4 \
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
- NSString *name = \cf6 @"jpg"\cf4 ;\
- NSString *file = [FileInfo getUUIDFileName:name];\
- [g_server saveImageToFile:chosedImage file:file isOriginal:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \}\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 -
- \f4 \'b7\'a2\'cb\'cd\'ca\'d3\'c6\'b5
- \f0\b0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 photosViewController\cf4 :(UIViewController *)viewController \cf11 media\cf4 :(JXMediaObject *)media \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
- \cf2 // NSString *userId = self.userIds[i];\cf4 \
- \cf2 //\cf4 \
- \cf2 // [self sendMedia:media userId:userId];\cf4 \
- \cf12 ///
- \f3 \cf2 / [g_server uploadFile:media.fileName validTime:self.chatPerson.chatRecordTimeOut messageId:self.curMessageId toView:self];
- \f0 \cf4 \
- \cf2 // \}\cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMedia:media userId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 // [g_server uploadFile:media.fileName validTime:self.chatPerson.chatRecordTimeOut messageId:self.curMessageId toView:self];\cf4 \
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 photosViewController\cf4 :(UIViewController *)viewController \cf11 imageAndVideos\cf4 :(NSDictionary *)imageAndVideosDic\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- NSArray *imageArr = [imageAndVideosDic objectForKey:\cf6 @"images"\cf4 ];\
- NSArray *mediaArr = [imageAndVideosDic objectForKey:\cf6 @"videos"\cf4 ];\
- NSInteger num = imageArr.count + mediaArr.count;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:num withType:groupsend_msgType_imagesAndVideos];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithArray:imageArr];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray addObjectsFromArray:mediaArr];\
- _onceSendNum = \cf7 20\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (imageArr.count + mediaArr.count > \cf7 1\cf4 ) \{\
- _onceSendNum = \cf7 1\cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (mediaArr.count > \cf7 0\cf4 ) \{\
- _onceSendNum = \cf7 1\cf4 ;\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .imgsAndVideosDic = imageAndVideosDic;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImagesAndVideos:imageAndVideosDic];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendMedias\cf4 :(NSArray *)mediaArray \cf11 isSave\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )isSave\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isGroupSendCancel) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
- JXMediaObject *media = mediaArray.lastObject;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMedia:media userId:userId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isSave) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 saveVideo:media.fileName];\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMedias:mediaArray isSave:isSave];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendImagesAndVideos\cf4 :(NSDictionary *)imageAndVideosDic\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isGroupSendCancel) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
- NSArray *imageArr = [imageAndVideosDic objectForKey:\cf6 @"images"\cf4 ];\
- NSArray *mediaArr = [imageAndVideosDic objectForKey:\cf6 @"videos"\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (imageArr.count > \cf7 0\cf4 ) \{\
- NSString *name = \cf6 @"jpg"\cf4 ;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < imageArr.count; i++) \{\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isGif = [imageArr[i] isKindOfClass:[NSData
- \f2\b \cf8 class
- \f0\b0 \cf4 ]];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isGif) \{\
- NSString *file = [FileInfo getUUIDFileName:\cf6 @"gif"\cf4 ];\
- [g_server saveDataToFile:imageArr[i] file:file];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImage:file withWidth:\cf7 0\cf4 andHeight:\cf7 0\cf4 userId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- UIImage *chosedImage = imageArr[i];\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
- NSString *file = [FileInfo getUUIDFileName:name];\
- [g_server saveImageToFile:chosedImage file:file isOriginal:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:userId];\
- \}\
- \}\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (mediaArr.count > \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < mediaArr.count; i++) \{\
- JXMediaObject *media = mediaArr[i];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMedia:media userId:userId];\
- \}\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_onceSendNum == \cf7 1\cf4 ||
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImagesAndVideos:imageAndVideosDic];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onCamera\cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![
- \f2\b \cf8 self
- \f0\b0 \cf4 checkCameraLimits]) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- JXCameraVC *vc = [[JXCameraVC alloc] init];\
- vc.cameraDelegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 presentViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 completion:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- \cf2 // UIImagePickerController *imgPicker=[[UIImagePickerController alloc]init];\cf4 \
- \cf2 // [imgPicker setSourceType:UIImagePickerControllerSourceTypeCamera];\cf4 \
- \cf2 // [imgPicker setDelegate:self];\cf4 \
- \cf2 // [imgPicker setAllowsEditing:NO];\cf4 \
- \cf2 // // [g_App.window addSubview:imgPicker.view];\cf4 \
- \cf2 //\cf4 \
- \cf2 // [self presentViewController:imgPicker animated:YES completion:^\{\}];\cf4 \
- \
- \}\
- \
- \cf2 //
- \f1 \'b4\'c1\'d2\'bb\'b4\'c1\'b6\'af\'bb\'ad
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onShake\cf4 \{\
- XLsn0wInputBox *inputBox = [[XLsn0wInputBox alloc] init];\
- NSString *name = chatPerson.remarkName.length > \cf7 0\cf4 ? chatPerson.remarkName : chatPerson.userNickname;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
- inputBox.title.text = [NSString stringWithFormat:\cf6 @"
- \f1 \'c4\'fa\'c8\'b7\'b6\'a8\'d2\'aa\'b4\'c1\'c8\'ba\'c4\'da\'cb\'f9\'d3\'d0\'c8\'cb\'c2\'f0
- \f0 ?"\cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- inputBox.title.text = [NSString stringWithFormat:\cf6 @"
- \f1 \'c4\'fa\'d2\'aa\'b4\'c1
- \f0 %@
- \f1 \'c9\'cf\'cf\'df\'c2\'f0
- \f0 ?"\cf4 ,name];\
- \}\
- inputBox.placeholder = \cf6 @"
- \f1 \'cc\'ee\'d0\'b4
- \f0 \\"
- \f1 \'d5\'f0
- \f0 \\"
- \f1 \'c4\'da\'c8\'dd\'bb\'f2\'b5\'e3\'bb\'f7
- \f0 \\"
- \f1 \'c8\'b7\'b6\'a8
- \f0 \\"
- \f1 \'d6\'b1\'bd\'d3\'d5\'f0
- \f0 "\cf4 ;\
- [inputBox confirmBtnClickBlock:^(NSString *inputString) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showShakeMessage:inputString];\
- \}];\
- [inputBox show];\
- \}\
- \cf2 //
- \f1 \'c1\'c4\'cc\'ec\'bd\'e7\'c3\'e6\'b4\'c1\'d2\'bb\'b4\'c1
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showShakeMessage\cf4 :(NSString *)message \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
- \cf2 // [JXMyTools showTipView:@"
- \f1 \'c8\'ba\'d7\'e9\'d4\'dd\'b2\'bb\'d6\'a7\'b3\'d6\'b8\'c3\'b9\'a6\'c4\'dc\'a3\'a1
- \f0 "];\cf4 \
- \cf2 // return;\cf4 \
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isGroupSendCancel) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex == \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_shake];\
- _onceSendNum = \cf7 20\cf4 ;\
- \}\
- \}\
- \
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
- \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- msg.toUserId = userId;\
- msg.isGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ((
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex + \cf7 1\cf4 ) % _onceSendNum == \cf7 0\cf4 ) \{\
- msg.isLastGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- \}\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.content = message;\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeShake];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- \cf2 //
- \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
- \f0 \cf4 \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- msg.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.tempChat=\cf7 1\cf4 ;\
- \}\
- \
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- _groupSendType = groupsend_msgType_shake;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.isLastGroupSend) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onShake];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}\
- \
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'ca\'d5\'b2\'d8
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onCollection\cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- WeiboViewControlle * collection = [[WeiboViewControlle alloc] initCollection];\
- collection.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- collection.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [g_navigation pushViewController:collection animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'ca\'d6\'bb\'fa\'c1\'aa\'cf\'b5\'c8\'cb
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onAddressBook\cf4 \{\
- JXSelectAddressBookVC *vc = [[JXSelectAddressBookVC alloc] init];\
- vc.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- \cf2 //
- \f1 \'c8\'ba\'d6\'fa\'ca\'d6
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onGroupHelper\cf4 \{\
- [g_server queryGroupHelper:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \
- \cf2 //
- \f1 \'cc\'f8\'d7\'aa\'c8\'ba\'d6\'fa\'ca\'d6\'c1\'d0\'b1\'ed
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onGroupHelperList\cf4 \{\
- JXGroupHelperListVC *vc = [[JXGroupHelperListVC alloc] init];\
- vc.roomJid =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- vc.roomId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomId;\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 selectAddressBookVC\cf4 :(JXSelectAddressBookVC *)selectVC \cf11 doneAction\cf4 :(NSArray *)array \{\
- \
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
- \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isGroupSendCancel) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex == \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:array.count withType:groupsend_msgType_addressbook];\
- _onceSendNum = \cf7 20\cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendMsgArray = [NSMutableArray arrayWithArray:array];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:selectVC];\
- \}\
- \}\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isLastGroupSend =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ;i < array.count;i++)\{\
- JXAddressBook *address = array[i];\
- \
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- msg.toUserId = userId;\
- msg.isGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ((
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex + \cf7 1\cf4 ) % _onceSendNum == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (i == array.count - \cf7 1\cf4 ) \{\
- msg.isLastGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- isLastGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- \}\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.content = [NSString stringWithFormat:\cf6 @"%@\\n%@"\cf4 , address.addressBookName, address.toTelephone];\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- msg.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.tempChat=\cf7 1\cf4 ;\
- \}\
- \
- \
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- _groupSendType = groupsend_msgType_addressbook;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isLastGroupSend) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 selectAddressBookVC:selectVC doneAction:array];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 weiboVC\cf4 :(WeiboViewControlle *)weiboVC \cf11 didSelectWithData\cf4 :(WeiboData *)data \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (data.type == \cf7 1\cf4 ) \{\
- \
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
- \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isGroupSendCancel) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex == \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_collect];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendMsgArray = [NSMutableArray arrayWithObject:data];\
- _onceSendNum = \cf7 20\cf4 ;\
- \}\
- \}\
- \
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- msg.toUserId = userId;\
- msg.isGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
- msg.isLastGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- \}\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.content = data.content;\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete];\
- \
- \cf2 //
- \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
- \f0 \cf4 \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- msg.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.tempChat=\cf7 1\cf4 ;\
- \}\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.isLastGroupSend) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 weiboVC:weiboVC didSelectWithData:data];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- NSString *url;\
- NSMutableArray *imgArr = [NSMutableArray array];\
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 (data.type) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 2\cf4 :\{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (ObjUrlData *dict
- \f2\b \cf8 in
- \f0\b0 \cf4 data.larges) \{\
- NSString *imgUrl = dict.url;\
- [imgArr addObject:imgUrl];\
- \}\
- \cf2 // url = ((ObjUrlData *)data.larges.firstObject).url;\cf4 \
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 3\cf4 :\
- url = ((ObjUrlData *)data.audios.firstObject).url;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 4\cf4 :\
- url = ((ObjUrlData *)data.videos.firstObject).url;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 5\cf4 :\
- url = ((ObjUrlData *)data.files.firstObject).url;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- _collectionData = data;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isGroupSendCancel) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- NSInteger i = \cf7 0\cf4 ;\
- NSMutableArray *allArray = [NSMutableArray array];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (data.content && data.content.length > \cf7 0\cf4 ) \{\
- i = i + \cf7 1\cf4 ;\
- [allArray addObject:data.content];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (imgArr.count > \cf7 0\cf4 ) \{\
- i = i + imgArr.count;\
- [allArray addObjectsFromArray:imgArr];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- i = i + \cf7 1\cf4 ;\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:i withType:groupsend_msgType_collect];\
- _onceSendNum = \cf7 20\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (imgArr.count > \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendMsgArray = allArray;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 collectionMsgSendAll:allArray];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- [g_server uploadCopyFileServlet:url validTime:g_config.fileValidTime toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- \cf2 //
- \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
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (data.content && data.content.length > \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 collectionMsgSend:data.content isFile:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (imgArr.count > \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i = \cf7 0\cf4 ; i < imgArr.count; i++ ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 collectionMsgSend:imgArr[i] isFile:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [g_server uploadCopyFileServlet:url validTime:g_config.fileValidTime toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \}\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 collectionMsgSendAll\cf4 :(NSArray *)allArray\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isGroupSendCancel) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < allArray.count; i++) \{\
- NSString *content = allArray[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (i == \cf7 0\cf4 && _collectionData.content && _collectionData.content.length > \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 collectionMsgSendOne:content withUserId:userId isText:
- \f2\b \cf8 YES
- \f0\b0 \cf4 isLast:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ((
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex+\cf7 1\cf4 ) % _onceSendNum == \cf7 0\cf4 && i == allArray.count - \cf7 1\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 collectionMsgSendOne:content withUserId:userId isText:
- \f2\b \cf8 NO
- \f0\b0 \cf4 isLast:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 collectionMsgSendOne:content withUserId:userId isText:
- \f2\b \cf8 NO
- \f0\b0 \cf4 isLast:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 collectionMsgSendAll:allArray];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 collectionMsgSendOne\cf4 :(NSString *)content \cf11 withUserId\cf4 :(NSString *)userId \cf11 isText\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )isText \cf11 isLast\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )isLast\{\
- \
- JXMessageObject *msg = [[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
- msg.toUserId = userId;\
- msg.isGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.isLastGroupSend = isLast;\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- msg.content = content;\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isText) \{\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 (_collectionData.type) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 2\cf4 :\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 3\cf4 :\{\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeVoice];\
- ObjUrlData *obj = _collectionData.audios.firstObject;\
- msg.timeLen = obj.timeLen;\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 4\cf4 :\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeVideo];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 5\cf4 :\{\
- msg.fileName = ((ObjUrlData *)_collectionData.files.firstObject).name;\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeFile];\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- msg.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.tempChat=\cf7 1\cf4 ;\
- \}\
- \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 cameraVC\cf4 :(JXCameraVC *)vc \cf11 didFinishWithImage\cf4 :(UIImage *)image \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1
- \f0 image
- \f1 \'b5\'c4\'b3\'a4\'bf\'ed
- \f0 \cf4 \
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageWidth = image.size.width;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageHeight = image.size.height;\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.frame = CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT);\
- NSString *name = \cf6 @"jpg"\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
- \cf2 // NSString *userId = self.userIds[i];\cf4 \
- \cf2 //\cf4 \
- \cf2 // NSString *file = [FileInfo getUUIDFileName:name];\cf4 \
- \cf2 // [g_server saveImageToFile:image file:file isOriginal:NO];\cf4 \
- \cf2 // [self sendImage:file withWidth:imageWidth andHeight:imageHeight userId:userId];\cf4 \
- \cf12 ///
- \f3 \cf2 / [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];
- \f0 \cf4 \
- \cf2 // \}\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_image];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:image];\
- _onceSendNum = \cf7 10\cf4 ;\
- _isOriginal =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendPhotos:
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray withOriginal:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- NSString *file = [FileInfo getUUIDFileName:name];\
- [g_server saveImageToFile:image file:file isOriginal:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
- \}\
- \
- \cf2 // NSString* file = [FileInfo getUUIDFileName:name];\cf4 \
- \cf2 //\cf4 \
- \cf2 // [g_server saveImageToFile:image file:file isOriginal:NO];\cf4 \
- \cf12 ///
- \f3 \cf2 / [self sendImage:file withWidth:imageWidth andHeight:imageHeight];
- \f0 \cf4 \
- \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut toView:self];\cf4 \
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 ----------
- \f4 \'cd\'bc\'c6\'ac\'d1\'a1\'d4\'f1\'cd\'ea\'b3\'c9
- \f2 -------------
- \f0\b0 \cf4 \
- \cf2 //UIImagePickerController
- \f1 \'b4\'fa\'c0\'ed\'b7\'bd\'b7\'a8
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 imagePickerController\cf4 :(UIImagePickerController *)picker \cf11 didFinishPickingMediaWithInfo\cf4 :(NSDictionary *)info\
- \{\
- UIImage * chosedImage=[info objectForKey:\cf6 @"UIImagePickerControllerOriginalImage"\cf4 ];\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1
- \f0 image
- \f1 \'b5\'c4\'b3\'a4\'bf\'ed
- \f0 \cf4 \
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 dismissViewControllerAnimated:
- \f2\b \cf8 NO
- \f0\b0 \cf4 completion:^\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.frame = CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT);\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \
- NSURL *url = [info objectForKey:\cf6 @"UIImagePickerControllerReferenceURL"\cf4 ];\
- NSString *urlStr = [url absoluteString];\
- NSString *name = [urlStr substringFromIndex:urlStr.length - \cf7 3\cf4 ];\
- name = [name lowercaseString];\
- \
- NSString* file = [FileInfo getUUIDFileName:name];\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([name isEqualToString:\cf6 @"gif"\cf4 ]) \{ \cf2 // gif
- \f1 \'b2\'bb\'c4\'dc\'b0\'b4\'d5\'d5
- \f0 image
- \f1 \'c8\'a1
- \f0 data
- \f1 \'b4\'e6\'b4\'a2
- \f0 \cf4 \
- ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init];\
- \
-
- \f2\b \cf8 void
- \f0\b0 \cf4 (^ALAssetsLibraryAssetForURLResultBlock)(ALAsset *) = ^(ALAsset *asset) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (asset !=
- \f2\b \cf8 nil
- \f0\b0 \cf4 ) \{\
- \
- ALAssetRepresentation *rep = [asset defaultRepresentation];\
- Byte *imageBuffer = (Byte*)malloc(rep.size);\
- NSUInteger bufferSize = [rep getBytes:imageBuffer fromOffset:\cf7 0.0\cf4 length:rep.size error:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- NSData *imageData = [NSData dataWithBytesNoCopy:imageBuffer length:bufferSize freeWhenDone:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count; i ++) \{\
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[i];\
- \
- NSString *file = [FileInfo getUUIDFileName:name];\
- [g_server saveDataToFile:imageData file:file];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:userId];\
- \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- NSString *file = [FileInfo getUUIDFileName:name];\
- [g_server saveDataToFile:imageData file:file];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
- \}\
- \cf2 // [g_server saveDataToFile:imageData file:file];\cf4 \
- \cf12 ///
- \f3 \cf2 / [self sendImage:file withWidth:imageWidth andHeight:imageHeight];
- \f0 \cf4 \
- \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut toView:self];\cf4 \
- \
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \}\
- \};\
- \
- [assetLibrary assetForURL:url\
- resultBlock:ALAssetsLibraryAssetForURLResultBlock\
- failureBlock:^(NSError *error) \{\
- \
- \}];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- name = \cf6 @"jpg"\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
- \cf2 // NSString *userId = self.userIds[i];\cf4 \
- \cf2 //\cf4 \
- \cf2 // NSString *file = [FileInfo getUUIDFileName:name];\cf4 \
- \cf2 // [g_server saveImageToFile:chosedImage file:file isOriginal:NO];\cf4 \
- \cf2 // [self sendImage:file withWidth:imageWidth andHeight:imageHeight userId:userId];\cf4 \
- \cf12 ///
- \f3 \cf2 / [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];
- \f0 \cf4 \
- \cf2 // \}\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_image];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:chosedImage];\
- _onceSendNum = \cf7 10\cf4 ;\
- _isOriginal =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendPhotos:
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray withOriginal:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- NSString *file = [FileInfo getUUIDFileName:name];\
- [g_server saveImageToFile:chosedImage file:file isOriginal:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImage:file withWidth:imageWidth andHeight:imageHeight userId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
- \}\
- \cf2 // file = [FileInfo getUUIDFileName:name];\cf4 \
- \cf2 // [g_server saveImageToFile:chosedImage file:file isOriginal:NO];\cf4 \
- \cf12 ///
- \f3 \cf2 / [self sendImage:file withWidth:imageWidth andHeight:imageHeight];
- \f0 \cf4 \
- \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut toView:self];\cf4 \
- \}\
- \
- \
- \cf2 // [picker release];\cf4 \
- \}];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 imagePickerControllerDidCancel\cf4 :(UIImagePickerController *)picker\
- \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 dismissViewControllerAnimated:
- \f2\b \cf8 NO
- \f0\b0 \cf4 completion:^\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.frame = CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT);\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \cf2 // [picker release];\cf4 \
- \}];\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 -
- \f4 \'c2\'bc\'d6\'c6\'d3\'ef\'d2\'f4
- \f0\b0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 recordStart\cf4 :(UIButton *)sender \{\
- NSLog(\cf6 @"recordStart-------"\cf4 );\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording)\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![
- \f2\b \cf8 self
- \f0\b0 \cf4 canRecord]) \{\
- [g_App showAlert:Localized(\cf6 @"JX_CanNotOpenMicr"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 // _recordBtn.layer.borderColor = [[UIColor blueColor] CGColor];\cf4 \
- _recordBtn.backgroundColor = HEXCOLOR(\cf7 0xB8B9BD\cf4 );\
- \
- [g_notify postNotificationName:kAllAudioPlayerPauseNotifaction object:
- \f2\b \cf8 self
- \f0\b0 \cf4 userInfo:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify postNotificationName:kAllVideoPlayerPauseNotifaction object:
- \f2\b \cf8 self
- \f0\b0 \cf4 userInfo:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- recording=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
- NSDictionary *settings=[NSDictionary dictionaryWithObjectsAndKeys:\
- [NSNumber numberWithFloat:\cf7 8000\cf4 ],AVSampleRateKey,\
- [NSNumber numberWithInt:kAudioFormatLinearPCM],AVFormatIDKey,\
- [NSNumber numberWithInt:\cf7 1\cf4 ],AVNumberOfChannelsKey,\
- [NSNumber numberWithInt:\cf7 16\cf4 ],AVLinearPCMBitDepthKey,\
- [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ],AVLinearPCMIsBigEndianKey,\
- [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ],AVLinearPCMIsFloatKey,\
-
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- NSError *error;\
- [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayAndRecord error: &error];\
- [[AVAudioSession sharedInstance] setActive:
- \f2\b \cf8 YES
- \f0\b0 \cf4 error:&error];\
- \
- NSURL *url = [NSURL fileURLWithPath:[FileInfo getUUIDFileName:\cf6 @"wav"\cf4 ]];\
- pathURL = url;\
- \
- audioRecorder = [[AVAudioRecorder alloc] initWithURL:pathURL settings:settings error:&error];\
- audioRecorder.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- \
- peakTimer = [NSTimer scheduledTimerWithTimeInterval:\cf7 0.01\cf4 target:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (updatePeak:) userInfo:
- \f2\b \cf8 nil
- \f0\b0 \cf4 repeats:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- [peakTimer fire];\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 flag =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- flag = [audioRecorder prepareToRecord];\
- [audioRecorder setMeteringEnabled:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- flag = [audioRecorder peakPowerForChannel:\cf7 1\cf4 ];\
- flag = [audioRecorder record];\
- \
- _voice.center =
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.center;\
- [_voice show];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 updatePeak\cf4 :(NSTimer*)timer\
- \{\
- _timeLen = audioRecorder.currentTime;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_timeLen>=\cf7 60\cf4 )\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 recordStop:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [audioRecorder updateMeters];\
-
- \f2\b \cf8 const
- \f0\b0 \cf4
- \f2\b \cf8 double
- \f0\b0 \cf4 alpha=\cf7 0.5\cf4 ;\
- NSLog(\cf6 @"peakPowerForChannel = %f,%f"\cf4 , [audioRecorder peakPowerForChannel:\cf7 0\cf4 ],[audioRecorder peakPowerForChannel:\cf7 1\cf4 ]);\
-
- \f2\b \cf8 double
- \f0\b0 \cf4 peakPowerForChannel=pow(\cf7 10\cf4 , (\cf7 0.05\cf4 )*[audioRecorder peakPowerForChannel:\cf7 0\cf4 ]);\
- lowPassResults=alpha*peakPowerForChannel+(\cf7 1.0\cf4 -alpha)*lowPassResults;\
- _voice.volume = lowPassResults;\
- \
- \cf2 /* for (int i=1; i<8; i++) \{\cf4 \
- \cf2 if (lowPassResults>1.0/7.0*i)\{\cf4 \
- \cf2 [[talkView viewWithTag:i] setHidden:NO];\cf4 \
- \cf2 \}else\{\cf4 \
- \cf2 [[talkView viewWithTag:i] setHidden:YES];\cf4 \
- \cf2 \}\cf4 \
- \cf2 \}*/\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 recordStop\cf4 :(UIButton *)sender \{\
- \
- [_voice hide];\
- [peakTimer invalidate];\
- peakTimer =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- recording =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \
- \cf2 // if(!recording)\cf4 \
- \cf2 // return;\cf4 \
- \
- _recordBtn.layer.borderColor = [[UIColor grayColor] CGColor];\
- _recordBtn.backgroundColor = HEXCOLOR(\cf7 0xFEFEFE\cf4 );\
- _timeLen = audioRecorder.currentTime;\
- [audioRecorder pause];\
- [audioRecorder stop];\
- \cf2 // [audioRecorder release];\cf4 \
- \cf2 // if (_timeLen<1) \{\cf4 \
- \cf2 // [g_App showAlert:@"
- \f1 \'c2\'bc\'b5\'c4\'ca\'b1\'bc\'e4\'b9\'fd\'b6\'cc
- \f0 \cf4 \
- \cf2 // "];\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_timeLen<\cf7 1\cf4 )\
- _timeLen = \cf7 1\cf4 ;\
- NSString *amrPath = [VoiceConverter wavToAmr:pathURL.path];\
- [[ChatCacheFileUtil sharedInstance] deleteWithContentPath:pathURL.path];\
- _lastRecordFile = [[amrPath lastPathComponent] copy];\
- \
- \cf2 // NSLog(@"
- \f1 \'d2\'f4\'c6\'b5\'ce\'c4\'bc\'fe\'c2\'b7\'be\'b6
- \f0 :%@\\n%@",pathURL.path,amrPath);\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (amrPath ==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\{\
- \cf2 // [g_App showAlert:Localized(@"JXChatVC_TimeLess")];\cf4 \
- [g_server showMsg:Localized(\cf6 @"JXChatVC_TimeLess"\cf4 ) delay:\cf7 1.0\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
- \cf2 // NSString *userId = self.userIds[i];\cf4 \
- \cf2 //\cf4 \
- \cf2 // [self sendVoice:amrPath userId:userId];\cf4 \
- \cf2 // [g_server uploadFile:amrPath validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
- \cf2 // \}\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_audio];\
- _onceSendNum = \cf7 15\cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:amrPath];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendVoices:
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendVoice:amrPath userId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_server uploadFile:amrPath validTime:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendVoices\cf4 :(NSArray *)voicesArray\{\
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
- NSString *amrPath = voicesArray.lastObject;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendVoice:amrPath userId:userId];\
- [g_server uploadFile:amrPath validTime:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendVoices:voicesArray];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \cf2 //
- \f1 \'c2\'bc\'d2\'f4\'bd\'e8\'cb\'de
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 audioRecorderDidFinishRecording\cf4 :(AVAudioRecorder *)recorder \cf11 successfully\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )flag\{\
- [_voice hide];\
- [peakTimer invalidate];\
- peakTimer =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- recording =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \
- \
-
- \f2\b \cf8 long
- \f0\b0 \cf4 time = (
- \f2\b \cf8 long
- \f0\b0 \cf4 )[[NSDate date] timeIntervalSince1970];\
- time = (time *\cf7 1000\cf4 + g_server.timeDifference);\
- NSString *salt = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , time];\
- [g_server getact_act_act_getGroupaudio:salt jid:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid andToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 recordCancel\cf4 :(UIButton *)sender\
- \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!recording)\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- _recordBtn.layer.borderColor = [[UIColor grayColor] CGColor];\
- _recordBtn.backgroundColor = HEXCOLOR(\cf7 0xFEFEFE\cf4 );\
- [audioRecorder stop];\
- audioRecorder =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- [[ChatCacheFileUtil sharedInstance] deleteWithContentPath:pathURL.path];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendVoice\cf4 :(NSString*)file \cf11 userId\cf4 :(NSString *)userId\{\
- \
- \cf2 //
- \f1 \'c9\'fa\'b3\'c9\'cf\'fb\'cf\'a2\'b6\'d4\'cf\'f3
- \f0 \cf4 \
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- msg.toUserId = userId;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- \}\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- msg.fileName = file;\
- msg.content = [[file lastPathComponent] stringByDeletingPathExtension];\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeVoice];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isUpload = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.timeLen = [NSNumber numberWithInt:_timeLen];\
- \
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete];\
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \cf2 // [msg release];\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendGif\cf4 :(NSString *)str \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- NSString *message = str;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (message.length > \cf7 0\cf4 ) \{\
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.fileData =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \cf2 // msg.fileName = message;\cf4 \
- msg.content = message;\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeGif];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- msg.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.tempChat=\cf7 1\cf4 ;\
- \}\
- \
- \
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \cf2 // [msg release];\cf4 \
- \}\
- \cf2 // [_messageText setText:nil];\cf4 \
- \}\
- \
- \
- \cf5 #pragma mark
- \f2\b \cf16 -
- \f4 \'ca\'e4\'c8\'eb
- \f2 TextField
- \f4 \'b4\'fa\'c0\'ed
- \f0\b0 \cf4 \
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 doBeginEdit\cf4 \{\
- \
- \cf2 /*\cf4 \
- \cf2 _table.frame = CGRectMake(0, 0, JX_SCREEN_WIDTH, self.view.frame.size.height-self.heightFooter);\cf4 \
- \cf2 self.tableFooter.frame = CGRectMake(0,self.view.frame.size.height -_keyboardHeight-self.heightFooter-_faceView.faceView.frame.size.height, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- \cf2 \cf4 \
- \cf2 NSLog(@"doBeginEdit :%@",NSStringFromCGRect( _faceView.faceView.frame));\cf4 \
- \cf2 NSLog(@"frame :%@",NSStringFromCGRect( self.view.frame));\cf4 \
- \cf2 */\cf4 \
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 doEndEdit\cf4 \{\
- \
- \
- \cf2 /*\cf4 \
- \cf2 if (_messageText.isFirstResponder) \{\cf4 \
- \cf2 \cf4 \
- \cf2 [_faceView removeFromSuperview];\cf4 \
- \cf2 \cf4 \
- \cf2 _table.frame = CGRectMake(0, 0, JX_SCREEN_WIDTH, self.view.frame.size.height-self.heightFooter);\cf4 \
- \cf2 \cf4 \
- \cf2 self.tableFooter.frame = CGRectMake(0,JX_SCREEN_HEIGHT-JX_SCREEN_TOP -(_keyboardHeight+self.heightFooter), JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- \cf2 \cf4 \
- \cf2 _btnFace.selected = NO;\cf4 \
- \cf2 [_messageText resignFirstResponder];\cf4 \
- \cf2 _messageText.inputView = nil;\cf4 \
- \cf2 self.deltaHeight = 0;\cf4 \
- \cf2 self.screenShotView.frame = CGRectMake(self.screenShotView.frame.origin.x, self.tableFooter.frame.origin.y - self.screenShotView.frame.size.height - 10, self.screenShotView.frame.size.width, self.screenShotView.frame.size.height);\cf4 \
- \cf2 \cf4 \
- \cf2 \}\cf4 \
- \cf2 \cf4 \
- \cf2 if (_faceView && !_faceView.hidden) \{\cf4 \
- \cf2 _faceView.hidden = YES;\cf4 \
- \cf2 [_faceView removeFromSuperview];\cf4 \
- \cf2 _table.frame = CGRectMake(0, 44, JX_SCREEN_WIDTH, self.view.frame.size.height-self.heightFooter-0);\cf4 \
- \cf2 self.tableFooter.frame = CGRectMake(0,JX_SCREEN_HEIGHT-JX_SCREEN_TOP-self.heightFooter-JX_SCREEN_HEIGHT>=812?34:50, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- \cf2 \}\cf4 \
- \cf2 \cf4 \
- \cf2 */\cf4 \
- \
- \cf2 //[_table gotoLastRow:NO];\cf4 \
- \cf2 // [self setTableFooterFrame:_messageText];\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 textFieldShouldBeginEditing\cf4 :(UITextField *)textField\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 doBeginEdit];\
- _btnFace.selected =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \cf2 // if([[NSDate date] timeIntervalSince1970] <= _disableSay)\cf4 \
- \cf2 // return NO;\cf4 \
- \cf2 // else\cf4 \
- \cf2 // return YES;\cf4 \
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 textFieldShouldEndEditing\cf4 :(UITextField *)textField \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 doEndEdit];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 ) \cf11 hideKeyboard\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )gotoLastRow\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (gotoLastRow)\
- \cf2 // [_table gotoLastRow:NO];\cf4 \
- _btnFace.selected =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [_messageText resignFirstResponder];\
- _messageText.inputView =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .deltaHeight = \cf7 0\cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 doEndEdit];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareMore.selected =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame = CGRectMake(
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.origin.x,
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableFooter.frame.origin.y -
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.size.height - \cf7 10\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.size.width,
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.size.height);\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 textFieldShouldReturn\cf4 :(UITextField *)textField \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (textField.tag == kWCMessageTypeGif)\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendGif:textField.text];\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendIt:textField];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 actionFace\cf4 :(UIButton*)sender\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareMore.selected =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _messageText.inputView =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- [_messageText reloadInputViews];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 \cf15 offRecordBtns\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (sender.\cf14 selected\cf4 )\{\
- \cf2 // [self doBeginEdit];\cf4 \
- [\cf15 _messageText\cf4 \cf14 becomeFirstResponder\cf4 ];\
- [\cf15 _faceView\cf4 \cf14 removeFromSuperview\cf4 ];\
- \cf15 _faceView\cf4 .\cf14 hidden\cf4 =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- sender.\cf14 selected\cf4 =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 tableFooter\cf4 .\cf14 frame\cf4 =\cf14 CGRectMake\cf4 (\cf7 0\cf4 ,\cf5 JX_SCREEN_HEIGHT\cf4 -\cf5 JX_SCREEN_TOP\cf4 -\cf7 50\cf4 -\cf15 _keyboardHeight\cf4 ,\cf5 self_width\cf4 ,\cf7 53\cf4 );\
- \cf15 _table\cf4 .\cf14 frame\cf4 =\cf14 CGRectMake\cf4 (\cf7 0\cf4 ,\cf7 0\cf4 ,\cf5 self_width\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 -
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightFooter\cf4 );\
- \
- [\cf15 inputBar\cf4 \cf15 mas_makeConstraints\cf4 :^(\cf9 MASConstraintMaker\cf4 *make) \{\
- make.\cf15 bottom\cf4 .\cf5 mas_equalTo\cf4 (-(\cf5 JX_SCREEN_HEIGHT\cf4 >=\cf7 812\cf4 ?\cf7 40\cf4 :\cf7 10\cf4 )-_keyboardHeight);\
- make.\cf15 left\cf4 .\cf15 right\cf4 .\cf5 mas_equalTo\cf4 (\cf7 0\cf4 );\
- make.\cf15 height\cf4 .\cf5 mas_equalTo\cf4 (\cf5 tableBarHHH\cf4 );\
- \
- \}];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 _faceView\cf4 ==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\{\
- \cf15 _faceView\cf4 = \cf5 g_App\cf4 .\cf15 faceView\cf4 ;\
- \cf15 _faceView\cf4 .\cf15 delegate\cf4 =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- \}\
- [\cf15 _messageText\cf4 \cf14 resignFirstResponder\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 \cf14 addSubview\cf4 :\cf15 _faceView\cf4 ];\
- \cf15 _faceView\cf4 .\cf14 hidden\cf4 =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- sender.\cf14 selected\cf4 =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
- \cf2 // [_faceView mas_makeConstraints:^(MASConstraintMaker *make) \{\cf4 \
- \cf2 // make.bottom.mas_equalTo(0);\cf4 \
- \cf2 // make.left.right.mas_equalTo(0);\cf4 \
- \cf2 // make.height.mas_equalTo(JX_SCREEN_HEIGHT>=812?229:249);\cf4 \
- \cf2 //\cf4 \
- \cf2 // \}];\cf4 \
- \cf15 _faceView\cf4 .\cf14 frame\cf4 =\cf14 CGRectMake\cf4 (\cf7 0\cf4 ,\cf5 JX_SCREEN_HEIGHT\cf4 -\cf7 229\cf4 -\cf5 JX_SCREEN_TOP\cf4 ,\cf5 self_width\cf4 ,\cf7 229\cf4 );\
- \cf2 // [_faceView selectType:0];\cf4 \
- \cf2 // [self doBeginEdit];\cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 deltaHeight\cf4 = -\cf5 faceHeight\cf4 ;\
- \cf2 // [self setTableFooterFrame:_messageText];\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (\cf15 _array\cf4 .\cf14 count\cf4 >\cf7 7\cf4 ) \{\
- \cf2 // self.tableFooter.frame =CGRectMake(0,JX_SCREEN_HEIGHT-_faceView.faceView.frame.size.height-JX_SCREEN_TOP,self_width,53);\cf4 \
- \cf15 _table\cf4 .\cf14 frame\cf4 =\cf14 CGRectMake\cf4 (\cf7 0\cf4 ,-\cf15 _faceView\cf4 .\cf15 faceView\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 +\cf5 JX_SCREEN_TOP\cf4 ,\cf5 self_width\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 -
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightFooter\cf4 -\cf7 53\cf4 );\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 // self.tableFooter.frame =CGRectMake(0,JX_SCREEN_HEIGHT-_faceView.faceView.frame.size.height-JX_SCREEN_TOP,self_width,53);\cf4 \
- \
- \cf2 //
- \f1 \'d0\'de\'b8\'c4\'c1\'cb
- \f0 \cf4 \
- \cf15 _table\cf4 .\cf14 frame\cf4 =\cf14 CGRectMake\cf4 (\cf7 0\cf4 ,\cf7 44\cf4 ,\cf5 self_width\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf14 view\cf4 .\cf14 frame\cf4 .\cf14 size\cf4 .\cf14 height\cf4 -
- \f2\b \cf8 self
- \f0\b0 \cf4 .\cf15 heightFooter\cf4 );\
- \}\
- \
- [\cf15 inputBar\cf4 \cf15 mas_makeConstraints\cf4 :^(\cf9 MASConstraintMaker\cf4 *make) \{\
- make.\cf15 bottom\cf4 .\cf5 mas_equalTo\cf4 (_faceView.mas_top).\cf5 mas_equalTo\cf4 (\cf7 0\cf4 );\
- make.\cf15 left\cf4 .\cf15 right\cf4 .\cf5 mas_equalTo\cf4 (\cf7 0\cf4 );\
- make.\cf15 height\cf4 .\cf5 mas_equalTo\cf4 (\cf5 tableBarHHH\cf4 );\
- \
- \}];\
- \}\
- \
- \
- \
- \
- \
- \
- \
- \cf2 // [self doBeginEdit];\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 selectImageNameString\cf4 :(\cf10 NSString\cf4 *)imageName \cf11 ShortName\cf4 :(\cf10 NSString\cf4 *)shortName \cf11 isSelectImage\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )isSelectImage \{\
- \cf2 //
- \f1 \'c8\'e7\'b9\'fb\'b2\'bb\'ca\'c7
- \f0 delete
- \f1 \'cf\'ec\'d3\'a6
- \f0 ,
- \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
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![shortName \cf14 isEqualToString\cf4 :\cf6 @""\cf4 ] && \cf15 _messageText\cf4 .\cf14 textColor\cf4 == [\cf10 UIColor\cf4 \cf14 lightGrayColor\cf4 ]) \{\
- \cf15 _messageText\cf4 .\cf14 text\cf4 = \cf6 @""\cf4 ;\cf2 //
- \f1 \'d6\'c3\'bf\'d5
- \f0 \cf4 \
- \cf15 _messageText\cf4 .\cf14 textColor\cf4 = [\cf10 UIColor\cf4 \cf14 blackColor\cf4 ];\
- \}\
- \
- \cf9 EmojiTextAttachment\cf4 *attachment = [[\cf9 EmojiTextAttachment\cf4 \cf14 alloc\cf4 ] \cf14 init\cf4 ];\
- attachment.\cf15 emojiTag\cf4 = shortName;\
- attachment.\cf14 image\cf4 = [\cf10 UIImage\cf4 \cf14 imageNamed\cf4 :imageName];\
- 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 );\
- \cf2 // attachment.emojiSize = CGSizeMake(_messageText.font.lineHeight, _messageText.font.lineHeight);\cf4 \
- \
- \cf10 NSRange\cf4 newRange = \cf14 NSMakeRange\cf4 (\cf15 _messageText\cf4 .\cf14 selectedRange\cf4 .\cf14 location\cf4 + \cf7 1\cf4 , \cf7 0\cf4 );\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_messageText.selectedRange.length > \cf7 0\cf4 ) \{\
- [_messageText.textStorage deleteCharactersInRange:_messageText.selectedRange];\
- \}\
- [_messageText.textStorage insertAttributedString:[NSAttributedString attributedStringWithAttachment:attachment] atIndex:_messageText.selectedRange.location];\
- \
- _messageText.selectedRange = newRange;\
- _messageText.font = SYSFONT(\cf7 18\cf4 );\
- \
- [_messageText scrollRangeToVisible:NSMakeRange(_messageText.text.length, \cf7 1\cf4 )];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isSelectImage) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .deltaHeight = -faceHeight;\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setTableFooterFrame:_messageText];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 faceViewDeleteAction\cf4 \{\
- [_messageText deleteBackward];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 selectGifWithString\cf4 :(NSString *)str \{\
- \cf2 // _messageText.text = str;\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendGif:str];\
- \}\
- \
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'b1\'ed\'c7\'e9\'b0\'fc\'b1\'ed\'c7\'e9
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 selectEmojiPackgeWithString\cf4 :(NSString *)str \{\
- \
- UIImage * chosedImage=[[SDImageCache sharedImageCache] imageFromMemoryCacheForKey:str];\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1
- \f0 image
- \f1 \'b5\'c4\'b3\'a4\'bf\'ed
- \f0 \cf4 \
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
- NSString *s = [str pathExtension];\
- NSString* file = [FileInfo getUUIDFileName:s];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count; i ++) \{\
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[i];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
- \
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
- msg.toUserId = userId;\
- \cf2 //
- \f1 \'c8\'ba
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([userId length]>\cf7 10\cf4 )\{\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.fileName = file;\
- msg.content = str;\
- \cf2 // msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\cf4 \
- \cf2 //
- \f1 \'b8\'c4\'b3\'c9
- \f0 kWCMessageTypeEmoji=12,
- \f1 \'d7\'d4\'b6\'a8\'d2\'e5\'b5\'c4\'b1\'ed\'c7\'e9\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- msg.type = [NSNumber numberWithInt:kWCMessageTypeEmoji];\
- \cf2 // msg.remindType = [NSNumber numberWithInt:kWCMessageTypeCustomFace];\cf4 \
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isUpload = [NSNumber numberWithBool:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'d0\'c2\'cc\'ed\'bc\'d3\'b5\'c4\'cd\'bc\'c6\'ac\'bf\'ed\'b8\'df
- \f0 \cf4 \
- msg.location_x = [NSNumber numberWithInt:imageWidth];\
- msg.location_y = [NSNumber numberWithInt:imageHeight];\
- \
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete];\
- \
- [msg insert:userId];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- msg.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.tempChat=\cf7 1\cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([userId length]>\cf7 10\cf4 )\{\
- [g_xmpp sendMessage:msg roomName:userId];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'d0\'b4\'c8\'eb\'ca\'fd\'be\'dd\'bf\'e2
- \f0 \cf4 \
- NSArray *array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds;\
- NSString *userIdsString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userNames;\
- NSString *userNamesString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userNamesWithGroup;\
- NSString *userNamesWithGroupString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- NSString *sendTime = [NSString stringWithFormat:\cf6 @"%@"\cf4 , msg.dictionary[\cf6 @"timeSend"\cf4 ]];\
- \
- array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userNmaesWithFriend;\
- NSString *userNmaesWithFriendString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- \
- JXLabelObject *obj = JXLabelObject.sharedInstance;\
- obj.userId = msg.fromUserId;\
- obj.userIds = userIdsString;\
- obj.text1 = _names;\
- obj.text2 = _names2;\
- obj.userNames = userNamesString;\
- obj.userNamesWithGroup = userNamesWithGroupString;\
- obj.message = \cf6 @"[
- \f1 \'b1\'ed\'c7\'e9
- \f0 ]"\cf4 ;\
- obj.sendTime = sendTime;\
- obj.userNmaesWithFriend = userNmaesWithFriendString;\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 succeed = [obj insertRecord];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (succeed) \{\
- [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
- [g_notify postNotificationName:kGroupHelperRefreshNotif object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_navigation popToViewController:[CYGroupSendHelperViewController
- \f2\b \cf8 class
- \f0\b0 \cf4 ] animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 //
- \f1 \'b5\'a5\'c1\'c4
- \f0 ,
- \f1 \'c8\'ba\'c1\'c4
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.fileName = file;\
- msg.content = str;\
- \cf2 // msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\cf4 \
- \cf2 //
- \f1 \'b8\'c4\'b3\'c9
- \f0 kWCMessageTypeEmoji=12,
- \f1 \'b1\'ed\'c7\'e9\'b0\'fc\'b1\'ed\'c7\'e9\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- msg.type = [NSNumber numberWithInt:kWCMessageTypeEmoji];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isUpload = [NSNumber numberWithBool:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'d0\'c2\'cc\'ed\'bc\'d3\'b5\'c4\'cd\'bc\'c6\'ac\'bf\'ed\'b8\'df
- \f0 \cf4 \
- msg.location_x = [NSNumber numberWithInt:imageWidth];\
- msg.location_y = [NSNumber numberWithInt:imageHeight];\
- \
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete];\
- \cf2 // msg.remindType = [NSNumber numberWithInt:kWCMessageTypeEmoji];\cf4 \
- \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- msg.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.tempChat=\cf7 1\cf4 ;\
- \}\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \cf2 // [msg release];\cf4 \
- \}\
- \}\
- \
- \
- \}\
- \
- \
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'ca\'d5\'b2\'d8\'b1\'ed\'c7\'e9
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 selectFavoritWithString\cf4 :(NSString *)str \{\
- \
- UIImage * chosedImage=[[SDImageCache sharedImageCache] imageFromMemoryCacheForKey:str];\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1
- \f0 image
- \f1 \'b5\'c4\'b3\'a4\'bf\'ed
- \f0 \cf4 \
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageWidth = chosedImage.size.width;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 imageHeight = chosedImage.size.height;\
- NSString *s = [str pathExtension];\
- NSString* file = [FileInfo getUUIDFileName:s];\
- \
- \cf2 //
- \f1 \'c8\'ba\'b7\'a2\'d6\'fa\'ca\'d6
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isCYMSGgroupANDFriendy) \{\
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count; i ++) \{\
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[i];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
- msg.toUserId = userId;\
- \cf2 //
- \f1 \'c8\'ba
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([userId length]>\cf7 10\cf4 )\{\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.fileName = file;\
- msg.content = str;\
- \cf2 // msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\cf4 \
- \cf2 //
- \f1 \'b8\'c4\'b3\'c9
- \f0 kWCMessageTypeCustomFace=11,
- \f1 \'d7\'d4\'b6\'a8\'d2\'e5\'b5\'c4\'b1\'ed\'c7\'e9\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- msg.type = [NSNumber numberWithInt:kWCMessageTypeCustomFace];\
- \cf2 // msg.remindType = [NSNumber numberWithInt:kWCMessageTypeCustomFace];\cf4 \
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isUpload = [NSNumber numberWithBool:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'d0\'c2\'cc\'ed\'bc\'d3\'b5\'c4\'cd\'bc\'c6\'ac\'bf\'ed\'b8\'df
- \f0 \cf4 \
- msg.location_x = [NSNumber numberWithInt:imageWidth];\
- msg.location_y = [NSNumber numberWithInt:imageHeight];\
- \
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete];\
- \
- [msg insert:userId];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- msg.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.tempChat=\cf7 1\cf4 ;\
- \}\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([userId length]>\cf7 10\cf4 )\{\
- [g_xmpp sendMessage:msg roomName:userId];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}\
- \
- \}\
- \}\
- \cf2 //
- \f1 \'d0\'b4\'c8\'eb\'ca\'fd\'be\'dd\'bf\'e2
- \f0 \cf4 \
- NSArray *array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds;\
- NSString *userIdsString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userNames;\
- NSString *userNamesString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userNamesWithGroup;\
- NSString *userNamesWithGroupString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- NSString *sendTime = [NSString stringWithFormat:\cf6 @"%@"\cf4 , msg.dictionary[\cf6 @"timeSend"\cf4 ]];\
- \
- array =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userNmaesWithFriend;\
- NSString *userNmaesWithFriendString = [array componentsJoinedByString:\cf6 @","\cf4 ];\
- \
- JXLabelObject *obj = JXLabelObject.sharedInstance;\
- obj.userId = msg.fromUserId;\
- obj.userIds = userIdsString;\
- obj.text1 = _names;\
- obj.text2 = _names2;\
- obj.userNames = userNamesString;\
- obj.userNamesWithGroup = userNamesWithGroupString;\
- obj.message = \cf6 @"[
- \f1 \'cd\'bc\'c6\'ac
- \f0 ]"\cf4 ;\
- obj.sendTime = sendTime;\
- obj.userNmaesWithFriend = userNmaesWithFriendString;\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 succeed = [obj insertRecord];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (succeed) \{\
- [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
- [g_notify postNotificationName:kGroupHelperRefreshNotif object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_navigation popToViewController:[CYGroupSendHelperViewController
- \f2\b \cf8 class
- \f0\b0 \cf4 ] animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 //
- \f1 \'b5\'a5\'c1\'c4
- \f0 ,
- \f1 \'c8\'ba\'c1\'c4
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.fileName = file;\
- msg.content = str;\
- \cf2 // msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\cf4 \
- \cf2 //
- \f1 \'b8\'c4\'b3\'c9
- \f0 kWCMessageTypeCustomFace=11,
- \f1 \'d7\'d4\'b6\'a8\'d2\'e5\'b5\'c4\'b1\'ed\'c7\'e9\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- msg.type = [NSNumber numberWithInt:kWCMessageTypeCustomFace];\
- \cf2 // msg.remindType = [NSNumber numberWithInt:kWCMessageTypeCustomFace];\cf4 \
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isUpload = [NSNumber numberWithBool:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'d0\'c2\'cc\'ed\'bc\'d3\'b5\'c4\'cd\'bc\'c6\'ac\'bf\'ed\'b8\'df
- \f0 \cf4 \
- msg.location_x = [NSNumber numberWithInt:imageWidth];\
- msg.location_y = [NSNumber numberWithInt:imageHeight];\
- \
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete];\
- \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- msg.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.tempChat=\cf7 1\cf4 ;\
- \}\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \cf2 // [msg release];\cf4 \
- \}\
- \
- \}\
- \
- \
- \}\
- \
- \cf2 //
- \f1 \'c8\'a1\'cf\'fb\'ca\'d5\'b2\'d8
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 deleteFavoritWithString\cf4 :(NSString *)str \{\
- \cf2 // [g_server userEmojiDeleteWithId:str toView:self];\cf4 \
- [g_server faceClollectDeleteFaceClollect:str View:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 textView\cf4 :(UITextView *)textView \cf11 shouldChangeTextInRange\cf4 :(NSRange)range \cf11 replacementText\cf4 :(NSString *)text \{\
- \cf2 //
- \f1 \'d6\'bb\'d3\'d0\'cb\'ae\'d3\'a1\'ca\'b1\'a3\'ac\'b2\'bb\'c4\'dc
- \f0 send\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([text isEqualToString:\cf6 @"\\n"\cf4 ] && textView.textColor == [UIColor lightGrayColor]) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \cf2 //
- \f1 \'c8\'e7\'b9\'fb\'b2\'bb\'ca\'c7
- \f0 delete
- \f1 \'cf\'ec\'d3\'a6
- \f0 ,
- \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
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![text isEqualToString:\cf6 @""\cf4 ] && textView.textColor == [UIColor lightGrayColor]) \{\
- textView.text = \cf6 @""\cf4 ;\cf2 //
- \f1 \'d6\'c3\'bf\'d5
- \f0 \cf4 \
- textView.textColor = [UIColor blackColor];\
- \}\
- \
- NSMutableArray *arr = [NSMutableArray array];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 getImageRange:text array:arr];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (arr.count > \cf7 1\cf4 ) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < arr.count; i ++) \{\
- NSString *str = arr[i];\
- NSInteger n;\
- \
- _messageText.font = SYSFONT(\cf7 18\cf4 );\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([str hasPrefix:\cf6 @"["\cf4 ]&&[str hasSuffix:\cf6 @"]"\cf4 ] && [g_faceVC.shortNameArrayE containsObject:str]) \{\
- n = [g_faceVC.shortNameArrayE indexOfObject:str];\
- NSDictionary *dic = [g_constant.emojiArray objectAtIndex:n];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 selectImageNameString:dic[\cf6 @"filename"\cf4 ] ShortName:str isSelectImage:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- NSLog(\cf6 @""\cf4 );\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 // NSMutableString *textViewStr = [_messageText.text mutableCopy];\cf4 \
- \cf2 // [textViewStr insertString:str atIndex:_messageText.selectedRange.location];\cf4 \
- \cf2 // _messageText.text = textViewStr;\cf4 \
- NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];\
- paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping;\
- NSRange newRange = NSMakeRange(_messageText.selectedRange.location + str.length, \cf7 0\cf4 );\
- [_messageText.textStorage insertAttributedString:[[NSAttributedString alloc] initWithString:str attributes:\cf7 @\{\cf4 NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:SYSFONT(\cf7 18\cf4 )\cf7 \}\cf4 ] atIndex:_messageText.selectedRange.location];\
- \
- _messageText.selectedRange = newRange;\
- \
- [_messageText scrollRangeToVisible:NSMakeRange(_messageText.text.length, \cf7 1\cf4 )];\
- \}\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setTableFooterFrame:textView];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([text isEqualToString:\cf6 @"\\n"\cf4 ])\{ \cf2 //
- \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
- \f0 return\cf4 \
- \cf2 //
- \f1 \'d4\'da\'d5\'e2\'c0\'ef\'d7\'f6\'c4\'e3\'cf\'ec\'d3\'a6
- \f0 return
- \f1 \'bc\'fc\'b5\'c4\'b4\'fa\'c2\'eb
- \f0 \cf4 \
- \cf2 // if(textView.tag == kWCMessageTypeGif)\cf4 \
- \cf2 // [self sendGif:textView];\cf4 \
- \cf2 // else\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- _onceSendNum = \cf7 20\cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_text];\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendIt:textView];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setTableFooterFrame:textView];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ; \cf2 //
- \f1 \'d5\'e2\'c0\'ef\'b7\'b5\'bb\'d8
- \f0 NO
- \f1 \'a3\'ac\'be\'cd\'b4\'fa\'b1\'ed
- \f0 return
- \f1 \'bc\'fc\'d6\'b5\'ca\'a7\'d0\'a7\'a3\'ac\'bc\'b4\'d2\'b3\'c3\'e6\'c9\'cf\'b0\'b4\'cf\'c2
- \f0 return
- \f1 \'a3\'ac\'b2\'bb\'bb\'e1\'b3\'f6\'cf\'d6\'bb\'bb\'d0\'d0\'a3\'ac\'c8\'e7\'b9\'fb\'ce\'aa
- \f0 yes
- \f1 \'a3\'ac\'d4\'f2\'ca\'e4\'c8\'eb\'d2\'b3\'c3\'e6\'bb\'e1\'bb\'bb\'d0\'d0
- \f0 \cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([text isEqualToString:\cf6 @"@"\cf4 ] && [
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!
- \f2\b \cf8 self
- \f0\b0 \cf4 .isShowAT) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isShowAT =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \cf2 //@
- \f1 \'c8\'ba\'b3\'c9\'d4\'b1
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 performSelector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (showAtSelectMemberView) withObject:
- \f2\b \cf8 nil
- \f0\b0 \cf4 afterDelay:\cf7 0.35\cf4 ];\
- \}\
- \}\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- \
- \cf5 #pragma mark
- \f2\b \cf16 -
- \f4 \'d3\'d0\'b1\'ed\'c7\'e9\'b5\'c4
- \f2 txt
- \f4 \'d7\'aa\'bb\'bb\'b3\'c9
- \f2
- \f4 \'ba\'ac\'cd\'bc\'c6\'ac\'b5\'c4
- \f2 txt
- \f0\b0 \cf4 \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 changeEmjoyText\cf4 :(NSString *)text \cf11 textColor\cf4 :(UIColor *)textColor \{\
- NSMutableArray *arr = [NSMutableArray array];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 getImageRange:text array:arr];\
- NSRange newRange = _messageText.selectedRange;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (arr.count > \cf7 1\cf4 ) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < arr.count; i ++) \{\
- NSString *str = arr[i];\
- NSInteger n;\
- \
- _messageText.font = SYSFONT(\cf7 18\cf4 );\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([str hasPrefix:\cf6 @"["\cf4 ]&&[str hasSuffix:\cf6 @"]"\cf4 ] && [g_faceVC.shortNameArrayE containsObject:str]) \{\
- n = [g_faceVC.shortNameArrayE indexOfObject:str];\
- NSDictionary *dic = [g_constant.emojiArray objectAtIndex:n];\
- \
- EmojiTextAttachment *attachment = [[EmojiTextAttachment alloc] init];\
- attachment.emojiTag = str;\
- attachment.image = [UIImage imageNamed:dic[\cf6 @"filename"\cf4 ]];\
- attachment.bounds = CGRectMake(\cf7 0\cf4 , -\cf7 4\cf4 , _messageText.font.lineHeight, _messageText.font.lineHeight);\
- \
- newRange = NSMakeRange(newRange.location + \cf7 1\cf4 , \cf7 0\cf4 );\
- [_messageText.textStorage appendAttributedString:[NSAttributedString attributedStringWithAttachment:attachment]];\
- _messageText.font = SYSFONT(\cf7 18\cf4 );\
- \
- [_messageText scrollRangeToVisible:NSMakeRange(_messageText.text.length, \cf7 1\cf4 )];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- newRange = NSMakeRange(newRange.location + str.length, \cf7 0\cf4 );\
- \
- [_messageText.textStorage appendAttributedString:[[NSAttributedString alloc] initWithString:str attributes:\cf7 @\{\cf4 NSFontAttributeName:SYSFONT(\cf7 18\cf4 ),NSForegroundColorAttributeName:textColor\cf7 \}\cf4 ]];\
- [_messageText scrollRangeToVisible:NSMakeRange(_messageText.text.length, \cf7 1\cf4 )];\
- \}\
- \
- \}\
- _messageText.selectedRange = newRange;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 arr.count > \cf7 1\cf4 ;\
- \}\
- \
- \cf2 //
- \f1 \'bd\'ab\'b1\'ed\'c7\'e9\'ba\'cd\'ce\'c4\'d7\'d6\'b7\'d6\'bf\'aa\'a3\'ac\'d7\'b0\'bd\'f8
- \f0 array\cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 getImageRange\cf4 :(NSString*)message \cf11 array\cf4 : (NSMutableArray*)array \{\
- NSRange range=[message rangeOfString: \cf6 @"["\cf4 ];\
- NSRange range1=[message rangeOfString: \cf6 @"]"\cf4 ];\
- NSRange atRange = [message rangeOfString:\cf6 @"@"\cf4 ];\
- \cf2 //
- \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
- \f0 \cf4 \
- \
- \cf2 // self.contentEmoji = [self isContainsEmoji:message];\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (((range.length>\cf7 0\cf4 && range1.length>\cf7 0\cf4 ) || atRange.length>\cf7 0\cf4 ) && range1.location > range.location) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (range.length>\cf7 0\cf4 && range1.length>\cf7 0\cf4 ) \{\
- \cf2 // self.contentEmoji = YES;\cf4 \
- \cf2 // if (range.location > 0) \{\cf4 \
- \cf2 // [array addObject:[message substringToIndex:range.location]];\cf4 \
- \cf2 // [array addObject:[message substringWithRange:NSMakeRange(range.location, range1.location+1-range.location)]];\cf4 \
- \cf2 // NSString *str=[message substringFromIndex:range1.location+1];\cf4 \
- \cf2 // [self getImageRange:str array:array];\cf4 \
- \cf2 // \}else \{\cf4 \
- \cf2 // NSString *nextstr=[message substringWithRange:NSMakeRange(range.location, range1.location+1-range.location)];\cf4 \
- \cf2 // //
- \f1 \'c5\'c5\'b3\'fd\'ce\'c4\'d7\'d6\'ca\'c7
- \f0 \'93\'94
- \f1 \'b5\'c4
- \f0 \cf4 \
- \cf2 // if (![nextstr isEqualToString:@""]) \{\cf4 \
- \cf2 // [array addObject:nextstr];\cf4 \
- \cf2 // NSString *str=[message substringFromIndex:range1.location+1];\cf4 \
- \cf2 // [self getImageRange:str array:array];\cf4 \
- \cf2 // \}else \{\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // \}\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (range.location > \cf7 0\cf4 ) \{\
- \
- NSString *str = [message substringToIndex:range.location];\
- \
- NSString *str1 = [message substringFromIndex:range.location];\
- \
- [array addObject:str];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 getImageRange:str1 array:array];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- NSString *emojiString = [message substringWithRange:NSMakeRange(range.location + \cf7 1\cf4 , range1.location - \cf7 1\cf4 )];\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isEmoji =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- NSString *str;\
- NSString *str1;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSMutableDictionary *dic
- \f2\b \cf8 in
- \f0\b0 \cf4 g_constant.emojiArray) \{\
- NSString *emoji = [dic objectForKey:\cf6 @"english"\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([emoji isEqualToString:emojiString]) \{\
- isEmoji =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isEmoji) \{\
- str = [message substringWithRange:NSMakeRange(range.location, range1.location + \cf7 1\cf4 )];\
- str1 = [message substringFromIndex:range1.location + \cf7 1\cf4 ];\
- [array addObject:str];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- NSString *posString = [message substringWithRange:NSMakeRange(range.location + \cf7 1\cf4 , range1.location)];\
- NSRange posRange = [posString rangeOfString:\cf6 @"["\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (posRange.location != NSNotFound) \{\
- str = [message substringToIndex:posRange.location];\
- str1 = [message substringFromIndex:posRange.location];\
- [array addObject:str];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- str = [message substringToIndex:range1.location + \cf7 1\cf4 ];\
- str1 = [message substringFromIndex:range1.location + \cf7 1\cf4 ];\
- [array addObject:str];\
- \}\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 getImageRange:str1 array:array];\
- \}\
- \
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (atRange.length>\cf7 0\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (atRange.location > \cf7 0\cf4 ) \{\
- [array addObject:[message substringToIndex:atRange.location]];\
- [array addObject:[message substringWithRange:NSMakeRange(atRange.location, \cf7 1\cf4 )]];\
- NSString *str=[message substringFromIndex:atRange.location+\cf7 1\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 getImageRange:str array:array];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [array addObject:[message substringWithRange:NSMakeRange(atRange.location, \cf7 1\cf4 )]];\
- NSString *str=[message substringFromIndex:atRange.location+\cf7 1\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 getImageRange:str array:array];\
- \}\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (message !=
- \f2\b \cf8 nil
- \f0\b0 \cf4 ) \{\
- [array addObject:message];\
- \}\
- \}\
- \
-
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (range.length>\cf7 0\cf4 && range1.length>\cf7 0\cf4 && range1.location < range.location)\{\
- NSString *str = [message substringToIndex:range1.location + \cf7 1\cf4 ];\
- NSString *str1 = [message substringFromIndex:range1.location + \cf7 1\cf4 ];\
- [array addObject:str];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 getImageRange:str1 array:array];\
- \}\
- \
- \
- \
-
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (message !=
- \f2\b \cf8 nil
- \f0\b0 \cf4 ) \{\
- [array addObject:message];\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 textViewDidChangeSelection\cf4 :(UITextView *)textView \{\
- \cf2 //
- \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
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (textView.textColor==[UIColor lightGrayColor]) \{\
- NSRange range;\
- range.location = \cf7 0\cf4 ;\
- range.length = \cf7 0\cf4 ;\
- textView.selectedRange = range;\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 textViewDidChange\cf4 :(UITextView *)textView \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (textView.text.length <= \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 removeAllAt];\
- \cf2 //
- \f1 \'cf\'d4\'ca\'be\'cb\'ae\'d3\'a1
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 getTextViewWatermark];\
- \}\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setTableFooterFrame:textView];\
- \
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'d5\'fd\'d4\'da\'ca\'e4\'c8\'eb\'b9\'fd\'c2\'cb\'cc\'f5\'bc\'fe
- \f0 \cf4 \
- \cf2 // BOOL enteringStatus = [g_default boolForKey:kStartEnteringStatus];\cf4 \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 enteringStatus = [g_myself.isTyping intValue] > \cf7 0\cf4 ?
- \f2\b \cf8 YES
- \f0\b0 \cf4 :
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!enteringStatus ||
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid ||
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSendEntering) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \{\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'d5\'fd\'d4\'da\'ca\'e4\'c8\'eb
- \f0 \cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSendEntering =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendEntering];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .enteringTimer invalidate];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .enteringTimer =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .enteringTimer = [NSTimer scheduledTimerWithTimeInterval:\cf7 10\cf4 target:
- \f2\b \cf8 self
- \f0\b0 \cf4 selector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (enteringTimerAction:) userInfo:
- \f2\b \cf8 nil
- \f0\b0 \cf4 repeats:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 enteringTimerAction\cf4 :(NSTimer *)timer \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSendEntering =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .enteringTimer invalidate];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .enteringTimer =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \cf2 //
- \f1 \'b1\'e0\'bc\'ad
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 setTableFooterFrame\cf4 :(UITextView *) textView \{\
- \
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \cf2 // self.view.frame = CGRectMake(0, 0, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-JX_SCREEN_TOP-44);\cf4 \
- \
-
- \f2\b \cf8 static
- \f0\b0 \cf4 CGFloat maxHeight =\cf7 66.0f\cf4 ;\
- CGRect frame = textView.frame;\
- CGSize constraintSize = CGSizeMake(frame.size.width, MAXFLOAT);\
- CGSize size = [textView sizeThatFits:constraintSize];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (size.height >= maxHeight)\
- \{\
- size.height = maxHeight;\
- textView.scrollEnabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ; \cf2 //
- \f1 \'d4\'ca\'d0\'ed\'b9\'f6\'b6\'af
- \f0 \cf4 \
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- \{\
- textView.scrollEnabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ; \cf2 //
- \f1 \'b2\'bb\'d4\'ca\'d0\'ed\'b9\'f6\'b6\'af
- \f0 \cf4 \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (textView.hidden) \{\
- size.height = \cf7 32\cf4 + \cf7 5.5\cf4 ;\
- \}\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter = size.height + \cf7 16\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isHiddenFooter) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter =\cf7 0\cf4 ;\
- \}\
- textView.frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, size.height);\
- inputBar.frame = CGRectMake(inputBar.frame.origin.x, inputBar.frame.origin.y, inputBar.frame.size.width,
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter);\
- \
- \
- \cf2 /*\cf4 \
- \cf2 if (_faceView.faceView.frame.size.height>0&&_faceView.faceView.hidden==NO) \{\cf4 \
- \cf2 \cf4 \
- \cf2 \cf4 \
- \cf2 if (_keyboardHeight>0) \{\cf4 \
- \
- \cf2 self.tableFooter.frame = CGRectMake(0,keboardHHH+JX_SCREEN_HEIGHT-JX_SCREEN_TOP-self.heightFooter-40-_keyboardHeight-0, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- \cf2 \cf4 \
- \cf2 if (_array.count>8) \{\cf4 \
- \cf2 _table.frame =CGRectMake(0,-_keyboardHeight,self_width,self.view.frame.size.height-self.heightFooter);\cf4 \
- \cf2 \cf4 \
- \cf2 \cf4 \
- \cf2 \}else\{\cf4 \
- \cf2 _table.frame =CGRectMake(0,0,self_width,self.view.frame.size.height-self.heightFooter);\cf4 \
- \cf2 \}\cf4 \
- \cf2 \cf4 \
- \cf2 \}else\{\cf4 \
- \
- \cf2 if(JX_SCREEN_TOP==88)\{\cf4 \
- \cf2 \cf4 \
- \cf2 if (JX_SCREEN_HEIGHT>=812) \{\cf4 \
- \cf2 \cf4 \
- \cf2 \cf4 \
- \cf2 self.tableFooter.frame = CGRectMake(0,keboardHHH+JX_SCREEN_HEIGHT-self.heightFooter-22-53-_keyboardHeight-_faceView.faceView.frame.size.height-44, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- \cf2 \cf4 \
- \cf2 \cf4 \
- \cf2 \}else\{\cf4 \
- \cf2 \cf4 \
- \cf2 self.tableFooter.frame = CGRectMake(0,keboardHHH+JX_SCREEN_HEIGHT-self.heightFooter-28-53-_keyboardHeight-_faceView.faceView.frame.size.height, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- \cf2 \cf4 \
- \cf2 \}\cf4 \
- \cf2 \cf4 \
- \cf2 if (_array.count>8) \{\cf4 \
- \cf2 _table.frame =CGRectMake(0,-_keyboardHeight-_faceView.faceView.frame.size.height,self_width,self.view.frame.size.height-self.heightFooter);\cf4 \
- \cf2 \}else\{\cf4 \
- \cf2 _table.frame =CGRectMake(0,0,self_width,self.view.frame.size.height-self.heightFooter);\cf4 \
- \cf2 \cf4 \
- \cf2 \}\cf4 \
- \cf2 \cf4 \
- \cf2 \}else\{\cf4 \
- \cf2 \cf4 \
- \cf2 self.tableFooter.frame = CGRectMake(0,keboardHHH+(JX_SCREEN_HEIGHT>=812?0:30)+ JX_SCREEN_HEIGHT-self.heightFooter-JX_SCREEN_TOP-22-_keyboardHeight-_faceView.faceView.frame.size.height, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- \cf2 \cf4 \
- \cf2 \cf4 \
- \cf2 if (_array.count>8) \{\cf4 \
- \cf2 _table.frame =CGRectMake(0,-24-_keyboardHeight-_faceView.faceView.frame.size.height+(JX_SCREEN_HEIGHT>=812?0:30)+JX_SCREEN_TOP,self_width,self.view.frame.size.height-self.heightFooter);\cf4 \
- \cf2 \}else\{\cf4 \
- \cf2 _table.frame =CGRectMake(0,0,self_width,self.view.frame.size.height-self.heightFooter);\cf4 \
- \cf2 \cf4 \
- \cf2 \}\cf4 \
- \cf2 \cf4 \
- \cf2 \}\cf4 \
- \cf2 \}\cf4 \
- \cf2 \}else\{\cf4 \
- \cf2 \cf4 \
- \cf2 //
- \f1 \'c8\'e7\'b9\'fb\'ca\'c7\'d1\'a1\'d4\'f1
- \f0 \cf4 \
- \cf2 if (_faceView.selectedIndex >=1) \{\cf4 \
- \cf2 self.tableFooter.frame = CGRectMake(0,keboardHHH+JX_SCREEN_HEIGHT-JX_SCREEN_TOP-self.heightFooter-_keyboardHeight-_faceView.faceView.frame.size.height-0, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- \cf2 \}else \{\cf4 \
- \cf2 self.tableFooter.frame = CGRectMake(0,keboardHHH+JX_SCREEN_HEIGHT-JX_SCREEN_TOP-self.heightFooter-44-_keyboardHeight-_faceView.faceView.frame.size.height-0, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- \cf2 \}\cf4 \
- \cf2 \cf4 \
- \cf2 if (_array.count>10) \{\cf4 \
- \
- \cf2 _table.frame =CGRectMake(0,-_keyboardHeight-0,self_width,self.view.frame.size.height-self.heightFooter);\cf4 \
- \cf2 \}else \{\cf4 \
- \cf2 _table.frame =CGRectMake(0,0,self_width,self.view.frame.size.height-self.heightFooter-0);\cf4 \
- \cf2 \}\cf4 \
- \cf2 \}\cf4 \
- \cf2 */\cf4 \
- \
- \cf2 // [_table gotoLastRow:NO];\cf4 \
- \
- \
- \
- _publicMenuBar.frame = CGRectMake(_publicMenuBar.frame.origin.x,
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableFooter.frame.size.height, _publicMenuBar.frame.size.width, _publicMenuBar.frame.size.height);\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame = CGRectMake(
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.origin.x,
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableFooter.frame.origin.y -
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.size.height - \cf7 10\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.size.width,
- \f2\b \cf8 self
- \f0\b0 \cf4 .screenShotView.frame.size.height);\
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 textViewShouldBeginEditing\cf4 :(UITextView *)textView \{\
- \
- _btnFace.selected =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 textViewShouldEndEditing\cf4 :(UITextView *)textView \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 doEndEdit];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- \
- \
- \cf2 //
- \f1 \'c2\'bc\'d2\'f4
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 recordSwitch\cf4 :(UIButton*)sender\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- _messageText.inputView =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \cf2 //[_messageText reloadInputViews];\cf4 \
- _faceView.hidden=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- sender.selected = !sender.selected;\
- _recordBtn.hidden = !sender.selected;\
- _messageText.hidden = !_recordBtn.hidden;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!_recordBtn.hidden)\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \cf2 //[_faceView removeFromSuperview];\cf4 \
- \
- inputBar.frame=CGRectMake(\cf7 0\cf4 ,JX_SCREEN_HEIGHT-JX_SCREEN_TOP-\cf7 53\cf4 , JX_SCREEN_WIDTH, \cf7 53\cf4 );\
- _table.contentInset=UIEdgeInsetsMake(\cf7 44\cf4 , \cf7 0\cf4 , \cf7 0\cf4 , \cf7 0\cf4 );\
- \
- _table.frame=CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH,
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.frame.size.height-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter-\cf7 44\cf4 );\
- _keyboardHeight=\cf7 0\cf4 ;\
- \cf2 // [self setTableFooterFrame:_messageText];\cf4 \
- \
- \}\
- \
- \}\
- \
- \cf2 //
- \f1 \'c1\'c4\'cc\'ec\'ce\'bb\'d6\'c3\'b1\'bb\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onDidLocation\cf4 :(JXMessageObject*)msg\{\
- JXLocationVC* vc = [JXLocationVC alloc];\
- vc.longitude = [msg.location_y doubleValue];\
- vc.latitude = [msg.location_x doubleValue];\
- vc.locationType = JXLocationTypeShowStaticLocation;\
- vc = [vc init];\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \cf2 // [vc release];\cf4 \
- \}\
- \
- \cf2 //cell
- \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
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onSelectImage\cf4 :(JXImageView*)sender\{\
- \cf2 // [sender removeFromSuperview];\cf4 \
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 offRecordBtns\cf4 \{\
- _recordBtnLeft.selected =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _recordBtn.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _messageText.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 scrollToPageUp\cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isLoading)\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- NSLog(\cf6 @"scrollToPageUp"\cf4 );\
- _page ++;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 getServerData];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 scrollToPageDown\cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isLoading)\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- _page=\cf7 0\cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 getServerData];\
- \}\
- \cf5 #pragma mark
- \f2\b \cf16 - ViewLoad
- \f4 \'bb\'f1\'c8\'a1\'ca\'fd\'be\'dd
- \f0\b0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 getServerData\cf4 \{\
- _isLoading =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- NSLog(\cf6 @"_isLoading=no"\cf4 );\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 stopLoading];\
- \}\
- \
- \
- \cf2 //- (void)tableView:(UITableView *)tableView touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event\{\cf4 \
- \cf2 // [self hideKeyboard:NO];\cf4 \
- \cf2 //\}\cf4 \
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendText\cf4 :(UIView*)sender\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([_messageText.text length]<=\cf7 0\cf4 )\{\
- \cf2 // [g_App showAlert:Localized(@"JXAlert_MessageNotNil")];\cf4 \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \cf2 // [self hideKeyboard:NO];\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- _onceSendNum = \cf7 20\cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_text];\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendIt:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setTableFooterFrame:_messageText];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 setChatPerson\cf4 :(JXUserObject*)user\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (user ==
- \f2\b \cf8 nil
- \f0\b0 \cf4 || user == chatPerson)\{\
- current_chat_userId =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \cf2 // chatPerson = [user retain];\cf4 \
- chatPerson = user;\
- current_chat_userId = user.userId;\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 ----
- \f4 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2\'b2\'a2\'cf\'d4\'ca\'be
- \f0\b0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 resendMsgNotif\cf4 :(NSNotification*)notification\{\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 indexNum = [notification.object intValue];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (indexNum>_array.count) \{\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \
- JXMessageObject *p =[_array objectAtIndex:indexNum];\
- [p updateIsSend:transfer_status_ing];\
- NSIndexPath* cellIndex = [NSIndexPath indexPathForRow:indexNum inSection:\cf7 0\cf4 ];\
- _selCell = [_table cellForRowAtIndexPath:cellIndex];\
- [_selCell drawIsSend];\
- \
- \
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_tempChat==\cf7 11\cf4 ) \{\
- p.tempChat=\cf7 11\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- p.tempChat=\cf7 1\cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.isUpload boolValue])\{\
- [g_xmpp sendMessage:p roomName:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [g_server uploadFile:p.fileName validTime:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 ----
- \f4 \'c9\'be\'b3\'fd\'cf\'fb\'cf\'a2\'b2\'a2\'cb\'a2\'d0\'c2
- \f0\b0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 deleteMsgNotif\cf4 :(NSNotification*)notification\{\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 indexNum = [notification.object intValue];\
- JXMessageObject *p=[_array objectAtIndex:indexNum];\
- [p
- \f2\b \cf8 delete
- \f0\b0 \cf4 ];\
- [_array removeObject:p];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 deleteMsg:p];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showReadPersons\cf4 :(NSNotification *)notification\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 indexNum = [notification.object intValue];\
- JXMessageObject *msg = _array[indexNum];\
- JXReadListVC *vc = [[JXReadListVC alloc] init];\
- vc.msg = msg;\
- vc.room = _room;\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 resend\cf4 :(JXMessageObject*)p\{\
- \cf2 // NSLog(@"resend");\cf4 \
- [p updateIsSend:transfer_status_ing];\
- [_selCell drawIsSend];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.isUpload boolValue])\{\
- [g_xmpp sendMessage:p roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [g_server uploadFile:p.fileName validTime:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 deleteMsg\cf4 :(JXMessageObject*)p\{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _array.count; i ++) \{\
- JXMessageObject *msg = _array[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeText) \{\
- JXMessageCell *cell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:\cf7 0\cf4 ]];\
- [cell.readDelTimer invalidate];\
- cell.readDelTimer =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.messageId isEqualToString:msg.messageId]) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (i == _array.count - \cf7 1\cf4 && i > \cf7 0\cf4 ) \{\
- JXMessageObject *theLastMsg = _array[_array.count - \cf7 2\cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .lastMsg = theLastMsg;\
- [theLastMsg updateLastSend:UpdateLastSendType_None];\
- \}\
- \}\
- \}\
- \}\
- \
- \
- [_array removeObject:p];\
- _refreshCount++;\
- [_table reloadData];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 actionQuit\cf4 \{\
- \
- [_voice hide];\
- [peakTimer invalidate];\
- peakTimer =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- recording =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- _isGroupSendCancel =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .gotoBackBtn setBackgroundImage:[UIImage imageNamed:\cf6 @"title_back_black_big"\cf4 ] forState:UIControlStateNormal];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .gotoBackBtn setTitle:
- \f2\b \cf8 nil
- \f0\b0 \cf4 forState:UIControlStateNormal];\
- [_selectMoreArr removeAllObjects];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 enableCell];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableView reloadData];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- [g_notify postNotificationName:kAllVideoPlayerStopNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 userInfo:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify postNotificationName:kAllAudioPlayerStopNotifaction object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 userInfo:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _array.count; i ++) \{\
- JXMessageObject *msg = _array[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeText) \{\
- JXMessageCell *cell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:\cf7 0\cf4 ]];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([cell isKindOfClass:[JXMessageCell
- \f2\b \cf8 class
- \f0\b0 \cf4 ]]) \{\
- \
- [cell.readDelTimer invalidate];\
- cell.readDelTimer =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}\
- \cf2 //
- \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
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_messageText.textColor != [UIColor lightGrayColor]) \{\
- chatPerson.lastInput = [_messageText.textStorage getPlainString];\
- [chatPerson updateLastInput];\
- \}\
- \cf2 // if (g_mainVC.msgVc.array.count > 0) \{\cf4 \
- \cf2 // [g_mainVC.msgVc.tableView reloadRow:(int)self.rowIndex section:0];\cf4 \
- \cf2 // \}\cf4 \
- \
- [g_notify postNotificationName:kChatViewDisappear object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_xmpp.chatingUserIds removeObject:current_chat_userId];\
- current_chat_userId =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- [g_notify removeObserver:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- [
- \f2\b \cf8 super
- \f0\b0 \cf4 actionQuit];\
- \}\
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showChatView\cf4 \{\
- [_wait stop];\
- NSDictionary * dict = _dataDict;\
- \cf2 //
- \f1 \'c0\'cf\'b7\'bf\'bc\'e4
- \f0 :\cf4 \
- JXRoomObject *chatRoom = [[JXXMPP sharedInstance].roomPool joinRoom:[dict objectForKey:\cf6 @"jid"\cf4 ] title:[dict objectForKey:\cf6 @"name"\cf4 ] lastDate:
- \f2\b \cf8 nil
- \f0\b0 \cf4 isNew:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- roomData * roomdata = [[roomData alloc] init];\
- [roomdata getDataFromDict:dict];\
- \
- JXChatViewController *sendView=[JXChatViewController alloc];\
- sendView.title = [dict objectForKey:\cf6 @"name"\cf4 ];\
- sendView.roomJid = [dict objectForKey:\cf6 @"jid"\cf4 ];\
- sendView.roomId = [dict objectForKey:\cf6 @"id"\cf4 ];\
- sendView.chatRoom = chatRoom;\
- sendView.room = roomdata;\
- \
- \
- JXUserObject * userObj = [[JXUserObject alloc]init];\
- userObj.userId = [dict objectForKey:\cf6 @"jid"\cf4 ];\
- userObj.showRead = [dict objectForKey:\cf6 @"showRead"\cf4 ];\
- userObj.userNickname = [dict objectForKey:\cf6 @"name"\cf4 ];\
- userObj.showMember = [dict objectForKey:\cf6 @"showMember"\cf4 ];\
- userObj.allowSendCard = [dict objectForKey:\cf6 @"allowSendCard"\cf4 ];\
- userObj.chatRecordTimeOut = roomdata.chatRecordTimeOut;\
- userObj.talkTime = [dict objectForKey:\cf6 @"talkTime"\cf4 ];\
- userObj.allowInviteFriend = [dict objectForKey:\cf6 @"allowInviteFriend"\cf4 ];\
- userObj.allowUploadFile = [dict objectForKey:\cf6 @"allowUploadFile"\cf4 ];\
- userObj.allowConference = [dict objectForKey:\cf6 @"allowConference"\cf4 ];\
- userObj.allowSpeakCourse = [dict objectForKey:\cf6 @"allowSpeakCourse"\cf4 ];\
- userObj.isNeedVerify = [dict objectForKey:\cf6 @"isNeedVerify"\cf4 ];\
- \
- sendView.chatPerson = userObj;\
- sendView = [sendView init];\
- \cf2 // [g_App.window addSubview:sendView.view];\cf4 \
- [g_navigation pushViewController:sendView animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- dict =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onInputHello\cf4 :(JXInputVC*)sender\{\
- \
- JXMessageObject *msg = [[JXMessageObject alloc] init];\
- msg.fromUserId = MY_USER_ID;\
- msg.toUserId = [NSString stringWithFormat:\cf6 @"%@"\cf4 , [_dataDict objectForKey:\cf6 @"userId"\cf4 ]];\
- msg.fromUserName = MY_USER_NAME;\
- msg.toUserName = [_dataDict objectForKey:\cf6 @"nickname"\cf4 ];\
- msg.timeSend = [NSDate date];\
- msg.type = [NSNumber numberWithInt:kRoomRemind_NeedVerify];\
- NSString *userIds = g_myself.userId;\
- NSString *userNames = g_myself.userNickname;\
- NSDictionary *dict = \cf7 @\{\cf4 \
- \cf6 @"userIds"\cf4 : userIds,\
- \cf6 @"userNames"\cf4 : userNames,\
- \cf6 @"roomJid"\cf4 :
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid,\
- \cf6 @"reason"\cf4 : sender.inputText,\
- \cf6 @"isInvite"\cf4 : [NSNumber numberWithBool:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ]\
- \cf7 \}\cf4 ;\
- NSError *error =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dict options:NSJSONWritingPrettyPrinted error:&error];\
- \
- NSString *jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];\
- msg.objectId = jsonStr;\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 actionQuit];\
- \
- \cf2 // msg.fromUserId = self.roomJid;\cf4 \
- \cf2 // msg.type = [NSNumber numberWithInt:kWCMessageTypeRemind];\cf4 \
- \cf2 // msg.content = @"
- \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
- \f0 ";\cf4 \
- \cf2 // [msg insert:self.roomJid];\cf4 \
- \cf2 // if ([self.delegate respondsToSelector:@selector(needVerify:)]) \{\cf4 \
- \cf2 // [self.delegate needVerify:msg];\cf4 \
- \cf2 // \}\cf4 \
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 xmppRoomDidJoin\cf4 \{\
- \
- NSDictionary * dict = _dataDict;\
- \
- JXUserObject* user = [[JXUserObject alloc]init];\
- user.userNickname = [dict objectForKey:\cf6 @"name"\cf4 ];\
- user.userId = [dict objectForKey:\cf6 @"jid"\cf4 ];\
- user.userDescription = [dict objectForKey:\cf6 @"desc"\cf4 ];\
- user.roomId = [dict objectForKey:\cf6 @"id"\cf4 ];\
- user.showRead = [dict objectForKey:\cf6 @"showRead"\cf4 ];\
- user.showMember = [dict objectForKey:\cf6 @"showMember"\cf4 ];\
- user.allowSendCard = [dict objectForKey:\cf6 @"allowSendCard"\cf4 ];\
- user.chatRecordTimeOut = [dict objectForKey:\cf6 @"chatRecordTimeOut"\cf4 ];\
- user.talkTime = [dict objectForKey:\cf6 @"talkTime"\cf4 ];\
- user.allowInviteFriend = [dict objectForKey:\cf6 @"allowInviteFriend"\cf4 ];\
- user.allowUploadFile = [dict objectForKey:\cf6 @"allowUploadFile"\cf4 ];\
- user.allowConference = [dict objectForKey:\cf6 @"allowConference"\cf4 ];\
- user.allowSpeakCourse = [dict objectForKey:\cf6 @"allowSpeakCourse"\cf4 ];\
- user.isNeedVerify = [dict objectForKey:\cf6 @"isNeedVerify"\cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![user haveTheUser])\
- [user insertRoom];\
- \cf2 // else\cf4 \
- \cf2 // [user update];\cf4 \
- \cf2 // [user release];\cf4 \
- \
- \cf2 // [g_server addRoomMember:[dict objectForKey:@"id"] userId:g_myself.userId nickName:g_myself.userNickname toView:self];\cf4 \
- [g_server roomJoin:[dict objectForKey:\cf6 @"id"\cf4 ] userId:g_myself.userId nickName:g_myself.userNickname toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- user.groupStatus = [NSNumber numberWithInt:\cf7 0\cf4 ];\
- [user updateGroupInvalid];\
- \
- dict =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \cf2 // chatRoom.delegate = nil;\cf4 \
- \}\
- -(CGSize)\cf11 titleNoticeBtnWight\cf4 :(NSString *)titBtnW
- \f2\b \cf8 and
- \f0\b0 \cf4 :(UIButton *)\cf11 titBtn\cf4 \{\
- CGSize titleSize = [titBtnW boundingRectWithSize:CGSizeMake(MAXFLOAT, \cf7 40\cf4 ) options:NSStringDrawingUsesLineFragmentOrigin attributes:\cf7 @\{\cf4 NSFontAttributeName:titBtn.titleLabel.font\cf7 \}\cf4 context:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ].size;\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 titleSize;\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 goundAttionTitle\cf4 :(NSMutableArray *)tempArr\{\
- \
- memberData *model=[tempArr lastObject];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .attioPersonBtn setTitle:model.userNickName forState:UIControlStateNormal];\
- _backUserId=[NSString stringWithFormat:\cf6 @"%ld"\cf4 ,model.userId];\
- \
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 -------------------
- \f4 \'b7\'fe\'ce\'f1\'c6\'f7\'b7\'b5\'bb\'d8\'ca\'fd\'be\'dd
- \f2 --------------------
- \f0\b0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 didServerResultSucces\cf4 :(JXConnection*)aDownload \cf11 dict\cf4 :(NSDictionary*)dict \cf11 array\cf4 :(NSArray*)array1\{\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UserRoomListAttenion])\
- \{\
- \
- \
-
- \f2\b \cf8 long
- \f0\b0 \cf4 time = (
- \f2\b \cf8 long
- \f0\b0 \cf4 )[[NSDate date] timeIntervalSince1970];\
- time = (time *\cf7 1000\cf4 + g_server.timeDifference);\
- NSString *salt = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , time];\
- [g_server UserRoomAttentionattentionLastInfo:salt userId:g_server.myself.userId jid:_roomJid andToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UserRoomgetRoomAttention]||[aDownload.action isEqualToString:act_UserRoomManyLookAttenion]) \{ \cf2 //\cf4 \
- \
- NSArray * memberArray = [memberData fetchAllMembers:roomId];\
- NSString *userArr = [dict[\cf6 @"attentionUserIds"\cf4 ] firstObject]; \cf2 //dict[@"userId"];\cf4 \
- \
- [memberArray enumerateObjectsUsingBlock:^(memberData *
- \f2\b \cf8 _Nonnull
- \f0\b0 \cf4 obj, NSUInteger idx,
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 *
- \f2\b \cf8 _Nonnull
- \f0\b0 \cf4 stop) \{\
- memberData *dataModel=obj;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (dataModel.userId == [userArr longLongValue]) \{\
- [_tempArrMM addObject:dataModel];\
- \
- \}\
- \
- \}];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 goundAttionTitle:_tempArrMM];\
- \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UserRoomgetlastMessage]) \{\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (dict ==
- \f2\b \cf8 nil
- \f0\b0 \cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 __block
- \f0\b0 \cf4 NSUInteger aaaa=\cf7 0\cf4 ;\
-
- \f2\b \cf8 double
- \f0\b0 \cf4 time = [dict[\cf6 @"timeSend"\cf4 ] doubleValue];\
- NSString *messageId = dict[\cf6 @"messageId"\cf4 ];\
- NSString *sender = dict[\cf6 @"sender"\cf4 ];\
- NSMutableArray *useerMsgArray = [NSMutableArray array];\
- [_array enumerateObjectsUsingBlock:^(JXMessageObject *
- \f2\b \cf8 _Nonnull
- \f0\b0 \cf4 obj, NSUInteger idx,
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 *
- \f2\b \cf8 _Nonnull
- \f0\b0 \cf4 stop) \{\
- \
-
- \f2\b \cf8 double
- \f0\b0 \cf4 time2 = [obj.timeSend timeIntervalSince1970]*\cf7 1000\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([obj.fromUserId containsString:sender]) \{\
- [useerMsgArray addObject:sender];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([obj.messageId isEqualToString:messageId]) \{\
- aaaa=idx;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 // aaaa = _array.count-1;\cf4 \
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 // aaaa = _array.count-1;\cf4 \
- \}\
- \
- \}];\
- \
- \
- _selectIndexAaaa=aaaa;\
- \
-
- \f2\b \cf8 try
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (aaaa==\cf7 0\cf4 ) \{\
- [SVProgressHUD setMinimumDismissTimeInterval:\cf7 1\cf4 ];\
- [SVProgressHUD showInfoWithStatus:\cf6 @"
- \f1 \'ba\'c3\'d3\'d1\'d7\'ee\'bd\'fc\'ce\'b4\'b7\'a2\'d1\'d4\'a3\'a1
- \f0 "\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- NSIndexPath * dayOne = [NSIndexPath indexPathForRow:aaaa inSection:\cf7 0\cf4 ];\
- [_table scrollToRowAtIndexPath:dayOne atScrollPosition:UITableViewScrollPositionTop animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- [_table reloadData];;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- NSIndexPath * dayOne = [NSIndexPath indexPathForRow:aaaa-\cf7 1\cf4 inSection:\cf7 0\cf4 ];\
- [_table scrollToRowAtIndexPath:dayOne atScrollPosition:UITableViewScrollPositionTop animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- [_table reloadData];;\
- \}\
- \
- \
- \}
- \f2\b \cf8 catch
- \f0\b0 \cf4 (NSException *err) \{\
- \
- \}\
- \
- \
- \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_SilkPlanallByJidlist]) \{\
- NSDictionary *dict = array1.firstObject;\
- \cf2 // NSString *imageUrl = dict[@"imgUrl"];\cf4 \
- \
- \cf2 //JXSiDaiWebView\cf4 \
- JXSiDaiWebView *vc = [[JXSiDaiWebView alloc] init];\
- \cf2 //vc.titleName = dict[@"desc"];\cf4 \
- \cf2 //vc.link = imageUrl;\cf4 \
- \cf2 //vc.dict=dict;\cf4 \
- vc.dataArr=[array1 mutableCopy];\
- vc.sdaiArr=array1;\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_getFaceListByGrade]) \{\
- \
- \cf2 // NSMutableArray *tempArr=[NSMutableArray arrayWithCapacity:0];\cf4 \
- \cf2 // tempArr=[array1 mutableCopy];\cf4 \
- \cf2 // NSSortDescriptor *sortNumSD = [\uc0\u8730 \u8730 \u8730 sortDescriptorWithKey:@"sortNum" ascending:YES];\cf4 \
- \cf2 // tempArr = [[tempArr sortedArrayUsingDescriptors:@[sortNumSD]] mutableCopy];\cf4 \
- \cf2 // if (tempArr.count>=7) \{\cf4 \
- \cf2 // [tempArr removeLastObject];\cf4 \
- \cf2 // [tempArr removeLastObject];\cf4 \
- \cf2 // array1=[tempArr copy];\cf4 \
- _faceView.emojiDataArray = array1;\
- \cf2 // \}\cf4 \
- \
- [g_notify postNotificationName:kFavoritesRefresh object:array1];\
- \}\
- \
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_getbubbleFontByUserId]) \{\
- \
- \}\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomMemberGetMemberListByPage]) \{\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 stopLoading];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (array1.count < kRoomMemberListNum) \{\
- \cf2 // self.isShowFooterPull = NO;\cf4 \
- \}\
- \
- NSDictionary *lastDict = array1.lastObject;\
- \cf2 // self.user.joinTime = [NSDate dateWithTimeIntervalSince1970:[lastDict[@"createTime"] longValue]];\cf4 \
- \cf2 // [self.user updateJoinTime]; // _dataArrGetGroundPersonArr=[array1 mutableCopy];\cf4 \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSDictionary *member
- \f2\b \cf8 in
- \f0\b0 \cf4 array1) \{\
- memberData* option = [[memberData alloc] init];\
- [option getDataFromDict:member];\
- option.roomId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.roomId;\
- [option insert];\
- \}\
- \cf2 // [self refresh];\cf4 \
- \cf2 // [self refresh:nil];\cf4 \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomActivityRecord]) \{\
- \cf2 //
- \f1 \'c7\'c0\'b5\'bd\'c1\'cb
- \f0 \cf4 \
- \cf2 // _activityModel.content = dict[@"resultMsg"];\cf4 \
- \cf2 // _activityModel.success = YES;\cf4 \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showAdAlertViewImageString:\cf6 @"002.gif"\cf4 linkUrl:
- \f2\b \cf8 nil
- \f0\b0 \cf4 audio:
- \f2\b \cf8 nil
- \f0\b0 \cf4 duration:\cf7 1\cf4 content:
- \f2\b \cf8 nil
- \f0\b0 \cf4 showCancelButton:
- \f2\b \cf8 NO
- \f0\b0 \cf4 type:(DYAdModelTypeGifttOpenAnimation) success:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomgroupTypePackRed]) \{ \cf2 //act_roomgroupTypePackRed act_roomActivity\cf4 \
- \cf2 //
- \f1 \'c7\'c0\'b5\'bd\'c1\'cb
- \f0 \cf4 \
- \
- _activityModel.content = dict[\cf6 @"resultObject"\cf4 ];\
- _activityModel.success =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 2.5\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showAdAlertViewImageString:\cf6 @"002.gif"\cf4 linkUrl:
- \f2\b \cf8 nil
- \f0\b0 \cf4 audio:
- \f2\b \cf8 nil
- \f0\b0 \cf4 duration:\cf7 1\cf4 content: dict[\cf6 @"resultObject"\cf4 ] showCancelButton:
- \f2\b \cf8 NO
- \f0\b0 \cf4 type:(DYAdModelTypePackRedOpen) success:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \});\
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_FaceList]) \{\
- _faceView.emojiDataArray = array1;\
- [g_notify postNotificationName:kFavoritesRefresh object:array1];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_FaceClollectList]) \{\
- \cf2 // NSMutableArray *nameArray = [NSMutableArray array];\cf4 \
- \cf2 // for (NSDictionary *dict in array1) \{\cf4 \
- \cf2 // [nameArray addObject:dict[@"name"]];\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // _faceView.emojiDataArray = array1;\cf4 \
- \
- _faceView.emojiDataArray = array1;\
- [g_notify postNotificationName:kFavoritesRefresh object:array1];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_FaceClollectAddFaceClollect]) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 getEmojsData];\
- [g_notify postNotificationName:kFavoritesRefresh object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![aDownload.action isEqualToString:act_getRedPacket]) \{\
- [_wait stop];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomJoin]) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showChatView];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 actionQuit];\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UploadFile])\{\
- NSDictionary* p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([(NSArray *)[dict objectForKey:\cf6 @"audios"\cf4 ] count]>\cf7 0\cf4 )\
- p = [[dict objectForKey:\cf6 @"audios"\cf4 ] objectAtIndex:\cf7 0\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([(NSArray *)[dict objectForKey:\cf6 @"images"\cf4 ] count]>\cf7 0\cf4 )\
- p = [[dict objectForKey:\cf6 @"images"\cf4 ] objectAtIndex:\cf7 0\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([(NSArray *)[dict objectForKey:\cf6 @"videos"\cf4 ] count]>\cf7 0\cf4 )\
- p = [(NSArray *)[dict objectForKey:\cf6 @"videos"\cf4 ] objectAtIndex:\cf7 0\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (p==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\
- p = [(NSArray *)[dict objectForKey:\cf6 @"others"\cf4 ] objectAtIndex:\cf7 0\cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isMapMsg) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMapMsgWithDict:p];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 doSendAfterUpload:p];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 keepOnUplpadGroupSend];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_sendedNum ==
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count *
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray.count) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView removeFromSuperview];\
- [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
- \}\
- \}\
- \}\
- \}\
- p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UploadVoiceServlet]) \{\
- NSDictionary* p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([(NSDictionary *)[dict objectForKey:\cf6 @"audios"\cf4 ] count]>\cf7 0\cf4 )\
- p = [[dict objectForKey:\cf6 @"audios"\cf4 ] objectAtIndex:\cf7 0\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 doSendAfterUpload:p];\
- p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ( [aDownload.action isEqualToString:act_UserGet] )\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .firstGetUser ||
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
- \
- \
- JXUserObject* user = [[JXUserObject alloc]init];\
- [user getDataFromDict:dict];\
- [_room setNickNameForUser:user];\
- JXUserInfoVC* vc = [JXUserInfoVC alloc];\
- vc.user = user;\
- vc.isJustShow =
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ;\
- vc.fromAddType = \cf7 3\cf4 ;\
- vc = [vc init];\
- \
- JXUserBaseObj *baseObj = [[JXUserBaseObj alloc] init];\
- \cf2 // self.bubbleFontId,self.gradeIndex,self.userId\cf4 \
- baseObj.userId = [dict objectForKey:\cf6 @"userId"\cf4 ];\
- baseObj.bubbleFontId = [dict objectForKey:\cf6 @"bubbleFontId"\cf4 ];\
- baseObj.gradeIndex = [dict objectForKey:\cf6 @"gradeIndex"\cf4 ];\
- [baseObj updateBubbleFontIdAndGradIndex];\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- \cf2 // [g_navigation pushViewController:vc animated:YES];\cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- JXUserBaseObj *baseObj = [[JXUserBaseObj alloc] init];\
- \cf2 // self.bubbleFontId,self.gradeIndex,self.userId\cf4 \
- baseObj.bubbleFontId = [dict objectForKey:\cf6 @"bubbleFontId"\cf4 ];\
- baseObj.gradeIndex = [dict objectForKey:\cf6 @"gradeIndex"\cf4 ];\
- baseObj.userId = [dict objectForKey:\cf6 @"userId"\cf4 ];\
- [baseObj updateBubbleFontIdAndGradIndex];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isBeenBlack = [[(NSDictionary *)[dict objectForKey:\cf6 @"friends"\cf4 ] objectForKey:\cf6 @"isBeenBlack"\cf4 ] intValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .friendStatus = [[(NSDictionary *)[dict objectForKey:\cf6 @"friends"\cf4 ] objectForKey:\cf6 @"status"\cf4 ] intValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete = [[(NSDictionary *)[dict objectForKey:\cf6 @"friends"\cf4 ] objectForKey:\cf6 @"isOpenSnapchat"\cf4 ] boolValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete = [[(NSDictionary *)[dict objectForKey:\cf6 @"friends"\cf4 ] objectForKey:\cf6 @"isOpenSnapchat"\cf4 ] boolValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .firstGetUser =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .onlinestate = [dict[\cf6 @"onlinestate"\cf4 ] boolValue];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([chatPerson.userId intValue]<\cf7 10100\cf4 && [chatPerson.userId intValue]>=\cf7 10000\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (chatPerson.userNickname) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = chatPerson.userNickname;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = dict[\cf6 @"nickname"\cf4 ];\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 // NSString *str = self.onlinestate ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (chatPerson.userNickname) \{\
- \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.remarkName.length > 0 ? chatPerson.remarkName : chatPerson.userNickname,str];\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setChatTitle:chatPerson.remarkName.length > \cf7 0\cf4 ? chatPerson.remarkName : chatPerson.userNickname];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",dict[@"nickname"],str];\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setChatTitle:dict[\cf6 @"nickname"\cf4 ]];\
- \}\
- \}\
- \
- \}\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([dict[\cf6 @"userType"\cf4 ] intValue] == \cf7 2\cf4 ) \{ \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'b9\'ab\'d6\'da\'ba\'c5\'b2\'cb\'b5\'a5
- \f0 \cf4 \
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'b9\'ab\'d6\'da\'ba\'c5\'b2\'cb\'b5\'a5
- \f0 \cf4 \
- [g_server getPublicMenuListWithUserId:chatPerson.userId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \cf2 // else \{\cf4 \
- \cf2 // //
- \f1 \'bb\'f1\'c8\'a1\'b9\'ab\'d6\'da\'ba\'c5\'b2\'cb\'b5\'a5
- \f0 \cf4 \
- \cf2 // [g_server getPublicMenuListWithUserId:chatPerson.userId toView:self];\cf4 \
- \cf2 // \}\cf4 \
- \}\
- \
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ( [aDownload.action isEqualToString:act_roomGet] )\{\
- \cf2 // [_room getDataFromDict:dict];\cf4 \
- \cf2 //\cf4 \
- \cf2 // JXRoomMemberVC* vc = [JXRoomMemberVC alloc];\cf4 \
- \cf2 // vc.chatRoom = chatRoom;\cf4 \
- \cf2 // vc.room = _room;\cf4 \
- \cf2 // vc.delegate = self;\cf4 \
- \cf2 // vc = [vc init];\cf4 \
- \cf12 ///
- \f3 \cf2 / [g_window addSubview:vc.view];
- \f0 \cf4 \
- \cf2 // [g_navigation pushViewController:vc animated:YES];\cf4 \
- \
- _dataDict = dict;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([[dict objectForKey:\cf6 @"s"\cf4 ] integerValue] == \cf7 1\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isDisable =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isDisable =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (g_xmpp.isLogined == login_status_no)\{\
- \cf2 // [self hideKeyboard:NO];\cf4 \
- \cf2 // [g_xmpp showXmppOfflineAlert];\cf4 \
- \cf2 // return YES;\cf4 \
- \
- \cf2 // [g_xmpp logout];\cf4 \
- [g_xmpp login];\
- \
- \}\
- \
- \cf2 // _chatRoom = [g_xmpp.roomPool joinRoom:[dict objectForKey:@"jid"] title:[dict objectForKey:@"name"] isNew:YES];\cf4 \
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isFirst) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isFirst =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \
- roomData * roomdata = [[roomData alloc] init];\
- [roomdata getDataFromDict:dict];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \
- JXUserObject *user = [[JXUserObject sharedInstance] getUserById:[dict objectForKey:\cf6 @"jid"\cf4 ]];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (user && [user.groupStatus intValue] == \cf7 0\cf4 )\{\
- \
- \cf2 //
- \f1 \'c0\'cf\'b7\'bf\'bc\'e4
- \f0 :\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showChatView];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 actionQuit];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- JXRoomObject *chatRoomObj = [[JXXMPP sharedInstance].roomPool joinRoom:[dict objectForKey:\cf6 @"jid"\cf4 ] title:[dict objectForKey:\cf6 @"name"\cf4 ] lastDate:
- \f2\b \cf8 nil
- \f0\b0 \cf4 isNew:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isNeedVerify = [dict[\cf6 @"isNeedVerify"\cf4 ] boolValue];\
-
- \f2\b \cf8 long
- \f0\b0 \cf4 userId = [dict[\cf6 @"userId"\cf4 ] longLongValue];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isNeedVerify && userId != [g_myself.userId longLongValue]) \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid = [dict objectForKey:\cf6 @"jid"\cf4 ];\
- \cf2 // self.roomUserName = [dict objectForKey:@"nickname"];\cf4 \
- \cf2 // self.roomUserId = [dict objectForKey:@"userId"];\cf4 \
- \
- JXInputVC* vc = [JXInputVC alloc];\
- vc.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- vc.didTouch =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onInputHello:);\
- vc.inputTitle = Localized(\cf6 @"JX_GroupOwnersHaveEnabled"\cf4 );\
- vc.titleColor = [UIColor lightGrayColor];\
- vc.titleFont = [UIFont systemFontOfSize:\cf7 13.0\cf4 ];\
- vc.inputHint = Localized(\cf6 @"JX_PleaseEnterTheReason"\cf4 );\
- vc = [vc init];\
- [g_window addSubview:vc.view];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- [_wait start:Localized(\cf6 @"JXAlert_AddRoomIng"\cf4 ) delay:\cf7 30\cf4 ];\
- \cf2 //
- \f1 \'d0\'c2\'b7\'bf\'bc\'e4
- \f0 :\cf4 \
- chatRoomObj.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- [chatRoomObj joinRoom:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ( [aDownload.action isEqualToString:act_roomMemberGet] )\{\
- _disableSay = [[dict objectForKey:\cf6 @"talkTime"\cf4 ] longLongValue];\
- _audioMeetingNo = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,dict[\cf6 @"call"\cf4 ]];\
- _videoMeetingNo = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,dict[\cf6 @"videoMeetingNo"\cf4 ]];\
- _userNickName = dict[\cf6 @"nickname"\cf4 ];\
- [_table reloadData];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .relayMsgArray.count > \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (JXMessageObject *msg
- \f2\b \cf8 in
- \f0\b0 \cf4
- \f2\b \cf8 self
- \f0\b0 \cf4 .relayMsgArray) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeRedPacket) \{\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
- msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JXredPacket"\cf4 )];\
- \}\
-
- \f2\b \cf8 if
- \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) \{\
- \
- msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
- msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JX_AudioAndVideoCalls"\cf4 )];\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 relay:msg];\
- \}\
- \cf2 // [self relay];\cf4 \
- \}\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomMemberList]) \{\
- _room.roomId = roomId;\
- _room.members = [array1 mutableCopy];\
- \
- memberData *data = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:g_myself.userId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([data.role intValue] == \cf7 1\cf4 || [data.role intValue] == \cf7 2\cf4 ) \{\
- _isAdmin =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _isAdmin =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = [NSString stringWithFormat:\cf6 @"%@(%ld)"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userNickname, array1.count];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \}\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'ba\'ec\'b0\'fc\'d0\'c5\'cf\'a2
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_getRedPacket]) \{\
- \cf2 // if ([dict[@"packet"][@"type"] intValue] != 3) \{\cf4 \
- NSString *userId = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,[(NSDictionary *)[dict objectForKey:\cf6 @"packet"\cf4 ] objectForKey:\cf6 @"userId"\cf4 ]];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isDidRedPacketRemind) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isDidRedPacketRemind =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- JXredPacketDetailVC * redPacketDetailVC = [[JXredPacketDetailVC alloc]init];\
- redPacketDetailVC.dataDict = [[NSDictionary alloc]initWithDictionary:dict];\
- redPacketDetailVC.isGroup =
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.roomId.length > \cf7 0\cf4 ;\
- [g_navigation pushViewController:redPacketDetailVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([dict[\cf6 @"packet"\cf4 ][\cf6 @"type"\cf4 ] intValue] == \cf7 3\cf4 ) \{\
- \cf2 //\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showRedPacket:dict];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 openReadPacket];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showRedPacket:dict];\
- \}\
- \}\
- \
- \cf2 // [g_server openRedPacket:dict[@"packet"][@"id"] toView:self];\cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [_wait stop];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([userId isEqualToString:MY_USER_ID]) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 changeMessageRedPacketStatus:dict[\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ]];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 changeMessageArrFileSize:dict[\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ]];\
- \
- JXredPacketDetailVC * redPacketDetailVC = [[JXredPacketDetailVC alloc]init];\
- redPacketDetailVC.dataDict = [[NSDictionary alloc]initWithDictionary:dict];\
- redPacketDetailVC.isGroup =
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.roomId.length > \cf7 0\cf4 ;\
- [g_navigation pushViewController:redPacketDetailVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 // [g_server openRedPacket:dict[@"packet"][@"id"] toView:self];\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([dict[\cf6 @"packet"\cf4 ][\cf6 @"type"\cf4 ] intValue] == \cf7 3\cf4 ) \{\
- \cf2 //\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showRedPacket:dict];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 openReadPacket];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showRedPacket:dict];\
- \}\
- \}\
- \}\
- \cf2 // \}\cf4 \
- \
- \}\
- \cf2 //
- \f1 \'b4\'f2\'bf\'aa\'ba\'ec\'b0\'fc
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_openRedPacket]) \{\
- \
- NSString *userId = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,[(NSDictionary *)[dict objectForKey:\cf6 @"packet"\cf4 ] objectForKey:\cf6 @"userId"\cf4 ]];\
- \
- \cf2 // if ([dict[@"packet"][@"status"] intValue] == 2) \{\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 changeMessageRedPacketStatus:dict[\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ]];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 changeMessageArrFileSize:dict[\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ]];\
- \cf2 // \}\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 doEndEdit];\
- \cf2 // JXOpenRedPacketVC * openRedPacketVC = [[JXOpenRedPacketVC alloc]init];\cf4 \
- \cf2 // openRedPacketVC.dataDict = [[NSDictionary alloc]initWithDictionary:dict];\cf4 \
- \cf2 // [g_window addSubview:openRedPacketVC.view];\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
- JXMessageObject *msg = [[JXMessageObject alloc] init];\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeRemind];\
- msg.timeSend = [NSDate date];\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userId;\
- msg.fromUserId = MY_USER_ID;\
- msg.objectId = dict[\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ];\
- NSString *userName = [NSString string];\
- NSString *overStr = [NSString string];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([userId intValue] == [MY_USER_ID intValue]) \{\
- userName = Localized(\cf6 @"JX_RedPacketOneself"\cf4 );\
-
- \f2\b \cf8 double
- \f0\b0 \cf4 over = [[NSString stringWithFormat:\cf6 @"%.2f"\cf4 ,[dict[\cf6 @"packet"\cf4 ][\cf6 @"over"\cf4 ] floatValue]] doubleValue];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (over < \cf7 0.01\cf4 ) \{\
- overStr = Localized(\cf6 @"JX_RedPacketOver"\cf4 );\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- userName = dict[\cf6 @"packet"\cf4 ][\cf6 @"userName"\cf4 ];\
- \}\
- NSString *getRedStr = [NSString stringWithFormat:Localized(\cf6 @"JX_GetRedPacketFromFriend"\cf4 ),userName];\
- msg.content = [NSString stringWithFormat:\cf6 @"%@%@"\cf4 ,getRedStr,overStr];\
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- \
- \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}\
- [UIView animateWithDuration:\cf7 .3f\cf4 animations:^\{\
- _redBackV.frame = CGRectMake(_redBackV.frame.origin.x, -_redBackV.frame.size.height/\cf7 2\cf4 , _redBackV.frame.size.width, _redBackV.frame.size.height);\
- \} completion:^(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 finished) \{\
- [_redBaseView removeFromSuperview];\
- \
- JXredPacketDetailVC * redPacketDetailVC = [[JXredPacketDetailVC alloc]init];\
- redPacketDetailVC.dataDict = [[NSDictionary alloc]initWithDictionary:dict];\
- redPacketDetailVC.isGroup =
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.roomId.length > \cf7 0\cf4 ;\
- [g_navigation pushViewController:redPacketDetailVC animated:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}];\
- \
- \
- [g_server getUserMoenyToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_getUserMoeny]) \{\
- g_App.myMoney = [dict[\cf6 @"balance"\cf4 ] doubleValue];\
- \}\
- \
- \cf2 //
- \f1 \'c2\'fe\'d3\'ce\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_tigaseMsgs] || [aDownload.action isEqualToString:act_tigaseMucMsgs]) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGetServerMsg =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (array1.count > \cf7 0\cf4 ) \{\
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!IsStringNull(
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid))\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- s = chatPerson.userId;\
- [[JXMessageObject sharedInstance] getHistory:array1 userId:s];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid && _taskList.count > \cf7 0\cf4 ) \{\
- JXSynTask *task = _taskList.firstObject;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (array1.count < PAGECOUNT) \{\
- [task
- \f2\b \cf8 delete
- \f0\b0 \cf4 ];\
- [_taskList removeObjectAtIndex: \cf7 0\cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- NSDictionary *dict = array1.lastObject;\
- task.endTime = [NSDate dateWithTimeIntervalSince1970:[[dict objectForKey:kMESSAGE_TIMESEND] doubleValue] / \cf7 1000.0\cf4 ];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSyncMsg) \{\
- [_array removeAllObjects];\
- _page = \cf7 0\cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSyncMsg =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isShowHeaderPull = array1.count >= \cf7 20\cf4 ;\
- \}\
- \}\
- \
-
- \f2\b \cf8 int
- \f0\b0 \cf4 pageCount = \cf7 20\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .newMsgCount > \cf7 20\cf4 ) \{\
- pageCount =
- \f2\b \cf8 self
- \f0\b0 \cf4 .newMsgCount;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .newMsgCount = \cf7 0\cf4 ;\
- \}\
- NSMutableArray *p = [[JXMessageObject sharedInstance] fetchMessageListWithUser:s byAllNum:_array.count pageCount:pageCount startTime:[NSDate dateWithTimeIntervalSince1970:\cf7 0\cf4 ]];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (p.count > \cf7 0\cf4 ) \{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGetServerMsg =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .scrollLine = \cf7 0\cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid && _taskList.count > \cf7 0\cf4 ) \{\
- JXSynTask *task = _taskList.firstObject;\
- [task
- \f2\b \cf8 delete
- \f0\b0 \cf4 ];\
- [_taskList removeObjectAtIndex: \cf7 0\cf4 ];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGetServerMsg =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .scrollLine = \cf7 0\cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isShowHeaderPull =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_publicMenuList]) \{\
- \
- _menuList = [NSArray arrayWithArray:array1];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_menuList.count > \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 createFooterSubViews];\
- \}\
- \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_tigaseDeleteMsg]) \{\
- \
- NSDictionary *param = aDownload.params;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 type = [[NSString stringWithFormat:\cf6 @"%@"\cf4 , param[\cf6 @"deleteType"\cf4 ]] intValue];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex >= \cf7 0\cf4 ) \{\
- [_wait start];\
- JXMessageObject *msg = _array[
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex];\
- \
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'b3\'b7\'bb\'d8\'cf\'fb\'cf\'a2\'b5\'c4
- \f0 XMPP\cf4 \
- JXMessageObject *newMsg=[[JXMessageObject alloc]init];\
- newMsg.timeSend = [NSDate date];\
- newMsg.fromUserId = MY_USER_ID;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- newMsg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- newMsg.fromUserName = _userNickName;\
- newMsg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- newMsg.fromUserName = MY_USER_NAME;\
- newMsg.toUserId = chatPerson.userId;\
- \}\
- newMsg.content = msg.messageId;\
- newMsg.type = [NSNumber numberWithInt:type];\
- newMsg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- \
- [g_xmpp sendMessage:newMsg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}\
- \
- \}\
- \
- \
- \cf2 //
- \f1 \'ca\'d5\'b2\'d8\'b1\'ed\'c7\'e9
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_userEmojiAdd]) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([dict[\cf6 @"type"\cf4 ] intValue] == CollectTypeEmoji) \{\
- [g_myself.favorites addObject:dict];\
- \}\
- \
- [JXMyTools showTipView:Localized(\cf6 @"JX_CollectionSuccess"\cf4 )];\
- \
- [g_notify postNotificationName:kEmojiRefresh object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_notify postNotificationName:kFavoritesRefresh object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 actionQuit];\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'c8\'a1\'cf\'fb\'ca\'d5\'b2\'d8
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_userEmojiDelete]) \{\
- [JXMyTools showTipView:Localized(\cf6 @"JXAlert_DeleteOK"\cf4 )];\
- \}\
- \
- \cf2 //
- \f1 \'cc\'ed\'bc\'d3\'bf\'ce\'b3\'cc
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_userCourseAdd]) \{\
- [JXMyTools showTipView:Localized(\cf6 @"JX_AddSuccess"\cf4 )];\
- [_recordArray removeAllObjects];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_userCourseUpdate]) \{\
- [JXMyTools showTipView:Localized(\cf6 @"JXAlert_DeleteOK"\cf4 )];\
- [g_notify postNotificationName:kUpdateCourseList object:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'ca\'d5\'b2\'d8
- \f0
- \f1 \'bf\'bd\'b1\'b4\'ce\'c4\'bc\'fe
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UploadCopyFileServlet]) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- NSMutableArray *allArray = [NSMutableArray array];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_collectionData.content && _collectionData.content.length > \cf7 0\cf4 ) \{\
- [allArray addObject:_collectionData.content];\
- \}\
- [allArray addObject:dict[\cf6 @"url"\cf4 ]];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendMsgArray = allArray;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 collectionMsgSendAll:allArray];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 collectionMsgSend:dict[\cf6 @"url"\cf4 ] isFile:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'d2\'f4\'ca\'d3\'c6\'b5\'b7\'fe\'ce\'f1\'c6\'f7\'b5\'d8\'d6\'b7
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UserOpenMeet]) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .meetUrl = [dict objectForKey:\cf6 @"meetUrl"\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onChatAudio:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onChatVideo:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'c8\'ba\'d6\'fa\'ca\'d6
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_queryGroupHelper]) \{\
- NSMutableArray *arr = [[NSMutableArray alloc] init];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i = \cf7 0\cf4 ; i < array1.count; i++) \{\
- JXGroupHeplerModel *model = [[JXGroupHeplerModel alloc] init];\
- [model getDataWithDict:array1[i]];\
- [arr addObject:model];\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setupMoreView:arr];\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UserRoomAttentionattention]) \{\
- \
- [SVProgressHUD showWithStatus:\cf6 @"
- \f1 \'b9\'d8\'d0\'c4\'b3\'c9\'b9\'a6
- \f0 "\cf4 ];\
- [SVProgressHUD dismissWithDelay:\cf7 1.0\cf4 ];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomGetRoom]) \{\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isOpen = [g_default boolForKey:kgoucaiComePush];\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isOpen2 = [g_default boolForKey:kGuanXinComePush];\
- _lotterDict=dict;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([dict[\cf6 @"lottery"\cf4 ] intValue]==\cf7 1\cf4 ) \{\
- \
- \
- _biaotishifoBC=\cf7 1111\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isOpen==\cf7 1\cf4 && isOpen2==\cf7 1\cf4 ) \{\
- _noticeView2.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _noticeViewScrollView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (isOpen==\cf7 1\cf4 && isOpen2==\cf7 0\cf4 ) \{\
- _noticeView2.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _noticeViewScrollView.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _noticeViewScrollView.frame=CGRectMake(\cf7 0\cf4 , \cf7 44\cf4 , JX_SCREEN_WIDTH, \cf7 37\cf4 );\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (isOpen==\cf7 0\cf4 && isOpen2==\cf7 1\cf4 )\{\
- _noticeView2.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .showTopView.xiaLineView.hidden=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _noticeViewScrollView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (isOpen==\cf7 0\cf4 && isOpen2==\cf7 0\cf4 ) \{\
- _noticeViewScrollView.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _table.contentInset=UIEdgeInsetsMake(\cf7 40\cf4 , \cf7 0\cf4 , \cf7 0\cf4 , \cf7 0\cf4 );\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .showTopView.xiaLineView.hidden=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _noticeView2.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _noticeViewScrollView.frame=CGRectMake(\cf7 0\cf4 , \cf7 44\cf4 +\cf7 37\cf4 , JX_SCREEN_WIDTH, \cf7 37\cf4 );\
- \}\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- _noticeView2.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isOpen2==\cf7 1\cf4 ) \{\
- \
- _noticeViewScrollView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- _noticeViewScrollView.frame=CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, \cf7 37\cf4 );\
- _noticeViewScrollView.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- \}\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = [NSString stringWithFormat:\cf6 @"%@(%ld)"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userNickname, [dict[\cf6 @"userSize"\cf4 ] integerValue]];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([dict objectForKey:\cf6 @"jid"\cf4 ]) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![dict objectForKey:\cf6 @"member"\cf4 ]) \{\
- [JXMyTools showTipView:Localized(\cf6 @"JX_YouOutOfGroup"\cf4 )];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupStatus = [NSNumber numberWithInt:\cf7 1\cf4 ];\
- chatPerson.groupStatus = [NSNumber numberWithInt:\cf7 1\cf4 ];\
- [chatPerson updateGroupInvalid];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([[dict objectForKey:\cf6 @"s"\cf4 ] integerValue] != \cf7 1\cf4 ) \{\
- [JXMyTools showTipView:Localized(\cf6 @"JX_GroupNotUse"\cf4 )];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isDisable =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- NSString *groupLevelName = [dict objectForKey:\cf6 @"groupLevelName"\cf4 ];\
- _groupLevelNameArray = [groupLevelName componentsSeparatedByString:\cf6 @","\cf4 ];\
- _isAttritionRecall = [[dict objectForKey:\cf6 @"isAttritionRecall"\cf4 ] boolValue];\
- _isOpenIntegral = [[dict objectForKey:\cf6 @"isOpenIntegral"\cf4 ] boolValue];\
- _disableSay = [[(NSDictionary *)[dict objectForKey:\cf6 @"member"\cf4 ]objectForKey:\cf6 @"talkTime"\cf4 ] longLongValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.talkTime = [NSNumber numberWithLongLong:[[dict objectForKey:\cf6 @"talkTime"\cf4 ] longLongValue]];\
- NSString *role = [(NSDictionary *)[dict objectForKey:\cf6 @"member"\cf4 ] objectForKey:\cf6 @"role"\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([role intValue] == \cf7 1\cf4 || [role intValue] == \cf7 2\cf4 ) \{\
- _isAdmin =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _isAdmin =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([role intValue] == \cf7 1\cf4 || [role intValue] == \cf7 2\cf4 ) \{\
- _isAdmin =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _isAdmin =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (([
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.talkTime longLongValue] > \cf7 0\cf4 && !_isAdmin) || [role intValue] == \cf7 4\cf4 ) \{\
- _talkTimeLabel.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _talkTimeLabel.text = Localized(\cf6 @"JX_TotalSilence"\cf4 );\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([role intValue] == \cf7 4\cf4 ) \{\
- _talkTimeLabel.text = Localized(\cf6 @"JX_ProhibitToSpeak"\cf4 );\
- \}\
- _messageText.userInteractionEnabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _shareMore.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _recordBtnLeft.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _btnFace.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _messageText.text =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _talkTimeLabel.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _shareMore.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _recordBtnLeft.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _btnFace.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _messageText.userInteractionEnabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.showRead = [dict objectForKey:\cf6 @"showRead"\cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.showRead = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.showRead boolValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowSendCard = [dict objectForKey:\cf6 @"allowSendCard"\cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.allowSendCard = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowSendCard boolValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowConference = [dict objectForKey:\cf6 @"allowConference"\cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.allowConference = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowConference boolValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowSpeakCourse = [dict objectForKey:\cf6 @"allowSpeakCourse"\cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.allowSpeakCourse = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowSpeakCourse boolValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowUploadFile = [dict objectForKey:\cf6 @"allowUploadFile"\cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.allowUploadFile = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowUploadFile boolValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.isNeedVerify = [dict objectForKey:\cf6 @"isNeedVerify"\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson updateGroupSetting];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.chatRecordTimeOut = [dict objectForKey:\cf6 @"chatRecordTimeOut"\cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.chatRecordTimeOut =
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.chatRecordTimeOut;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson updateUserChatRecordTimeOut];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.curCount = [[dict objectForKey:\cf6 @"userSize"\cf4 ] intValue];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.maxCount = [[dict objectForKey:\cf6 @"maxUserSize"\cf4 ] intValue];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatRoom.roomJid.length > \cf7 0\cf4 ) \{\
- NSString *noticeStr = [(NSDictionary *)[dict objectForKey:\cf6 @"notice"\cf4 ] objectForKey:\cf6 @"text"\cf4 ];\
- NSString *noticeTime = [(NSDictionary *)[dict objectForKey:\cf6 @"notice"\cf4 ] objectForKey:\cf6 @"time"\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setupNoticeWithContent:noticeStr time:noticeTime];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (noticeStr)\{\
- \cf2 // [self showLatestBroadcastTitle:@"
- \f1 \'d7\'ee\'d0\'c2\'b9\'ab\'b8\'e6
- \f0 " message:noticeStr];\cf4 \
- \}\
- \}\
- \
- \cf2 //
- \f1 \'b1\'a3\'b4\'e6\'d7\'d4\'bc\'ba
- \f0 \cf4 \
- NSDictionary* p = [dict objectForKey:\cf6 @"member"\cf4 ];\
- memberData* option = [[memberData alloc] init];\
- [option getDataFromDict:p];\
- option.roomId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomId;\
- [option insert];\
- \
- \cf2 //
- \f1 \'b1\'a3\'b4\'e6\'c8\'ba\'d6\'f7\'ba\'cd\'b9\'dc\'c0\'ed\'d4\'b1
- \f0 \cf4 \
- NSMutableArray *memb = [NSMutableArray array];\
- NSArray *members = [dict objectForKey:\cf6 @"members"\cf4 ];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSDictionary *member
- \f2\b \cf8 in
- \f0\b0 \cf4 members) \{\
- memberData* option = [[memberData alloc] init];\
- [option getDataFromDict:member];\
- option.roomId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomId;\
- [option insert];\
- [memb addObject:option];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_room.members.count <= \cf7 0\cf4 ) \{\
- [_room.members addObjectsFromArray:memb];\
- \}\
- \
- \}\
- \
- \cf2 //<<<<<<< .working\cf4 \
- \cf2 // [_table reloadData];\cf4 \
- \cf2 //\cf4 \
- \cf2 //=======\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSendRedPacket) \{\
- \
- JXSendRedPacketViewController * sendGiftVC = [[JXSendRedPacketViewController alloc] init];\
- sendGiftVC.isRoom =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- sendGiftVC.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- sendGiftVC.roomJid =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- sendGiftVC.size =
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.curCount;\
- \cf2 // [g_window addSubview:sendGiftVC.view];\cf4 \
- [g_navigation pushViewController:sendGiftVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSendRedPacket =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [JXMyTools showTipView:Localized(\cf6 @"JX_GroupDissolved"\cf4 )];\
- chatPerson.groupStatus = [NSNumber numberWithInt:\cf7 2\cf4 ];\
- [chatPerson updateGroupInvalid];\
- \
- \}\
- \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UserGetByAccount]) \{\
- JXUserInfoVC* vc = [JXUserInfoVC alloc];\
- vc.userId = dict[\cf6 @"userId"\cf4 ];\
- vc.fromAddType = \cf7 1\cf4 ;\
- vc = [vc init];\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \cf2 // [_table reloadData];\cf4 \
- \}\
- \
- \
- -(
- \f2\b \cf8 int
- \f0\b0 \cf4 ) \cf11 didServerResultFailed\cf4 :(JXConnection*)aDownload \cf11 dict\cf4 :(NSDictionary*)dict\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 doUploadError:aDownload];\
- [_wait stop];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UserRoomgetRoomAttention]) \{\
- \
- \
- \}\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomActivity]) \{\
- \cf2 //
- \f1 \'c3\'bb\'c7\'c0\'b5\'bd
- \f0 \cf4 \
- _activityModel.content = dict[\cf6 @"resultMsg"\cf4 ];\
- _activityModel.success =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showAdAlertViewImageString:\cf6 @"ad_box.gif"\cf4 linkUrl:
- \f2\b \cf8 nil
- \f0\b0 \cf4 audio:
- \f2\b \cf8 nil
- \f0\b0 \cf4 duration:\cf7 1\cf4 content:
- \f2\b \cf8 nil
- \f0\b0 \cf4 showCancelButton:
- \f2\b \cf8 NO
- \f0\b0 \cf4 type:(DYAdModelTypeGifttOpenAnimation) success:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \cf2 //
- \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
- \f0 resultCode
- \f1 \'a3\'bd
- \f0 0\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_getRedPacket]) \{\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 changeMessageRedPacketStatus:dict[\cf6 @"data"\cf4 ][\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ]];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 changeMessageArrFileSize:dict[\cf6 @"data"\cf4 ][\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ]];\
- \
- JXredPacketDetailVC * redPacketDetailVC = [[JXredPacketDetailVC alloc]init];\
- redPacketDetailVC.dataDict = [[NSDictionary alloc]initWithDictionary:dict];\
- redPacketDetailVC.isGroup =
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.roomId.length > \cf7 0\cf4 ;\
- redPacketDetailVC.code = [[dict objectForKey:\cf6 @"resultCode"\cf4 ] intValue];\
- \cf2 // [g_window addSubview:redPacketDetailVC.view];\cf4 \
- [g_navigation pushViewController:redPacketDetailVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_roomGetRoom]) \{\
- \
- [JXMyTools showTipView:Localized(\cf6 @"JX_GroupDissolved"\cf4 )];\
- chatPerson.groupStatus = [NSNumber numberWithInt:\cf7 2\cf4 ];\
- [chatPerson updateGroupInvalid];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_userEmojiAdd]) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 show_error;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_openRedPacket]) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .redPacketDict = dict;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .openImgV.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .seeLab.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .tintLab.text = Localized(\cf6 @"JX_SlowHandNoRedPacket"\cf4 );\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UploadFile]) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 keepOnUplpadGroupSend];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_sendedNum ==
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count *
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray.count) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView removeFromSuperview];\
- [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
- \}\
- \}\
- \}\
- \}\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 hide_error;\
- \}\
- \
- -(
- \f2\b \cf8 int
- \f0\b0 \cf4 ) \cf11 didServerConnectError\cf4 :(JXConnection*)aDownload \cf11 error\cf4 :(NSError *)error\{\cf2 //error
- \f1 \'ce\'aa\'bf\'d5\'ca\'b1\'a3\'ac\'b4\'fa\'b1\'ed\'b3\'ac\'ca\'b1
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 doUploadError:aDownload];\
- [_wait stop];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 hide_error;\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 didServerConnectStart\cf4 :(JXConnection*)aDownload\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_UploadFile] || [aDownload.action isEqualToString:act_publicMenuList] || [aDownload.action isEqualToString:act_tigaseMsgs] || [aDownload.action isEqualToString:act_tigaseMucMsgs])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([aDownload.action isEqualToString:act_tigaseDeleteMsg]) \{\
- \cf2 //
- \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
- \f0 \cf4 \
- [_wait start];\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 collectionMsgSend\cf4 :(NSString *)content \cf11 isFile\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )isFile\{\
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
- \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
- \
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- msg.toUserId = userId;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- \}\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.content = content;\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .isReadDelete];\
- \
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 (_collectionData.type) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 2\cf4 :\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeImage];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 3\cf4 :\{\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeVoice];\
- ObjUrlData *obj = _collectionData.audios.firstObject;\
- msg.timeLen = obj.timeLen;\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 4\cf4 :\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeVideo];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 5\cf4 :\{\
- msg.fileName = ((ObjUrlData *)_collectionData.files.firstObject).name;\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeFile];\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 11\cf4 :\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeCustomFace];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 12\cf4 :\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeEmoji];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!isFile) \{\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!isFile) \{\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
- \}\
- \
- \cf2 //
- \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
- \f0 \cf4 \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- \
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.isLastGroupSend) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 collectionMsgSend:content isFile:isFile];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
- [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showAtSelectMemberView\cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isShowAT =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_room.members.count >\cf7 0\cf4 ) \{\
- JXSelFriendVC * selVC = [[JXSelFriendVC alloc] init];\
- \cf2 // selVC.chatRoom = chatRoom;\cf4 \
- _room.roomJid = _roomJid;\
- selVC.room = _room;\
- selVC.type = JXSelUserTypeGroupAT;\
- selVC.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- selVC.didSelect =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (atSelectMemberDelegate:);\
- \
- \cf2 // [g_window addSubview:selVC.view];\cf4 \
- [g_navigation pushViewController:selVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 //
- \f1 \'b5\'f7\'bd\'d3\'bf\'da
- \f0 \cf4 \
- [g_App showAlert:Localized(\cf6 @"JX_NoGetMemberList"\cf4 )];\
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 removeAllAt\cf4 \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i = \cf7 0\cf4 ; i<_atMemberArray.count; i++) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 removeAtTextString:_atMemberArray[i]];\
- \}\
- [_atMemberArray removeAllObjects];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 removeAtTextString\cf4 :(memberData *)member\{\
- NSString * atStr = [NSString stringWithFormat:\cf6 @"@%@"\cf4 ,member.userNickName];\
- NSRange atRange = [[_messageText.textStorage string] rangeOfString:atStr];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (atRange.location != NSNotFound) \{\
- [_messageText.textStorage deleteCharactersInRange:atRange];\
- \}\
- \
- \}\
- \
- -(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 hasMember\cf4 :(NSString*)theUserId\{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i=\cf7 0\cf4 ;i<[_atMemberArray count];i++)\{\
- memberData* p = [_atMemberArray objectAtIndex:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([theUserId intValue] == p.userId)\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 atSelectMemberDelegate\cf4 :(memberData *)member\{\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (member.idStr) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 removeAllAt];\
- [_atMemberArray addObject:member];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 hasMember:[NSString stringWithFormat:\cf6 @"%ld"\cf4 ,member.userId]])\{\
-
- \f2\b \cf8 if
- \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 ]) \{\
- [_messageText.textStorage deleteCharactersInRange:NSMakeRange(_messageText.selectedRange.location-\cf7 1\cf4 , \cf7 1\cf4 )];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i=\cf7 0\cf4 ; i<_atMemberArray.count; i++) \{\
- memberData * member = _atMemberArray[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (member.idStr)\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 removeAllAt];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- [_atMemberArray addObject:member];\
- \}\
- \
- \cf2 // [_messageText.textStorage replaceCharactersInRange:NSMakeRange(_messageText.selectedRange.location-1, 1) withString:@""];\cf4 \
-
- \f2\b \cf8 if
- \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 ]) \{\
- [_messageText.textStorage deleteCharactersInRange:NSMakeRange(_messageText.selectedRange.location-\cf7 1\cf4 , \cf7 1\cf4 )];\
- \}\
- \
- \
- NSString * atStr = [NSString stringWithFormat:\cf6 @"@%@"\cf4 ,member.userNickName];\
- NSMutableAttributedString* tncString = [[NSMutableAttributedString alloc] initWithString:atStr];\
- [tncString addAttribute:NSBackgroundColorAttributeName value:[UIColor yellowColor] range:NSMakeRange(\cf7 0\cf4 ,atStr.length)];\
- [tncString addAttribute:NSFontAttributeName value:SYSFONT(\cf7 18\cf4 ) range:NSMakeRange(\cf7 0\cf4 ,atStr.length)];\
- \cf2 // if (_messageText.selectedRange.length > 0) \{\cf4 \
- \cf2 // [_messageText.textStorage deleteCharactersInRange:_messageText.selectedRange];\cf4 \
- \cf2 // \}\cf4 \
- [_messageText.textStorage insertAttributedString:tncString atIndex:_messageText.selectedRange.location];\
- tncString =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- NSRange newRange = NSMakeRange(_messageText.selectedRange.location + atStr.length, \cf7 0\cf4 );\
- _messageText.selectedRange = newRange;\
- \
- \
- NSMutableAttributedString* spaceString = [[NSMutableAttributedString alloc] initWithString:\cf6 @" "\cf4 ];\
- [_messageText.textStorage insertAttributedString:spaceString atIndex:_messageText.selectedRange.location];\
- newRange = NSMakeRange(_messageText.selectedRange.location + spaceString.length, \cf7 0\cf4 );\
- _messageText.selectedRange = newRange;\
- \cf2 // attachment.emojiSize = CGSizeMake(_messageText.font.lineHeight, _messageText.font.lineHeight);\cf4 \
- \
- \cf2 //\cf4 \
- \cf2 //\cf4 \
- \cf2 //\cf4 \
- \cf2 // [_messageText.textStorage insertAttributedString:[NSAttributedString attributedStringWithAttachment:attachment] atIndex:_messageText.selectedRange.location];\cf4 \
- \
- \cf2 // _messageText.selectedRange = newRange;\cf4 \
- _messageText.font = SYSFONT(\cf7 18\cf4 );\
- \
- \cf2 // [_messageText scrollRangeToVisible:NSMakeRange(_messageText.text.length, 1)];\cf4 \
- \
- \cf2 // [_messageText becomeFirstResponder];\cf4 \
- [_messageText performSelector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (becomeFirstResponder) withObject:
- \f2\b \cf8 nil
- \f0\b0 \cf4 afterDelay:\cf7 0.7\cf4 ];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onSelMedia\cf4 :(JXMediaObject*)p\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count; i ++) \{\
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[i];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMedia:p userId:userId];\
- \cf2 // [g_server uploadFile:p.fileName validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMedia:p userId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 // [g_server uploadFile:p.fileName validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 pickVideo\cf4 \{\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![
- \f2\b \cf8 self
- \f0\b0 \cf4 checkCameraLimits]) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- JXCameraVC *vc = [[JXCameraVC alloc] init];\
- vc.cameraDelegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- \cf2 // vc.maxTime = 30;\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 presentViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 completion:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- \cf2 // if ([[JXMediaObject sharedInstance] fetch].count <= 0) \{\cf4 \
- \cf2 //\cf4 \
- \cf2 // myMediaVC* vc = [[myMediaVC alloc]init];\cf4 \
- \cf2 // vc.delegate = self;\cf4 \
- \cf2 // vc.didSelect = @selector(onSelMedia:);\cf4 \
- \cf12 ///
- \f3 \cf2 / [g_window addSubview:vc.view];
- \f0 \cf4 \
- \cf2 // [g_navigation pushViewController:vc animated:YES];\cf4 \
- \cf2 // [vc onAddVideo];\cf4 \
- \cf2 // \}else \{\cf4 \
- \cf2 // myMediaVC* vc = [[myMediaVC alloc]init];\cf4 \
- \cf2 // vc.delegate = self;\cf4 \
- \cf2 // vc.didSelect = @selector(onSelMedia:);\cf4 \
- \cf12 ///
- \f3 \cf2 / [g_window addSubview:vc.view];
- \f0 \cf4 \
- \cf2 // [g_navigation pushViewController:vc animated:YES];\cf4 \
- \cf2 // \}\cf4 \
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 -
- \f4 \'d2\'95\'c6\'c1\'e4\'9b\'d1\'75\'bb\'d8\'d5\'7b
- \f0\b0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 cameraVC\cf4 :(JXCameraVC *)vc \cf11 didFinishWithVideoPath\cf4 :(NSString *)filePath \cf11 timeLen\cf4 :(NSInteger)timeLen \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ( ![[NSFileManager defaultManager] fileExistsAtPath:filePath] )\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- NSString* file = filePath;\
- \
- JXMediaObject* p = [[JXMediaObject alloc]init];\
- p.userId = g_server.myself.userId;\
- p.fileName = file;\
- p.isVideo = [NSNumber numberWithBool:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- p.timeLen = [NSNumber numberWithInteger:timeLen];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
- \cf2 // NSString *userId = self.userIds[i];\cf4 \
- \cf2 //\cf4 \
- \cf2 // [self sendMedia:p userId:userId];\cf4 \
- \cf12 ///
- \f3 \cf2 / [g_server uploadFile:p.fileName validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];
- \f0 \cf4 \
- \cf2 // [self saveVideo:file];\cf4 \
- \cf2 // \}\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_video];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:p];\
- _onceSendNum = \cf7 1\cf4 ;\
- _isOriginal =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMedias:
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray isSave:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMedia:p userId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 // [g_server uploadFile:p.fileName validTime:self.chatPerson.chatRecordTimeOut messageId:nil toView:self];\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 saveVideo:file];\
- \}\
- \}\
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 saveVideo\cf4 :(NSString *)videoPath\{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (videoPath) \{\
- NSURL *url = [NSURL URLWithString:videoPath];\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 compatible = UIVideoAtPathIsCompatibleWithSavedPhotosAlbum([url path]);\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (compatible) \{\
- \cf2 //
- \f1 \'b1\'a3\'b4\'e6\'cf\'e0\'b2\'e1\'ba\'cb\'d0\'c4\'b4\'fa\'c2\'eb
- \f0 \cf4 \
- UISaveVideoAtPathToSavedPhotosAlbum([url path],
- \f2\b \cf8 self
- \f0\b0 \cf4 ,
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (savedPhotoImage:didFinishSavingWithError:contextInfo:),
- \f2\b \cf8 nil
- \f0\b0 \cf4 );\
- \}\
- \}\
- \}\
- \
- \
- \cf2 //
- \f1 \'b1\'a3\'b4\'e6\'ca\'d3\'c6\'b5\'cd\'ea\'b3\'c9\'d6\'ae\'ba\'f3\'b5\'c4\'bb\'d8\'b5\'f7
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 savedPhotoImage\cf4 :(UIImage*)image \cf11 didFinishSavingWithError\cf4 : (NSError *)error \cf11 contextInfo\cf4 : (
- \f2\b \cf8 void
- \f0\b0 \cf4 *)contextInfo \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (error) \{\
- NSLog(\cf6 @"
- \f1 \'b1\'a3\'b4\'e6\'ca\'d3\'c6\'b5\'ca\'a7\'b0\'dc
- \f0 %@"\cf4 , error.localizedDescription);\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- NSLog(\cf6 @"
- \f1 \'b1\'a3\'b4\'e6\'ca\'d3\'c6\'b5\'b3\'c9\'b9\'a6
- \f0 "\cf4 );\
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onChatSip\cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \cf2 // if (![self checkCameraLimits]) \{\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- NSString *str1;\
- NSString *str2;\
- NSString *str3;\
- JXActionSheetVC *actionVC;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
- memberData *data = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:g_myself.userId];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!_isAdmin && ![
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowConference boolValue]) \{\
- [g_App showAlert:Localized(\cf6 @"JX_DisabledAudioAndVideo"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- str1 = Localized(\cf6 @"JXSettingVC_VideoMeeting"\cf4 );\
- str2 = Localized(\cf6 @"JX_Meeting"\cf4 );\
- str3 = Localized(\cf6 @"JX_WalkieTalkie"\cf4 );\
- \cf2 //actionVC = [[JXActionSheetVC alloc] initWithImages:@[@"meeting_talk",@"meeting_tel",@"meeting_video"] names:@[str3,str2,str1]];\cf4 \
- \cf2 // actionVC = [[JXActionSheetVC alloc] initWithImages:@[@"meeting_video"] names:@[str1]];\cf4 \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 actionSheet:actionVC didButtonWithIndex:\cf7 2\cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- str1 = Localized(\cf6 @"JX_VideoChat"\cf4 );\
- str2 = Localized(\cf6 @"JX_VoiceChat"\cf4 );\
- actionVC = [[JXActionSheetVC alloc] initWithImages:\cf7 @[\cf6 @"meeting_tel"\cf4 ,\cf6 @"meeting_video"\cf7 ]\cf4 names:\cf7 @[\cf4 str2,str1\cf7 ]\cf4 ];\
- \
- \
- actionVC.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 presentViewController:actionVC animated:
- \f2\b \cf8 NO
- \f0\b0 \cf4 completion:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 actionSheet\cf4 :(JXActionSheetVC *)actionSheet \cf11 didButtonWithIndex\cf4 :(NSInteger)index \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (actionSheet.tag == \cf7 2457\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (index == \cf7 0\cf4 ) \{\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 flag =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr.count; i ++) \{\
- JXMessageObject *msg = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr[i] copy];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeRedPacket || [msg.type intValue] == kWCMessageTypeTransfer) \{\
- flag =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (flag) \{\
- \
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:
- \f2\b \cf8 nil
- \f0\b0 \cf4 message:\cf6 @"
- \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
- \f0 "\cf4 delegate:
- \f2\b \cf8 self
- \f0\b0 \cf4 cancelButtonTitle:\cf6 @"
- \f1 \'c8\'a1\'cf\'fb
- \f0 "\cf4 otherButtonTitles:\cf6 @"
- \f1 \'d7\'aa\'b7\'a2
- \f0 "\cf4 ,
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- alert.tag = \cf7 3457\cf4 ;\
- [alert show];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- JXRelayVC *vc = [[JXRelayVC alloc] init];\
- vc.relayMsgArray = [NSMutableArray arrayWithArray:
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr];\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (index == \cf7 1\cf4 ) \{\
- JXRelayVC *vc = [[JXRelayVC alloc] init];\
- \
- NSMutableArray *contentArr = [NSMutableArray array];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr.count; i ++) \{\
- JXMessageObject *msg = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr[i] copy];\
- \
-
- \f2\b \cf8 if
- \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) \{\
- msg.content = [msg getLastContent];\
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 ([msg.type intValue]) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeRedPacket: \{\
- msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JXredPacket"\cf4 )];\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudioMeetingInvite:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideoMeetingInvite:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudioChatCancel:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudioChatEnd:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideoChatCancel:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideoChatEnd:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAVBusy:\{\
- msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JX_AudioAndVideoCalls"\cf4 )];;\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeSystemImage1:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeSystemImage2: \{\
- msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JXGraphic"\cf4 )];\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeMergeRelay:\
- msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JX_ChatRecord"\cf4 )];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
- msg.fileName = \cf6 @""\cf4 ;\
- \}\
- \
- SBJsonWriter * OderJsonwriter = [SBJsonWriter
- \f2\b \cf8 new
- \f0\b0 \cf4 ];\
- NSString * jsonString = [OderJsonwriter stringWithObject:[msg toDictionary]];\
- [contentArr addObject:jsonString];\
- \}\
- \
- JXMessageObject *relayMsg = [[JXMessageObject alloc] init];\
- relayMsg.type = [NSNumber numberWithInt:kWCMessageTypeMergeRelay];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
- relayMsg.objectId = Localized(\cf6 @"JX_GroupChatLogs"\cf4 );\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- relayMsg.objectId = [NSString stringWithFormat:Localized(\cf6 @"JX_GroupChat%@And%@"\cf4 ),
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userNickname, g_myself.userNickname];\
- \}\
- NSData *jsonData = [NSJSONSerialization dataWithJSONObject:contentArr options:NSJSONWritingPrettyPrinted error:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- NSString *jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];\
- relayMsg.content = jsonStr;\
- \
- \
- vc.relayMsgArray = [NSMutableArray arrayWithObject:relayMsg];\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (actionSheet.tag == \cf7 2458\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (index == \cf7 0\cf4 ) \{\
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:
- \f2\b \cf8 nil
- \f0\b0 \cf4 message:Localized(\cf6 @"JX_SaveOnlyPictureMessages"\cf4 ) delegate:
- \f2\b \cf8 self
- \f0\b0 \cf4 cancelButtonTitle:Localized(\cf6 @"JX_Cencal"\cf4 ) otherButtonTitles:Localized(\cf6 @"JX_Save"\cf4 ),
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- alert.tag = \cf7 2458\cf4 ;\
- [alert show];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (actionSheet.tag == \cf7 1111\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (index == \cf7 0\cf4 )\
- [g_notify postNotificationName:kCellDeleteMsgNotifaction object:[NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .indexNum]];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (index == \cf7 1\cf4 )\
- [g_notify postNotificationName:kCellResendMsgNotifaction object:[NSNumber numberWithInt:
- \f2\b \cf8 self
- \f0\b0 \cf4 .indexNum]];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid || [g_config.isOpenCluster integerValue] != \cf7 1\cf4 ) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (index == \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onChatTalk:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (index == \cf7 1\cf4 )\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onChatAudio:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (index == \cf7 2\cf4 )\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onChatVideo:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (index == \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onChatAudio:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (index == \cf7 1\cf4 )\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onChatVideo:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (index == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (index == \cf7 1\cf4 )\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- [g_server userOpenMeetWithToUserId:chatPerson.userId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \
- \}\
- \
- \}\
- \
- \
- \cf5 #if TAR_IM\cf4 \
- \cf5 #ifdef Meeting_Version\cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onGroupAudioMeeting\cf4 :(JXMessageObject*)msg\{\
- NSString* no;\
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg !=
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\{\
- no = msg.fileName;\
- s = msg.objectId;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- no = _audioMeetingNo;\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- \}\
- \cf2 // if(!no)\{\cf4 \
- \cf2 // [g_App showAlert:Localized(@"JXMeeting_numberNULL")];\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .meetingNo = no;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isTalkMeeting =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onInvite];\
- \cf2 // [g_meeting startAudioMeeting:no roomJid:s];\cf4 \
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onGroupVideoMeeting\cf4 :(JXMessageObject*)msg\{\
- NSString* no;\
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg !=
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\{\
- no = msg.fileName;\
- s = msg.objectId;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- no = _videoMeetingNo;\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- \}\
- \cf2 // if(!no)\{\cf4 \
- \cf2 // [g_App showAlert:Localized(@"JXMeeting_numberNULL")];\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .meetingNo = no;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isTalkMeeting =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onInvite];\
- \cf2 // [g_meeting startVideoMeeting:no roomJid:s];\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onGroupTalkMeeting\cf4 :(JXMessageObject *)msg \{\
- NSString* no;\
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg !=
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\{\
- no = msg.fileName;\
- s = msg.objectId;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- no = _audioMeetingNo;\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- \}\
- \cf2 // if(!no)\{\cf4 \
- \cf2 // [g_App showAlert:Localized(@"JXMeeting_numberNULL")];\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .meetingNo = no;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isTalkMeeting =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onInvite];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onInvite\cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!_room.roomId) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- NSMutableSet* p = [[NSMutableSet alloc]init];\
- \
- JXSelectFriendsVC* vc = [JXSelectFriendsVC alloc];\
- vc.isNewRoom =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- vc.isShowMySelf =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- vc.type = JXSelectFriendTypeSelMembers;\
- vc.room = _room;\
- vc.existSet = p;\
- vc.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- vc.didSelect =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (meetingAddMember:);\
- vc = [vc init];\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 meetingAddMember\cf4 :(JXSelectFriendsVC*)vc\{\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 type;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting) \{\
- type = kWCMessageTypeAudioMeetingInvite;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- type = kWCMessageTypeVideoMeetingInvite;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isTalkMeeting) \{\
- type = kWCMessageTypeTalkInvite;\
- \}\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSNumber* n
- \f2\b \cf8 in
- \f0\b0 \cf4 vc.set)\{\
- memberData *user;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (vc.seekTextField.text.length > \cf7 0\cf4 ) \{\
- user = vc.searchArray[[n intValue] % \cf7 100000\cf4 -\cf7 1\cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- user = [[vc.letterResultArr objectAtIndex:[n intValue] / \cf7 100000\cf4 -\cf7 1\cf4 ] objectAtIndex:[n intValue] % \cf7 100000\cf4 -\cf7 1\cf4 ];\
- \}\
- NSString* s = [NSString stringWithFormat:\cf6 @"%ld"\cf4 ,user.userId];\
- [g_meeting sendMeetingInvite:s toUserName:user.userName roomJid:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid callId:
- \f2\b \cf8 self
- \f0\b0 \cf4 .meetingNo type:type];\
- \}\
- \
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 .5\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (g_meeting.isMeeting) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- JXAVCallViewController *avVC = [[JXAVCallViewController alloc] init];\
- avVC.roomNum =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- avVC.isAudio =
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting;\
- avVC.isTalk =
- \f2\b \cf8 self
- \f0\b0 \cf4 .isTalkMeeting;\
- avVC.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- avVC.toUserName =
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatRoom.roomTitle;\
- avVC.view.frame = [UIScreen mainScreen].bounds;\
- \cf2 // [self presentViewController:avVC animated:YES completion:nil];\cf4 \
- [g_window addSubview:avVC.view];\
- \
- \});\
- \
- \}\
- \cf5 #endif\cf4 \
- \cf5 #endif\cf4 \
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onChatAudio\cf4 :(JXMessageObject*)msg\{\
- \cf5 #if TAR_IM\cf4 \
- \cf5 #ifdef Meeting_Version\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 //
- \f1 \'d1\'e9\'d6\'a4
- \f0 XMPP
- \f1 \'ca\'c7\'b7\'f1\'d4\'da\'cf\'df
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (g_xmpp.isLogined != login_status_yes)\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- [g_xmpp showXmppOfflineAlert];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 // if(!g_meeting.connected)\{\cf4 \
- \cf2 // [g_meeting showAutoConnect];\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ((
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid || msg.objectId.length > \cf7 0\cf4 ) && [msg.type intValue] != kWCMessageTypeAVBusy)\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onGroupAudioMeeting:msg];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- AskCallViewController* vc = [AskCallViewController alloc];\
- vc.toUserId = chatPerson.userId;\
- vc.toUserName = chatPerson.userNickname;\
- vc.type = kWCMessageTypeAudioChatAsk;\
- vc.meetUrl =
- \f2\b \cf8 self
- \f0\b0 \cf4 .meetUrl;\
- vc = [vc init];\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \
- \cf5 #endif\cf4 \
- \cf5 #endif\cf4 \
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onChatVideo\cf4 :(JXMessageObject*)msg\{\
- \cf5 #if TAR_IM\cf4 \
- \cf5 #ifdef Meeting_Version\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 //
- \f1 \'d1\'e9\'d6\'a4
- \f0 XMPP
- \f1 \'ca\'c7\'b7\'f1\'d4\'da\'cf\'df
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (g_xmpp.isLogined != login_status_yes)\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- [g_xmpp showXmppOfflineAlert];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 // if(!g_meeting.connected)\{\cf4 \
- \cf2 // [g_meeting showAutoConnect];\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ((
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid || msg.objectId.length > \cf7 0\cf4 ) && [msg.type intValue] != kWCMessageTypeAVBusy)\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onGroupVideoMeeting:msg];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- AskCallViewController* vc = [AskCallViewController alloc];\
- vc.toUserId = chatPerson.userId;\
- vc.toUserName = chatPerson.userNickname;\
- vc.type = kWCMessageTypeVideoChatAsk;\
- vc.meetUrl =
- \f2\b \cf8 self
- \f0\b0 \cf4 .meetUrl;\
- vc = [vc init];\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \cf5 #endif\cf4 \
- \cf5 #endif\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onChatTalk\cf4 :(JXMessageObject*)msg \{\
- \cf5 #if TAR_IM\cf4 \
- \cf5 #ifdef Meeting_Version\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 //
- \f1 \'d1\'e9\'d6\'a4
- \f0 XMPP
- \f1 \'ca\'c7\'b7\'f1\'d4\'da\'cf\'df
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (g_xmpp.isLogined != login_status_yes)\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- [g_xmpp showXmppOfflineAlert];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 // if(!g_meeting.connected)\{\cf4 \
- \cf2 // [g_meeting showAutoConnect];\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onGroupTalkMeeting:msg];\
- \
- \cf5 #endif\cf4 \
- \cf5 #endif\cf4 \
- \}\
- \
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onHeadImage\cf4 :(UIView*)sender\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- JXMessageObject *msg=[_array objectAtIndex:sender.tag];\
- [g_server getUser:msg.fromUserId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- msg =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onMember\cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- NSString *s;\
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupStatus intValue]) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 0\cf4 :\
- s =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 1\cf4 :\
- s = Localized(\cf6 @"JX_OutOfTheGroup1"\cf4 );\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 2\cf4 :\
- s = Localized(\cf6 @"JX_DissolutionGroup1"\cf4 );\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (s.length > \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- [g_server showMsg:s];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 // [_wait start];\cf4 \
- \
- JXRoomMemberVC* vc = [JXRoomMemberVC alloc];\
- \cf2 // vc.chatRoom = [[JXXMPP sharedInstance].roomPool joinRoom:roomdata.roomJid title:roomdata.name isNew:NO];\cf4 \
- \cf2 // vc.room = roomdata;\cf4 \
- vc.roomId = roomId;\
- vc.room = _room;\
- vc.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- _strURLGoback=\cf6 @""\cf4 ;\
- vc = [vc init];\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \cf2 // [g_server getRoom:roomId toView:self];\cf4 \
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onQuitRoom\cf4 :(NSNotification *)notifacation\cf2 //
- \f1 \'b3\'ac\'ca\'b1\'ce\'b4\'ca\'d5\'b5\'bd\'bb\'d8\'d6\'b4
- \f0 \cf4 \
- \{\
- JXRoomObject* p = (JXRoomObject *)notifacation.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (p == chatRoom)\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 actionQuit];\
- p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 -
- \f4 \'bf\'d8\'d6\'c6\'cf\'fb\'cf\'a2\'b4\'a6\'c0\'ed
- \f0\b0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onReceiveRoomRemind\cf4 :(NSNotification *)notifacation\
- \{\
- JXRoomRemind* p = (JXRoomRemind *)notifacation.object;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.objectId isEqualToString:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid])\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomName)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = [NSString stringWithFormat:\cf6 @"%@(%ld)"\cf4 ,p.content,_room.curCount];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_DisableSay)\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.toUserId isEqualToString:MY_USER_ID])\
- _disableSay = [p.content longLongValue];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_DelMember)\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.toUserId isEqualToString:MY_USER_ID])\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupStatus = [NSNumber numberWithInt:\cf7 1\cf4 ];\
- \cf2 // [self actionQuit];\cf4 \
- \
- NSArray * memberArray = [memberData fetchAllMembers:_room.roomId];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = [NSString stringWithFormat:\cf6 @"%@(%ld)"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userNickname, memberArray.count];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_NewNotice)\{\
- NSArray *noticeArr = [p.content componentsSeparatedByString:Localized(\cf6 @"JXMessageObject_AddNewAdv"\cf4 )];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setupNoticeWithContent:[noticeArr lastObject] time:[NSString stringWithFormat:\cf6 @"%lf"\cf4 ,[[NSDate date] timeIntervalSince1970]]];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_DelRoom)\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.toUserId isEqualToString:MY_USER_ID] || IS_OTHER_DEVICE(p.toUserId))\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupStatus = [NSNumber numberWithInt:\cf7 2\cf4 ];\
- \cf2 // [self actionQuit];\cf4 \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_AddMember)\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.toUserId isEqualToString:MY_USER_ID])\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupStatus = [NSNumber numberWithInt:\cf7 0\cf4 ];\
- chatRoom.isConnected =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- NSArray * memberArray = [memberData fetchAllMembers:_room.roomId];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = [NSString stringWithFormat:\cf6 @"%@(%ld)"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userNickname, memberArray.count];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \cf2 // [self actionQuit];\cf4 \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_NickName)\{\
- \
- memberData *data = [[memberData alloc] init];\
- data.roomId = roomId;\
- data.userNickName = p.content;\
- data.userId = [p.toUserId longLongValue];\
- [data updateUserNickName];\
- \
- \cf2 // for (int i = 0; i < [_array count] ; i++) \{\cf4 \
- \cf2 // JXMessageObject *msg=[_array objectAtIndex:i];\cf4 \
- \cf2 // if ([msg.fromUserId isEqualToString:p.userId]) \{\cf4 \
- \cf2 // msg.fromUserName = p.content;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // \}\cf4 \
- \
- [_table reloadData];\
- \
- \cf2 // for(int i=0;i<[_room.members count];i++)\{\cf4 \
- \cf2 // memberData* m = [_room.members objectAtIndex:i];\cf4 \
- \cf2 // if(m.userId == [p.toUserId intValue])\{\cf4 \
- \cf2 // m.userNickName = p.content;\cf4 \
- \cf2 // break;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // m = nil;\cf4 \
- \cf2 // \}\cf4 \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_SetManage) \{\
- \cf2 //
- \f1 \'c9\'e8\'d6\'c3\'c8\'ba\'d7\'e9\'b9\'dc\'c0\'ed\'d4\'b1
- \f0 \cf4 \
- \
- JXUserObject *user = [[JXUserObject sharedInstance] getUserById:p.objectId];\
- \
- NSDictionary * groupDict = [user toDictionary];\
- roomData * roomdata = [[roomData alloc] init];\
- [roomdata getDataFromDict:groupDict];\
- NSArray * allMem = [memberData fetchAllMembers:user.roomId];\
- roomdata.members = [allMem mutableCopy];\
- \
- memberData *member = [roomdata getMember:p.toUserId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([member.role intValue] == \cf7 2\cf4 ) \{\
- member.role = [NSNumber numberWithInt:\cf7 2\cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- member.role = [NSNumber numberWithInt:\cf7 3\cf4 ];\
- \}\
- [member updateRole];\
- _room = roomdata;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.toUserId isEqualToString:g_myself.userId]) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([member.role intValue] == \cf7 2\cf4 ) \{\
- _isAdmin =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \
- _shareMore.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _recordBtnLeft.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _btnFace.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _messageText.userInteractionEnabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _talkTimeLabel.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _isAdmin =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.talkTime longLongValue] > \cf7 0\cf4 ) \{\
- _talkTimeLabel.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _talkTimeLabel.text = Localized(\cf6 @"JX_TotalSilence"\cf4 );\
- _shareMore.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _recordBtnLeft.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _btnFace.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _messageText.userInteractionEnabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _messageText.text =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- _shareMore.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _recordBtnLeft.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _btnFace.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _messageText.userInteractionEnabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _talkTimeLabel.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [_table reloadData];\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_ShowRead)\{\
- \cf2 //BOOL b = [self.chatPerson.showRead boolValue];\cf4 \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.showRead = [NSNumber numberWithInt:[p.content intValue]];\
- \cf2 //if(b != [self.chatPerson.showRead boolValue])\cf4 \
- \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [_table reloadData];\
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_ShowMember)\{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.showMember = [NSNumber numberWithInt:[p.content intValue]];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_allowSendCard)\{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowSendCard = [NSNumber numberWithInt:[p.content intValue]];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.allowSendCard = [p.content boolValue];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 //
- \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
- \f0 *
- \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
- \f0 \cf4 \
- [_table reloadData];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomAllowInviteFriend)\{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowInviteFriend = [NSNumber numberWithInt:[p.content intValue]];\
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomAllowUploadFile)\{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowUploadFile = [NSNumber numberWithInt:[p.content intValue]];\
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomAllowConference)\{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowConference = [NSNumber numberWithInt:[p.content intValue]];\
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomAllowSpeakCourse)\{\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowSpeakCourse = [NSNumber numberWithInt:[p.content intValue]];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomAllBanned)\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.talkTime = [NSNumber numberWithInt:[p.content intValue]];\
- _disableSay = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.talkTime longLongValue];\
- \
- \
- \cf2 // memberData *data = [self.room getMember:g_myself.userId];\cf4 \
- \cf2 // if ([data.role intValue] == 1 || [data.role intValue] == 2) \{\cf4 \
- \cf2 // _isAdmin = YES;\cf4 \
- \cf2 // \}else \{\cf4 \
- \cf2 // _isAdmin = NO;\cf4 \
- \cf2 // \}\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.talkTime longLongValue] > \cf7 0\cf4 && !_isAdmin) \{\
- _talkTimeLabel.text = Localized(\cf6 @"JX_TotalSilence"\cf4 );\
- _shareMore.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _recordBtnLeft.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _btnFace.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _messageText.userInteractionEnabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _talkTimeLabel.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _messageText.text =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _shareMore.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _recordBtnLeft.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _btnFace.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _messageText.userInteractionEnabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _talkTimeLabel.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \cf2 // [self refresh:nil];\cf4 \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_SetInvisible)\{\
- JXUserObject *user = [[JXUserObject sharedInstance] getUserById:p.objectId];\
- \
- NSDictionary * groupDict = [user toDictionary];\
- roomData * roomdata = [[roomData alloc] init];\
- [roomdata getDataFromDict:groupDict];\
- NSArray * allMem = [memberData fetchAllMembers:user.roomId];\
- roomdata.members = [allMem mutableCopy];\
- \
- memberData *member = [roomdata getMember:p.toUserId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.content intValue] == \cf7 1\cf4 ) \{\
- [member updateRoleByUserId:[p.toUserId longLongValue] role:[NSNumber numberWithInt:\cf7 4\cf4 ]];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [member updateRoleByUserId:[p.toUserId longLongValue] role:[NSNumber numberWithInt:\cf7 3\cf4 ]];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.toUserId isEqualToString:MY_USER_ID]) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.content intValue] == \cf7 1\cf4 ) \{\
- _talkTimeLabel.text = Localized(\cf6 @"JX_ProhibitToSpeak"\cf4 );\
- _messageText.userInteractionEnabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _shareMore.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _recordBtnLeft.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _btnFace.enabled =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _talkTimeLabel.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- _messageText.text =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- member.role = [NSNumber numberWithInt:\cf7 4\cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _talkTimeLabel.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _shareMore.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _recordBtnLeft.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _btnFace.enabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _messageText.userInteractionEnabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- member.role = [NSNumber numberWithInt:\cf7 3\cf4 ];\
- \}\
- [member updateRole];\
- _room = roomdata;\
- \}\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomTransfer)\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.fromUserId isEqualToString:MY_USER_ID] || [p.toUserId isEqualToString:MY_USER_ID]) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.fromUserId isEqualToString:MY_USER_ID]) \{\
- _isAdmin =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _isAdmin =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_RoomDisable) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.content integerValue] != \cf7 1\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isDisable =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isDisable =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type intValue] == kRoomRemind_SetRecordTimeOut) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.objectId isEqualToString:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid]) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.chatRecordTimeOut = p.content;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson updateUserChatRecordTimeOut];\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'c8\'ba\'c4\'da\'cc\'df\'c8\'cb\'a3\'ac\'c9\'be\'b3\'fd\'cb\'f9\'d3\'d0\'cf\'fb\'cf\'a2
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type integerValue] == kRoomRemind_RoomDeleteMsg) \{\
- \cf2 // printf(<#const char *, ...#>)\cf4 \
- \}\
- \
- \cf2 //
- \f1 \'c8\'ba\'d7\'e9\'cf\'d4\'ca\'be\'cd\'b7\'cf\'ce
- \f0 \cf4 \
- \cf2 // if ([p.type integerValue] == kRoomRemind_RoomIsOpenIntegral) \{\cf4 \
- \cf2 // if ([p.content intValue] == 0) \{\cf4 \
- \cf2 // self.isOpenIntegral = NO;\cf4 \
- \cf2 // \}else\{\cf4 \
- \cf2 // self.isOpenIntegral = YES;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // // [self refresh:nil];\cf4 \
- \cf2 // [_table reloadData];\cf4 \
- \cf2 // \}\cf4 \
- \
- \cf2 //
- \f1 \'c8\'ba\'d7\'e9\'cf\'fb\'cf\'a2\'b7\'c0\'b2\'e2\'bb\'d8
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type integerValue] == kRoomRemind_RoomIsAttritionRecall) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.content intValue] == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isOpenIntegral =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isOpenIntegral =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'d7\'ee\'d0\'c2\'b9\'ab\'b8\'e6
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.type integerValue] == kRoomRemind_editNotice) \{\
- \cf2 // NSArray *noticeArr = [p.content componentsSeparatedByString:Localized(@"JXMessageObject_AddNewAdv")];\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setupNoticeWithContent:p.content time:[NSString stringWithFormat:\cf6 @"%lf"\cf4 ,[[NSDate date] timeIntervalSince1970]]];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showLatestBroadcastTitle:\cf6 @"
- \f1 \'d7\'ee\'d0\'c2\'b9\'ab\'b8\'e6
- \f0 "\cf4 message:p.content];\
- \}\
- \
- \}\
- \}\
- \
- \cf2 //
- \f1 \'c8\'ba\'bb\'ee\'b6\'af\'cf\'fb\'cf\'a2
- \f0
- \f1 \'c7\'c0\'ba\'ec\'b0\'fc\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 RoomRemind_RoomIsRedMoneyGroupActivityRefresh\cf4 :(NSNotification *)notifacation \{\
- JLGroupActivityModel *model = (JLGroupActivityModel *)notifacation.object;\
- _activityModel = model;\
- [_container dismiss];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([model.roomJid isEqualToString:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid]) \{\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showAdAlertViewImageRedPackage:\cf6 @"ad_treasureBox.png"\cf4 linkUrl:
- \f2\b \cf8 nil
- \f0\b0 \cf4 audio:
- \f2\b \cf8 nil
- \f0\b0 \cf4 duration:\cf7 3\cf4 content:model showCancelButton:
- \f2\b \cf8 YES
- \f0\b0 \cf4 type:(DYAdModelTypeGiftOpen) success:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- \
- NSString *showAS=[g_default objectForKey:\cf6 @"showPackageActive"\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (showAS.length>\cf7 0\cf4 ) \{\
- [g_default removeObjectForKey:\cf6 @"showPackageActive"\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- [g_default setObject:\cf6 @"showPackageActive"\cf4 forKey:\cf6 @"showPackageActive"\cf4 ];\
- [g_default synchronize];\
- \}\
- \
- \}\
- \
- \
- \
- \}\
- \
- \cf2 //
- \f1 \'c8\'ba\'bb\'ee\'b6\'af\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 roomGroupActivityRefresh\cf4 :(NSNotification *)notifacation \{\
- JLGroupActivityModel *model = (JLGroupActivityModel *)notifacation.object;\
- _activityModel = model;\
- \
- \cf2 //if (_isShowRedPackage==1) \{ return; \}\cf4 \
- \
- [_container dismiss];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([model.roomJid isEqualToString:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid]) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (model.type == \cf7 1\cf4 ) \{\
- JXLabelObject *obj = [JXLabelObject sharedInstance];\
- obj.roomJid =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- NSString *groupAnnouncement =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- NSString *selectItem = [obj fetchGroupAnnouncementSelectItemFromLocal];\
- NSArray *response = [
- \f2\b \cf8 self
- \f0\b0 \cf4 dictionaryWithJsonString: model.content];\
- NSMutableArray *modelArray = [NSMutableArray array];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSDictionary *dict
- \f2\b \cf8 in
- \f0\b0 \cf4 response) \{\
- [JLSelectModel mj_setupObjectClassInArray:^NSDictionary *\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 \cf7 @\{\cf4 \
- \cf6 @"data"\cf4 : \cf6 @"JLSelectItemModel"\cf4 \
- \cf7 \}\cf4 ;\
- \}];\
- JLSelectModel *model = [JLSelectModel mj_objectWithKeyValues:dict];\
- [modelArray addObject:model];\
- \}\
- \cf2 //
- \f1 \'b2\'f0\'b7\'d6
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (selectItem) \{\
- NSArray *temp = [selectItem componentsSeparatedByString:\cf6 @"-"\cf4 ];\
- NSString *first = temp.firstObject;\
- NSString *last = temp.lastObject;\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (JLSelectModel *model
- \f2\b \cf8 in
- \f0\b0 \cf4 modelArray) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([model.name isEqualToString:first]) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (JLSelectItemModel *selectItemModel
- \f2\b \cf8 in
- \f0\b0 \cf4 model.data) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([selectItemModel.subName isEqualToString:last]) \{\
- groupAnnouncement = selectItemModel.content;\
- \
- NSString *titleName = [NSString stringWithFormat:\cf6 @" %@"\cf4 ,selectItemModel.subName];\
- [_showTopView.caizongBtn setTitle:titleName forState:UIControlStateNormal];\
- _showTopView.selectItemModel=selectItemModel;\
- \
- \
- \}\
- \}\
- \}\
- \
- \}\
- \
- \}\
- \
- \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_strURLGoback.length==\cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (model.type == \cf7 0\cf4 ) \{\
- \cf2 //
- \f1 \'b5\'da\'d2\'bb\'b4\'ce\'c9\'e8\'d6\'c3
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (model.content.length<=\cf7 5\cf4 )\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([g_default boolForKey:kLongComePushIsFirstSetUp] != \cf7 1\cf4 )\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showAdAlertViewImageString:\cf6 @"ad_long.gif"\cf4 linkUrl:model.link audio:\cf6 @"houjia.mp3"\cf4 duration:\cf7 1\cf4 content:model.content showCancelButton:
- \f2\b \cf8 NO
- \f0\b0 \cf4 type:(DYAdModelTypeLongAnimation) success:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([g_default boolForKey:kLongComePush] == \cf7 0\cf4 )\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showAdAlertViewImageString:\cf6 @"ad_long.gif"\cf4 linkUrl:model.link audio:\cf6 @"houjia.mp3"\cf4 duration:\cf7 4\cf4 content:model.content showCancelButton:
- \f2\b \cf8 NO
- \f0\b0 \cf4 type:(DYAdModelTypeLongAnimation) success:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (model.type == \cf7 3\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showAdAlertViewImageString:\cf6 @"ad_treasureBox.png"\cf4 linkUrl:
- \f2\b \cf8 nil
- \f0\b0 \cf4 audio:
- \f2\b \cf8 nil
- \f0\b0 \cf4 duration:\cf7 0\cf4 content:\cf6 @"
- \f1 \'b9\'a7\'cf\'b2\'c4\'fa\'bb\'f1\'b5\'c3\'d2\'bb\'b8\'f6\'b1\'a6\'cf\'e4
- \f0 !"\cf4 showCancelButton:
- \f2\b \cf8 YES
- \f0\b0 \cf4 type:(DYAdModelTypeGiftOpen) success:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \
- \
- \}\
- \}\
- \
- \cf2 //
- \f1 \'c8\'ba\'cd\'b7\'cf\'ce\'bf\'aa\'b9\'d8\'bf\'d8\'d6\'c6
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 roomIsOpenIntegral\cf4 :(NSNotification *)notifacation \{\
- NSString* p = (NSString *)notifacation.object;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p intValue] == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isOpenIntegral =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isOpenIntegral =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [_table reloadData];\
- \}\
- \
- \cf2 //
- \f1 \'c8\'ba\'d7\'e9\'cf\'fb\'cf\'a2\'b7\'c0\'b2\'e2\'bb\'d8
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 roomIsisAttritionRecall\cf4 :(NSNotification *)notifacation \{\
- NSString* p = (NSString *)notifacation.object;\
- \cf2 //
- \f1 \'c8\'ba\'d7\'e9\'cf\'fb\'cf\'a2\'b7\'c0\'b2\'e2\'bb\'d8
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p intValue] == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAttritionRecall =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAttritionRecall =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \cf2 // [g_server roomGetRoom:self.roomId toView:self];\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 refresh:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \
- -(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 showDisableSay\cf4 \{\
- \
- memberData *data = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:g_myself.userId];\
- \cf2 // if([[NSDate date] timeIntervalSince1970] <= _disableSay && [data.role intValue] != 1)\{\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([[NSDate date] timeIntervalSince1970] <= _disableSay && !_isAdmin)\{\
- NSString* s = [TimeUtil formatDate:[NSDate dateWithTimeIntervalSince1970:_disableSay] format:\cf6 @"yyyy-MM-dd HH:mm"\cf4 ];\
- [g_App showAlert:[NSString stringWithFormat:\cf6 @"%@%@"\cf4 ,s,Localized(\cf6 @"JXChatVC_GagTime"\cf4 )]];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onLocation\cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([CLLocationManager locationServicesEnabled] && ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorizedWhenInUse || [CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined || [CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized)) \{\
- \cf2 //
- \f1 \'b6\'a8\'ce\'bb\'b9\'a6\'c4\'dc\'bf\'c9\'d3\'c3
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (g_server.latitude <= \cf7 0\cf4 && g_server.longitude <= \cf7 0\cf4 ) \{\
- g_server.latitude = \cf7 22.6\cf4 ;\
- g_server.longitude = \cf7 114.04\cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (g_config.isChina) \{\
- _locVC = [JXLocationVC alloc];\
- _locVC.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _locVC.locationType = JXLocationTypeCurrentLocation;\
- _locVC.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- _locVC.didSelect =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onSelLocation:);\
- \cf2 // self.locationVC.locations = [[NSMutableArray alloc]init];\cf4 \
- \
- \cf2 // JXMapData* p = [[JXMapData alloc]init];\cf4 \
- \cf2 // p.latitude = [NSString stringWithFormat:@"%f",g_server.latitude];\cf4 \
- \cf2 // p.longitude = [NSString stringWithFormat:@"%f",g_server.longitude];\cf4 \
- \cf2 // p.title = g_server.locationCity;\cf4 \
- \cf2 // p.subtitle = g_server.locationAddress;\cf4 \
- \cf2 // [self.locationVC.locations addObject:p];\cf4 \
- \cf2 // [p release];\cf4 \
- \
- _locVC = [_locVC init];\
- \cf2 // self.locationVC.locY = g_server.latitude;\cf4 \
- \cf2 // self.locationVC.locX = g_server.longitude;\cf4 \
- \cf2 // [g_window addSubview:_locVC.view];\cf4 \
- [g_navigation pushViewController:_locVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _gooMap = [JXGoogleMapVC alloc];\
- _gooMap.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- _gooMap.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- _gooMap.locationType = JXGooLocationTypeCurrentLocation;\
- _gooMap.didSelect =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onSelLocation:);\
- \
- _gooMap = [_gooMap init];\
- [g_navigation pushViewController:_gooMap animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([CLLocationManager authorizationStatus] ==kCLAuthorizationStatusDenied) \{\
- \cf2 //
- \f1 \'b6\'a8\'ce\'bb\'b2\'bb\'c4\'dc\'d3\'c3
- \f0 \cf4 \
- [g_App showAlert:[NSString stringWithFormat:Localized(\cf6 @"JX_NoLocationPermissions"\cf4 ),APP_NAME]];\
- \}\
- \
- \}\
- \
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onSelLocation\cf4 :(JXMapData*)location\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isGroupSendCancel) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \cf2 //
- \f1 \'c9\'cf\'b4\'ab\'cd\'bc\'c6\'ac
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (location.imageUrl) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isMapMsg =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .mapData = location;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_location];\
- _onceSendNum = \cf7 10\cf4 ;\
- \}\
- \}\
- [g_server uploadFile:location.imageUrl validTime:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- \cf2 //- (void)groupSendLocation:(NSMutableArray *)msgArray\{\cf4 \
- \cf2 // NSDictionary *p = msgArray.lastObject;\cf4 \
- \cf2 // if (_isGroupSendCancel) \{\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // NSString *userId = self.userIds[self.groupMessagesIndex];\cf4 \
- \cf2 //\cf4 \
- \cf2 // NSString* msgId = [dict objectForKey:@"oUrl"];\cf4 \
- \cf2 // msgId = [[msgId lastPathComponent] stringByDeletingPathExtension];\cf4 \
- \cf2 // NSString* oFileName = [dict objectForKey:@"oFileName"];\cf4 \
- \cf2 //\cf4 \
- \cf2 // // NSString *userId = self.userIds[self.groupMessagesIndex];\cf4 \
- \cf2 // // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
- \cf2 //\cf4 \
- \cf2 // JXMessageObject* p=nil;\cf4 \
- \cf2 // int found=-1;\cf4 \
- \cf2 // for(int i=(int)[_array count]-1;i>=0;i--)\{\cf4 \
- \cf2 // p = [_array objectAtIndex:i];\cf4 \
- \cf2 // if([p.type intValue]==kWCMessageTypeLocation)\cf4 \
- \cf2 // if([[p.fileName lastPathComponent] isEqualToString:[oFileName lastPathComponent]])\{\cf4 \
- \cf2 // found = i;\cf4 \
- \cf2 // break;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // if([p.type intValue]==kWCMessageTypeFile && ![p.isUpload boolValue])\cf4 \
- \cf2 // if([[p.fileName lastPathComponent] isEqualToString:[oFileName lastPathComponent]])\{\cf4 \
- \cf2 // found = i;\cf4 \
- \cf2 // break;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // if (p.content.length > 0) \{\cf4 \
- \cf2 // if ([oFileName rangeOfString:p.content].location != NSNotFound) \{\cf4 \
- \cf2 // found = i;\cf4 \
- \cf2 // break;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // // if([p.content isEqualToString:msgId])\{\cf4 \
- \cf2 // // found = i;\cf4 \
- \cf2 // // break;\cf4 \
- \cf2 // // \}\cf4 \
- \cf2 // p = nil;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // if(found>=0)\{//
- \f1 \'d5\'d2\'b5\'bd\'cf\'fb\'cf\'a2\'cc\'e5
- \f0 \cf4 \
- \cf2 // if([[dict objectForKey:@"status"] intValue] != 1)\{\cf4 \
- \cf2 // NSLog(@"doUploadFaire");\cf4 \
- \cf2 // [p updateIsSend:transfer_status_no];\cf4 \
- \cf2 // JXBaseChatCell* cell = [self getCell:found];\cf4 \
- \cf2 // [cell drawIsSend];\cf4 \
- \cf2 // cell = nil;\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // if (self.isGroupMessages) \{\cf4 \
- \cf2 // p.isGroupSend = YES;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // NSLog(@"doSendAfterUpload");\cf4 \
- \cf2 // p.content = [dict objectForKey:@"oUrl"];\cf4 \
- \cf2 // // if (self.isGroupMessages) \{\cf4 \
- \cf2 // // p.toUserId = userId;\cf4 \
- \cf2 // // \}\cf4 \
- \cf2 // [p updateIsUpload:YES];\cf4 \
- \cf2 // [g_xmpp sendMessage:p roomName:self.roomJid];//
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \cf2 // // [self.tableView reloadData];\cf4 \
- \cf2 // \}\cf4 \
- \cf2 //\cf4 \
- \cf2 // p = nil;\cf4 \
- \cf2 // self.groupMessagesIndex ++;\cf4 \
- \cf2 // if (self.groupMessagesIndex < self.userIds.count) \{\cf4 \
- \cf2 // if (self.groupMessagesIndex % _onceSendNum == 0) \{\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}else\{\cf4 \
- \cf2 // [self collectionMsgSendAll:allArray];\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // \}else if (self.userIds)\{\cf4 \
- \cf2 // self.groupMessagesIndex = 0;\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // return;\cf4 \
- \cf2 //\}\cf4 \
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendMapMsgWithDict\cf4 :(NSDictionary *)dict \{\
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
- \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
- \
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
- msg.fromUserName = MY_USER_NAME;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- msg.toUserId = userId;\
- msg.isGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ((
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex+\cf7 1\cf4 ) % _onceSendNum == \cf7 0\cf4 ) \{\
- msg.isLastGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- \}\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.location_x = [NSNumber numberWithDouble:[
- \f2\b \cf8 self
- \f0\b0 \cf4 .mapData.latitude doubleValue]];\
- msg.location_y = [NSNumber numberWithDouble:[
- \f2\b \cf8 self
- \f0\b0 \cf4 .mapData.longitude doubleValue]];\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeLocation];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \cf2 // msg.isUpload = [NSNumber numberWithBool:NO];\cf4 \
- \cf2 // msg.content = [NSString stringWithFormat:@"%@",location.subtitle];\cf4 \
- msg.objectId = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .mapData.subtitle];\
- \
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- \cf2 //
- \f1 \'c9\'cf\'b4\'ab\'cd\'bc\'c6\'ac
- \f0 \cf4 \
- \cf2 // if (location.imageUrl) \{\cf4 \
- \cf2 // [g_server uploadFile:location.imageUrl toView:self];\cf4 \
- \cf2 // msg.fileName = location.imageUrl;\cf4 \
- \cf2 // \}else\{\cf4 \
- msg.content = [dict objectForKey:\cf6 @"oUrl"\cf4 ];\
- \cf2 // BOOL isShowGoo = [g_myself.isUseGoogleMap intValue] > 0 ? YES : NO;\cf4 \
- \cf2 // if (isShowGoo) \{\cf4 \
- \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 \
- \cf2 // \} else \{\cf4 \
- \cf2 // msg.content = [NSString stringWithFormat:@"\cf17 http://api.map.baidu.com/staticimage?width=640&height=480¢er=%@,%@&zoom=15\cf2 ",location.longitude, location.latitude];\cf4 \
- \cf2 // \}\cf4 \
- msg.fileName = msg.content;\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \cf2 // \}\cf4 \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onSelLocation:
- \f2\b \cf8 self
- \f0\b0 \cf4 .mapData];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isMapMsg =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onCard\cf4 \{\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 && ![
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowSendCard boolValue] && !_isAdmin) \{\
- [g_App showAlert:Localized(\cf6 @"JX_GroupDisableSendCard"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- JXSelectFriendsVC* vc = [JXSelectFriendsVC alloc];\
- vc.isNewRoom =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- vc.chatRoom =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- vc.room =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- vc.isShowMySelf =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- vc.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- vc.didSelect =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onAfterAddMember:);\
- vc = [vc init];\
- _strURLGoback=\cf6 @""\cf4 ;\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onAfterAddMember\cf4 :(JXSelectFriendsVC*)vc\{\
- \
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
- \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isGroupSendCancel) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex == \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:vc.set.count withType:groupsend_msgType_card];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendMsgArray = [NSMutableArray arrayWithObject:vc];\
- _onceSendNum = \cf7 20\cf4 ;\
- \}\
- \}\
- NSInteger i = \cf7 0\cf4 ;\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isLastGroupSend =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSNumber* n
- \f2\b \cf8 in
- \f0\b0 \cf4 vc.set)\{\
- i++;\
- JXUserObject *user;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (vc.seekTextField.text.length > \cf7 0\cf4 ) \{\
- user = vc.searchArray[[n intValue] % \cf7 100000\cf4 -\cf7 1\cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- user = [[vc.letterResultArr objectAtIndex:[n intValue] / \cf7 100000\cf4 -\cf7 1\cf4 ] objectAtIndex:[n intValue] % \cf7 100000\cf4 -\cf7 1\cf4 ];\
- \}\
- \
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- msg.toUserId = userId;\
- msg.isGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ((
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex + \cf7 1\cf4 ) % _onceSendNum == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (i == vc.set.count) \{\
- msg.isLastGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- isLastGroupSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- \}\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.content = user.userNickname;\
- msg.objectId = user.userId;\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeCard];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \cf2 // [msg release];\cf4 \
- user =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isLastGroupSend) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onAfterAddMember:vc];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendFile\cf4 :(NSString*)file \cf11 userId\cf4 :(NSString *)userId\
- \{\
- \cf2 // NSString *userId = self.userIds[self.groupMessagesIndex];\cf4 \
- \cf2 // NSString *userName = self.userNames[self.groupMessagesIndex];\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([file length]>\cf7 0\cf4 ) \{\
- JXMessageObject *msg=[[JXMessageObject alloc] init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- msg.toUserId = userId;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- \}\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- msg.fileName = file;\
- msg.content = file;\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeFile];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isUpload = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \
- \cf2 // if (self.isGroupMessages) \{\cf4 \
- \cf2 // self.groupMessagesIndex ++;\cf4 \
- \cf2 // if (self.groupMessagesIndex < self.userIds.count) \{\cf4 \
- \cf2 // [self sendFile:file];\cf4 \
- \cf2 // \}else if (self.userIds)\{\cf4 \
- \cf2 // self.groupMessagesIndex = 0;\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // [msg release];\cf4 \
- [g_server uploadFile:file validTime:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.chatRecordTimeOut messageId:msg.messageId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \cf2 //
- \f1 \'b7\'a2\'ba\'ec\'b0\'fc
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendRedPacket\cf4 :(NSDictionary*)redPacketDict \cf11 withGreet\cf4 :(NSString *)greet\
- \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([redPacketDict[\cf6 @"id"\cf4 ] length]>\cf7 0\cf4 ) \{\
- JXMessageObject *msg=[[JXMessageObject alloc] init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- msg.content = greet;\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeRedPacket];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \cf2 // msg.isUpload = [NSNumber numberWithBool:NO];\cf4 \
- msg.fileName = redPacketDict[\cf6 @"type"\cf4 ];\
- msg.objectId = redPacketDict[\cf6 @"id"\cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- \
- \cf2 // if (![_orderRedPacketArray containsObject:msg]) \{\cf4 \
- \cf2 // [_orderRedPacketArray addObject:msg];\cf4 \
- \cf2 // \}\cf4 \
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \cf2 // [msg release];\cf4 \
- \}\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'d3\'e0\'b6\'ee
- \f0 \cf4 \
- [g_server getUserMoenyToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onSelFile\cf4 :(NSString*)file\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
- \cf2 // for (NSInteger i = 0; i < self.userIds.count; i ++) \{\cf4 \
- \cf2 // NSString *userId = self.userIds[i];\cf4 \
- \cf2 //\cf4 \
- \cf2 // //
- \f1 \'b7\'a2\'cb\'cd\'ce\'c4\'bc\'fe\'a3\'ac
- \f0 file
- \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
- \f0 \cf4 \
- \cf2 // [self sendFile:file userId:userId];\cf4 \
- \cf2 // //
- \f1 \'c9\'cf\'b4\'ab\'ce\'c4\'bc\'fe\'b5\'bd\'b7\'fe\'ce\'f1\'c6\'f7
- \f0 \cf4 \
- \cf12 ///
- \f3 \cf2 / [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:self.curMessageId toView:self];
- \f0 \cf4 \
- \cf2 // \}\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 addWaitGroupSendViewWithMsgNum:\cf7 1\cf4 withType:groupsend_msgType_file];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray = [NSMutableArray arrayWithObject:file];\
- _onceSendNum = \cf7 5\cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendFiles:
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'ce\'c4\'bc\'fe\'a3\'ac
- \f0 file
- \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
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendFile:file userId:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'c9\'cf\'b4\'ab\'ce\'c4\'bc\'fe\'b5\'bd\'b7\'fe\'ce\'f1\'c6\'f7
- \f0 \cf4 \
- \cf2 // [g_server uploadFile:file validTime:self.chatPerson.chatRecordTimeOut messageId:self.curMessageId toView:self];\cf4 \
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendFiles\cf4 :(NSArray *)filesArray\{\
- NSString *userId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds[
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex];\
- NSString *file = filesArray.lastObject;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendFile:file userId:userId];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex <
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex % _onceSendNum == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendFiles:filesArray];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds)\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendGift\cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- JXSendRedPacketViewController * sendGiftVC = [[JXSendRedPacketViewController alloc] init];\
- sendGiftVC.isRoom =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- sendGiftVC.toUserId = chatPerson.userId;\
- sendGiftVC.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- _strURLGoback=\cf6 @""\cf4 ;\
- \cf2 // [g_window addSubview:sendGiftVC.view];\cf4 \
- [g_navigation pushViewController:sendGiftVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onTransfer\cf4 \{\
- JXTransferViewController *transferVC = [JXTransferViewController alloc];\
- transferVC.user = chatPerson;\
- transferVC.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- _strURLGoback=\cf6 @""\cf4 ;\
- transferVC = [transferVC init];\
- [g_navigation pushViewController:transferVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendGiftToRoom\cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.curCount == \cf7 1\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSendRedPacket =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [g_server roomGetRoom:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'c8\'ba\'b3\'c9\'d4\'b1\'c1\'d0\'b1\'ed
- \f0 \cf4 \
- NSArray * memberArray = [memberData fetchAllMembers:_room.roomId];\
- \
- JXSendRedPacketViewController * sendGiftVC = [[JXSendRedPacketViewController alloc] init];\
- sendGiftVC.isRoom =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- sendGiftVC.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- sendGiftVC.roomJid =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- sendGiftVC.size = memberArray.count;\
- \cf2 // [g_window addSubview:sendGiftVC.view];\cf4 \
- [g_navigation pushViewController:sendGiftVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 -
- \f4 \'d7\'aa\'d5\'cb
- \f2 delegate
- \f0\b0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 transferToUser\cf4 :(NSDictionary *)dict \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([dict[\cf6 @"id"\cf4 ] length]>\cf7 0\cf4 ) \{\
- JXMessageObject *msg=[[JXMessageObject alloc] init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
- msg.toUserId = chatPerson.userId;\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \
- msg.content = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,dict[\cf6 @"money"\cf4 ]];\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeTransfer];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \cf2 // msg.isUpload = [NSNumber numberWithBool:NO];\cf4 \
- msg.fileName = dict[\cf6 @"remark"\cf4 ];\
- msg.objectId = dict[\cf6 @"id"\cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- [msg insert:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'d3\'e0\'b6\'ee
- \f0 \cf4 \
- [g_server getUserMoenyToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendRedPacketDelegate\cf4 :(NSDictionary *)redpacketDict\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([redpacketDict[\cf6 @"id"\cf4 ] length]>\cf7 0\cf4 ) \{\
- JXMessageObject *msg=[[JXMessageObject alloc] init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = chatPerson.userId;\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- msg.content = redpacketDict[\cf6 @"greet"\cf4 ];\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeRedPacket];\
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.fileName = redpacketDict[\cf6 @"type"\cf4 ];\
- msg.objectId = redpacketDict[\cf6 @"id"\cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \
- [msg insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- \
- \cf2 // if (![_orderRedPacketArray containsObject:msg]) \{\cf4 \
- \cf2 // [_orderRedPacketArray addObject:msg];\cf4 \
- \cf2 // \}\cf4 \
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \cf2 // [msg release];\cf4 \
- \}\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'d3\'e0\'b6\'ee
- \f0 \cf4 \
- [g_server getUserMoenyToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onFile\cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 ) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!_isAdmin && ![
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowUploadFile boolValue]) \{\
- [g_App showAlert:Localized(\cf6 @"JX_NotUploadSharedFiles"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \}\
- JXMyFile* vc = [[JXMyFile alloc]init];\
- vc.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- vc.didSelect =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onSelFile:);\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onDidCard\cf4 :(JXMessageObject*)msg\{\
- \cf2 // [g_server getUser:msg.objectId toView:self];\cf4 \
- \
- JXUserInfoVC* vc = [JXUserInfoVC alloc];\
- vc.userId = msg.objectId;\
- vc.isJustShow =
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ;\
- vc = [vc init];\
- _strURLGoback=\cf6 @""\cf4 ;\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatCellHeadIMG\cf4 :(JXMessageObject *)msgCell \cf11 audioPlayChangeIndexNum\cf4 :(NSInteger)indexNum\{\
- \
- \cf2 //\}\cf4 \
- \cf2 //\cf4 \
- \cf2 //#pragma mark------cell
- \f1 \'cd\'b7\'cf\'f1\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- \cf2 //-(void)onDidHeadImage:(NSNotification*)notification\{\cf4 \
- \
- _strURLGoback=\cf6 @""\cf4 ;\
- _intAAA++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([chatPerson.userId rangeOfString:MY_USER_ID].location != NSNotFound) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- JXMessageObject *msg = msgCell;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.fromUserId isEqualToString:CALL_CENTER_USERID])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid) \{\
- \cf2 //
- \f1 \'bf\'b4\'cf\'ea\'c7\'e9
- \f0 \cf4 \
- \cf2 // [g_server getUser:msg.fromUserId toView:self];\cf4 \
- \cf2 //JXUserDetialVc JXUserInfoVC\cf4 \
- \cf2 // JXUserDetialVc* vc = [JXUserDetialVc alloc];\cf4 \
- JXUserInfoVC* vc = [JXUserInfoVC alloc];\
- vc.userId = msg.fromUserId;\
- vc.isJustShow =
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ;\
- vc.chatViewCellHedIMG=\cf6 @"1"\cf4 ;\
- vc.fromAddType = \cf7 3\cf4 ;\
- vc.chatVC =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- vc = [vc init];\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_isAdmin || [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.allowSendCard boolValue]) \{\
- \
- NSString *s;\
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupStatus intValue]) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 0\cf4 :\
- s =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 1\cf4 :\
- s = Localized(\cf6 @"JX_OutOfTheGroup1"\cf4 );\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 2\cf4 :\
- s = Localized(\cf6 @"JX_DissolutionGroup1"\cf4 );\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (s.length > \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- [g_server showMsg:s];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 //
- \f1 \'bb\'f9\'b1\'be\'c0\'e0
- \f0 JXMyBaseInFovc JXUserInfoVC JXSelfUserInfoVC\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([g_server.myself.userId isEqualToString:msg.fromUserId]) \{\
- \
- \
- \cf2 //
- \f1 \'d7\'d4\'bc\'ba\'b5\'c4\'cd\'b7\'cf\'f1
- \f0 \cf4 \
- JXSelfUserInfoVC* vc = [JXSelfUserInfoVC alloc];\
- \
- vc.userId = msg.fromUserId;\
- \
- vc.isJustShow =
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ;\
- vc.fromAddType = \cf7 3\cf4 ;\
- vc.chatVC =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- vc = [vc init];\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- \cf2 //
- \f1 \'d7\'d4\'bc\'ba\'b5\'e3
- \f0 -
- \f1 \'bb\'f7\'c8\'ba\'d6\'f7\'bb\'f2\'d5\'df\'b9\'dc\'c0\'ed\'d4\'b1
- \f0
- \f1 \'bb\'f2\'d5\'df\'b1\'f0\'c8\'cb
- \f0 \cf4 \
- memberData *data = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:g_myself.userId];\
- JXUserInfoVC* vc = [JXUserInfoVC alloc];\
- \
- vc.userId = msg.fromUserId;\
- vc.data=data;\
- vc.indexAAA=_intAAA;\
- vc.tempChat=\cf7 11\cf4 ;\
- vc.isJustShow =
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ;\
- vc.fromAddType = \cf7 3\cf4 ;\
- vc.chatVC =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- vc = [vc init];\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [g_App showAlert:Localized(\cf6 @"JX_GroupNotTalk"\cf4 )];\
- \}\
- \}\
- \
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 longGesHeadImageNotification\cf4 :(NSNotification *)notification\{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!_messageText.userInteractionEnabled) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- JXMessageObject *msg = notification.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid) \{\
- \cf2 //@
- \f1 \'c8\'ba\'b3\'c9\'d4\'b1
- \f0 \cf4 \
- \cf2 // [self performSelector:@selector(showAtSelectMemberView) withObject:nil afterDelay:0.35];\cf4 \
- \cf2 // [self showAtSelectMemberView];\cf4 \
- memberData * mem = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:msg.fromUserId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (mem) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 atSelectMemberDelegate:mem];\
- \}\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'d6\'d8\'d0\'c2\'b7\'a2\'cb\'cd\'d7\'aa\'d5\'cb\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onResend\cf4 :(JXMessageObject *)msg \{\
- JXMessageObject *msg1 = [[JXMessageObject alloc]init];\
- msg1 = [msg copy];\
- msg1.messageId =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- msg1.timeSend = [NSDate date];\
- msg1.fromId =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- msg1.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- msg1.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg1.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg1.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- [msg1 insert:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- [g_xmpp sendMessage:msg1 roomName:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg1];\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 ------
- \f4 \'d7\'aa\'d5\'cb\'b5\'e3\'bb\'f7
- \f0\b0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onDidTransfer\cf4 :(NSNotification*)notification \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- JXMessageObject *msg = notification.object;\
- JXTransferDeatilVC *detailVC = [JXTransferDeatilVC alloc];\
- detailVC.msg = msg;\
- detailVC.onResend =
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onResend:);\
- detailVC.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- detailVC = [detailVC init];\
- [g_navigation pushViewController:detailVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 ------
- \f4 \'ba\'ec\'b0\'fc\'b5\'e3\'bb\'f7
- \f0\b0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onDidRedPacket\cf4 :(NSNotification*)notification\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid) \{\
- NSString *s;\
- \cf2 //
- \f1 \'d1\'e9\'d6\'a4\'c8\'ba\'d7\'e9\'ca\'c7\'b7\'f1\'d3\'d0\'d0\'a7
- \f0 \cf4 \
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupStatus intValue]) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 0\cf4 :\
- s =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 1\cf4 :\
- s = Localized(\cf6 @"JX_OutOfTheGroup1"\cf4 );\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 2\cf4 :\
- s = Localized(\cf6 @"JX_DissolutionGroup1"\cf4 );\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (s.length > \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- [g_server showMsg:s];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \}\
- \
- memberData *data = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:g_myself.userId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([data.role integerValue] == \cf7 4\cf4 ) \{\
- [JXMyTools showTipView:\cf6 @"
- \f1 \'d2\'fe\'c9\'ed\'c8\'cb\'b2\'bb\'c4\'dc\'c1\'ec\'c8\'a1\'ba\'ec\'b0\'fc
- \f0 "\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- JXMessageObject *msg = notification.object;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (([msg.fileName isEqualToString:\cf6 @"3"\cf4 ] && [msg.fileSize intValue] != \cf7 2\cf4 )) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomId.length > \cf7 0\cf4 ) \{\
- \
- _messageText.text = msg.content;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![msg.fromUserId isEqualToString:MY_USER_ID]) \{\
- \
- _messageText.text = msg.content;\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}\
- [_wait start];\
- [g_server getRedPacket:msg.objectId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- \cf2 // if (([msg.fileName isEqualToString:@"3"] && [msg.fileSize intValue] != 2) && ![msg.fromUserId isEqualToString:MY_USER_ID]) \{\cf4 \
- \cf2 // _messageText.text = msg.content;\cf4 \
- \cf2 // return;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // [_wait start];\cf4 \
- \cf2 // [g_server getRedPacket:msg.objectId toView:self];\cf4 \
- \cf12 ///
- \f3 \cf2 / [g_server openRedPacket:msg.objectId toView:self];
- \f0 \cf4 \
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 shakeToShow\cf4 :(UIView*)aView\{\
- CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:\cf6 @"transform"\cf4 ];\
- animation.duration = \cf7 0.5\cf4 ;\
- \
- NSMutableArray *values = [NSMutableArray array];\
- [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(\cf7 0.1\cf4 , \cf7 0.1\cf4 , \cf7 1.0\cf4 )]];\
- [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(\cf7 1.2\cf4 , \cf7 1.2\cf4 , \cf7 1.0\cf4 )]];\
- [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(\cf7 0.9\cf4 , \cf7 0.9\cf4 , \cf7 1.0\cf4 )]];\
- [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(\cf7 1.0\cf4 , \cf7 1.0\cf4 , \cf7 1.0\cf4 )]];\
- animation.values = values;\
- [aView.layer addAnimation:animation forKey:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showRedPacket\cf4 :(NSDictionary *)dict \{\
- [_wait stop];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- NSString *userName = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,[(NSDictionary *)[dict objectForKey:\cf6 @"packet"\cf4 ] objectForKey:\cf6 @"userName"\cf4 ]];\
- NSString *greetings = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,[(NSDictionary *)[dict objectForKey:\cf6 @"packet"\cf4 ] objectForKey:\cf6 @"greetings"\cf4 ]];\
- NSString *userId = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,[(NSDictionary *)[dict objectForKey:\cf6 @"packet"\cf4 ] objectForKey:\cf6 @"userId"\cf4 ]];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .redPacketDict = dict;\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBaseView removeFromSuperview];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBaseView = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBaseView.userInteractionEnabled=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBaseView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:\cf7 .5f\cf4 ];\
- [[UIApplication sharedApplication].keyWindow addSubview:
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBaseView];\
- \
- UIImage *redImage = [UIImage imageNamed:\cf6 @"red_packet_bg"\cf4 ];\
- \
- CGFloat h = JX_SCREEN_HEIGHT/\cf7 2\cf4 +\cf7 30\cf4 ; - JX_SCREEN_TOP - JX_SCREEN_BOTTOM - \cf7 30\cf4 -\cf7 50\cf4 -\cf7 60\cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV = [[UIImageView alloc] initWithFrame:CGRectMake(\cf7 40\cf4 , \cf7 60\cf4 +JX_SCREEN_TOP, JX_SCREEN_WIDTH-\cf7 80\cf4 , h)];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV.userInteractionEnabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV.image = redImage;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBaseView addSubview:
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV];\
- \cf2 //
- \f1 \'cc\'ed\'bc\'d3\'b8\'f6\'b6\'af\'bb\'ad
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 shakeToShow:
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV];\
- \
- CGSize size = [[NSString stringWithFormat:\cf6 @"%@%@"\cf4 ,userName,Localized(\cf6 @"JX_FromRedPacket"\cf4 )] sizeWithAttributes:\cf7 @\{\cf4 NSFontAttributeName:SYSFONT(\cf7 18\cf4 )\cf7 \}\cf4 ];\
- 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 )];\
- icon.layer.masksToBounds =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- icon.layer.cornerRadius = icon.frame.size.width/\cf7 2\cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV addSubview:icon];\
- [g_server getHeadImageSmall:userId userName:userName imageView:icon];\
- \
- \
- 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)];\
- name.font = SYSFONT(\cf7 18\cf4 );\
- name.text = [NSString stringWithFormat:\cf6 @"%@%@"\cf4 ,userName,Localized(\cf6 @"JX_FromRedPacket"\cf4 )];\
- name.textColor = HEXCOLOR(\cf7 0xFEDCA2\cf4 );\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV addSubview:name];\
- \
- UILabel *tint = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 20\cf4 , CGRectGetMaxY(icon.frame)+\cf7 20\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV.frame.size.width-\cf7 40\cf4 , \cf7 28\cf4 )];\
- tint.text = greetings;\
- tint.font = SYSFONT(\cf7 25\cf4 );\
- tint.textAlignment = NSTextAlignmentCenter;\
- tint.textColor = HEXCOLOR(\cf7 0xFEDCA2\cf4 );\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV addSubview:tint];\
- _tintLab = tint;\
- \
- CGFloat b = (h / JX_SCREEN_HEIGHT) * (h-\cf7 88\cf4 );\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .openImgV = [[UIImageView alloc] initWithFrame:CGRectMake((JX_SCREEN_WIDTH-\cf7 80\cf4 -\cf7 100\cf4 )/\cf7 2\cf4 , b+\cf7 50\cf4 , \cf7 100\cf4 , \cf7 100\cf4 )];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .openImgV.userInteractionEnabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .openImgV.image = [UIImage imageNamed:\cf6 @"icon_open_red_packet1"\cf4 ];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV addSubview:
- \f2\b \cf8 self
- \f0\b0 \cf4 .openImgV];\
- UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (openReadPacket)];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .openImgV addGestureRecognizer:tap];\
- \
- UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake((
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV.frame.size.width-\cf7 140\cf4 )/\cf7 2\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV.frame.size.height-\cf7 18\cf4 -\cf7 40\cf4 , \cf7 140\cf4 , \cf7 18\cf4 )];\
- label.textAlignment = NSTextAlignmentCenter;\
- label.userInteractionEnabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- label.textColor = HEXCOLOR(\cf7 0xFEDCA2\cf4 );\
- label.font = SYSFONT(\cf7 15\cf4 );\
- label.text = Localized(\cf6 @"JX_CheckTheClaimDetails>"\cf4 );\
- label.hidden = [userId intValue] != [MY_USER_ID intValue];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV addSubview:label];\
- _seeLab = label;\
- \
- UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (CheckTheDetails)];\
- [label addGestureRecognizer:tap1];\
- \
- UIView *canView = [[UIView alloc] initWithFrame:CGRectMake((JX_SCREEN_WIDTH-\cf7 40\cf4 )/\cf7 2\cf4 , (JX_SCREEN_HEIGHT-CGRectGetMaxY(
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV.frame)-\cf7 40\cf4 )/\cf7 2\cf4 +CGRectGetMaxY(
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBackV.frame)-\cf7 10\cf4 , \cf7 40\cf4 , \cf7 40\cf4 )];\
- canView.backgroundColor = [UIColor clearColor];\
- canView.userInteractionEnabled=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- canView.layer.masksToBounds =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- canView.layer.cornerRadius = canView.frame.size.width/\cf7 2\cf4 ;\
- canView.layer.borderWidth = \cf7 2.f\cf4 ;\
- canView.layer.borderColor = HEXCOLOR(\cf7 0xE8C66A\cf4 ).CGColor;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBaseView addSubview:canView];\
- UITapGestureRecognizer *tapC = [[UITapGestureRecognizer alloc] initWithTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (cancelOpenRedPacket)];\
- [canView addGestureRecognizer:tapC];\
- \
- UIImageView *cancelImgV = [[UIImageView alloc] initWithFrame:CGRectMake(\cf7 10\cf4 , \cf7 10\cf4 , \cf7 20\cf4 , \cf7 20\cf4 )];\
- cancelImgV.image = [UIImage imageNamed:\cf6 @"icon_red_packet_close"\cf4 ];\
- cancelImgV.userInteractionEnabled =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [canView addSubview:cancelImgV];\
- \
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 CheckTheDetails\cf4 \{\
- [_redBaseView removeFromSuperview];\
- \
- JXredPacketDetailVC * redPacketDetailVC = [[JXredPacketDetailVC alloc]init];\
- redPacketDetailVC.dataDict = [[NSDictionary alloc]initWithDictionary:
- \f2\b \cf8 self
- \f0\b0 \cf4 .redPacketDict];\
- redPacketDetailVC.isGroup =
- \f2\b \cf8 self
- \f0\b0 \cf4 .room.roomId.length > \cf7 0\cf4 ;\
- [g_navigation pushViewController:redPacketDetailVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 cancelOpenRedPacket\cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBaseView removeFromSuperview];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .redBaseView removeFromSuperview];\
- \}\
- \
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 openReadPacket\cf4 \{\
- NSMutableArray *imagesArray = [NSMutableArray array];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i = \cf7 1\cf4 ; i < \cf7 12\cf4 ; i++) \{\
- NSString *imageName = [NSString stringWithFormat:\cf6 @"icon_open_red_packet%d"\cf4 , i];\
- UIImage *image = [UIImage imageNamed:imageName];\
- [imagesArray addObject:image];\
- \}\
- _openImgV.animationImages = imagesArray;\
- _openImgV.animationDuration = \cf7 0.7f\cf4 ;\
- _openImgV.animationRepeatCount = \cf7 0\cf4 ;\
- [_openImgV startAnimating];\
- \
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 .6f\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
- [_openImgV stopAnimating];\
- \cf2 // [self cancelOpenRedPacket];\cf4 \
- [g_server openRedPacket:
- \f2\b \cf8 self
- \f0\b0 \cf4 .redPacketDict[\cf6 @"packet"\cf4 ][\cf6 @"id"\cf4 ] toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \});\
- \}\
- \
- \cf5 #pragma mark
- \f2\b \cf16 -------
- \f4 \'d5\'d5\'c6\'ac\'b2\'e9\'bf\'b4
- \f0\b0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onDidImage\cf4 :(NSNotification*)notification\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .indexNum = [notification.object intValue];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- JXMessageObject *msg = [_array objectAtIndex:[notification.object intValue]];\
- \cf2 //
- \f1 \'cd\'bc\'c6\'ac\'c2\'b7\'be\'b6\'ca\'fd\'d7\'e9
- \f0 \cf4 \
- NSMutableArray *imagePathArr = [[NSMutableArray alloc]init];\
- NSMutableArray *msgArray = [NSMutableArray array];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.isReadDel boolValue] || [msg.content rangeOfString:\cf6 @".gif"\cf4 ].location != NSNotFound) \{\cf2 //
- \f1 \'ca\'c7\'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9
- \f0 gif
- \f1 \'cd\'bc\'c6\'ac
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.content) \{\
- [msgArray addObject:msg];\
- [imagePathArr addObject:msg.content];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'cb\'f9\'d3\'d0\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
- \f0 \cf4 \
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- s = chatPerson.userId;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.isMySend) \{\
- _allChatImageArr = [msg fetchImageMessageListWithUser:s];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- _allChatImageArr = [msg fetchImageMessageListWithUser:s];\
- \}\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i = \cf7 0\cf4 ; i < [_allChatImageArr count]; i++) \{\
- JXMessageObject * msgP = [_allChatImageArr objectAtIndex:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![msgP.isReadDel boolValue] && [msgP.content rangeOfString:\cf6 @".gif"\cf4 ].location == NSNotFound) \{\cf2 //
- \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
- \f0
- \f1 \'bb\'f2
- \f0 gif
- \f1 \'cd\'bc\'c6\'ac
- \f0
- \f1 \'b5\'c4\'cc\'de\'b3\'fd\'b5\'f4
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msgP.content) \{\
- [msgArray addObject:msgP];\
- NSString* url;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msgP.isMySend && isFileExist(msgP.fileName))\
- url = msgP.fileName;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- url = msgP.content;\
- [imagePathArr addObject:url];\
- \}\
- \}\
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.content) \{\
- [msgArray addObject:msg];\
- NSString* url;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.isMySend && isFileExist(msg.fileName))\
- url = msg.fileName;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- url = msg.content;\
- [imagePathArr addObject:url];\
- \}\
- \}\
- NSMutableArray *array = [NSMutableArray array];\
- NSMutableArray *arrayURL = [NSMutableArray array];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.content ==
- \f2\b \cf8 nil
- \f0\b0 \cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- [arrayURL addObject:msg.content];\
- [array addObject:msg];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (array.count < \cf7 1\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 // [ImageBrowserViewController show:self delegate:self type:PhotoBroswerVCTypeModal contentArray:array index:0 imagesBlock:^NSArray *\{\cf4 \
- \cf2 // return arrayURL;\cf4 \
- \cf2 // \}];\cf4 \
- [ImageBrowserViewController show:
- \f2\b \cf8 self
- \f0\b0 \cf4 delegate:
- \f2\b \cf8 self
- \f0\b0 \cf4 isReadDel:
- \f2\b \cf8 YES
- \f0\b0 \cf4 type:PhotoBroswerVCTypeModal contentArray:array index:\cf7 0\cf4 imagesBlock:^NSArray *\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 arrayURL;\
- \}];\
- \cf2 //
- \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
- \f0 \cf4 \
- \cf2 // for (int i = 0; i < [msgArray count]; i++) \{\cf4 \
- \cf2 // JXMessageObject * msgObj = [msgArray objectAtIndex:i];\cf4 \
- \cf2 // if ([msg.messageId isEqualToString:msgObj.messageId]) \{\cf4 \
- \cf2 //\cf4 \
- \cf2 // [ImageBrowserViewController show:self delegate:self isReadDel:[msgObj.isReadDel boolValue] type:PhotoBroswerVCTypeModal contentArray:msgArray index:i imagesBlock:^NSArray *\{\cf4 \
- \cf2 // return imagePathArr;\cf4 \
- \cf2 // \}];\cf4 \
- \cf2 //\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // \}\cf4 \
- imagePathArr =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 imageBrowserVCQRCodeAction\cf4 :(NSString *)stringValue \{\
- \
- NSRange range = [stringValue rangeOfString:\cf6 @"shikuId"\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (range.location != NSNotFound) \{\
- \
- NSString * idStr = [stringValue substringFromIndex:range.location + range.length + \cf7 1\cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([stringValue rangeOfString:\cf6 @"=user"\cf4 ].location != NSNotFound) \{\
- \cf2 // [g_server getUser:idStr toView:self];\cf4 \
- [g_server userGetByAccountWithAccount:idStr toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([stringValue rangeOfString:\cf6 @"=group"\cf4 ].location != NSNotFound) \{\
- \
- [g_server getRoom:idStr toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \cf2 // JXRoomMemberVC* vc = [JXRoomMemberVC alloc];\cf4 \
- \cf2 // vc.roomId = idStr;\cf4 \
- \cf2 // vc = [vc init];\cf4 \
- \cf2 // [g_navigation pushViewController:vc animated:YES];\cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([stringValue rangeOfString:\cf6 @"=open"\cf4 ].location != NSNotFound) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([idStr rangeOfString:\cf6 @"http://"\cf4 ].location != NSNotFound && [idStr rangeOfString:\cf6 @"https://"\cf4 ].location != NSNotFound) \{\
- webpageVC * webVC = [webpageVC alloc];\
- webVC.url= idStr;\
- webVC.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC = [webVC init];\
- [g_navigation.navigationView addSubview:webVC.view];\
- \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [g_App showAlert:Localized(\cf6 @"JX_TheUrlNotOpen"\cf4 )];\
- \}\
- \}\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- NSRange idRange = [stringValue rangeOfString:\cf6 @"userId"\cf4 ];\
- NSRange nameRange = [stringValue rangeOfString:\cf6 @"userName"\cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([stringValue hasPrefix:\cf6 @"http://"\cf4 ] || [stringValue hasPrefix:\cf6 @"https://"\cf4 ]) \{\
- webpageVC * webVC = [webpageVC alloc];\
- webVC.url= stringValue;\
- webVC.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC = [webVC init];\
- [g_navigation.navigationView addSubview:webVC.view];\
- \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (stringValue.length == \cf7 20\cf4 && [
- \f2\b \cf8 self
- \f0\b0 \cf4 isNumber:stringValue])\{\
- \cf2 //
- \f1 \'b6\'d4\'c3\'e6\'b8\'b6\'bf\'ee\'a3\'ac
- \f0
- \f1 \'bc\'ba\'b7\'bd\'ca\'d5\'bf\'ee
- \f0 \cf4 \
- JXInputMoneyVC *inputVC = [[JXInputMoneyVC alloc] init];\
- inputVC.type = JXInputMoneyTypeCollection;\
- inputVC.paymentCode = stringValue;\
- [g_navigation pushViewController:inputVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (idRange.location != NSNotFound && nameRange.location != NSNotFound) \{\
- \cf2 //
- \f1 \'bc\'ba\'b7\'bd\'b8\'b6\'bf\'ee\'a3\'ac
- \f0
- \f1 \'b6\'d4\'c3\'e6\'ca\'d5\'bf\'ee
- \f0 \cf4 \
- SBJsonParser * resultParser = [[SBJsonParser alloc] init] ;\
- NSDictionary *dict = [resultParser objectWithString:stringValue];\
- JXInputMoneyVC *inputVC = [[JXInputMoneyVC alloc] init];\
- inputVC.type = JXInputMoneyTypePayment;\
- inputVC.userId = [dict objectForKey:\cf6 @"userId"\cf4 ];\
- inputVC.userName = [dict objectForKey:\cf6 @"userName"\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([dict objectForKey:\cf6 @"money"\cf4 ]) \{\
- inputVC.money = [dict objectForKey:\cf6 @"money"\cf4 ];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([dict objectForKey:\cf6 @"description"\cf4 ]) \{\
- inputVC.desStr = [dict objectForKey:\cf6 @"description"\cf4 ];\
- \}\
- [g_navigation pushViewController:inputVC animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 isNumber\cf4 :(NSString *)strValue\
- \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (strValue ==
- \f2\b \cf8 nil
- \f0\b0 \cf4 || [strValue length] <= \cf7 0\cf4 )\
- \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- NSCharacterSet *cs = [[NSCharacterSet characterSetWithCharactersInString:\cf6 @"0123456789"\cf4 ] invertedSet];\
- NSString *filtered = [[strValue componentsSeparatedByCharactersInSet:cs] componentsJoinedByString:\cf6 @""\cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![strValue isEqualToString:filtered])\
- \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 dismissImageBrowserVC\cf4 \{\
- JXImageCell *cell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:
- \f2\b \cf8 self
- \f0\b0 \cf4 .indexNum inSection:\cf7 0\cf4 ]];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell.msg.isMySend) \{\
- [cell deleteReadMsg];\
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 readTypeMsgCome\cf4 :(NSNotification*)notification\{\cf2 //
- \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
- \f0 \cf4 \
- \
- \cf2 //
- \f1 \'b8\'fc\'d0\'c2
- \f0 title
- \f1 \'d4\'da\'cf\'df\'d7\'b4\'cc\'ac
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid && !
- \f2\b \cf8 self
- \f0\b0 \cf4 .onlinestate) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .onlinestate =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = Localized(\cf6 @"JX_GroupHair"\cf4 );\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([chatPerson.userId intValue]<\cf7 10100\cf4 && [chatPerson.userId intValue]>=\cf7 10000\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = chatPerson.userNickname;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 // NSString *str = self.onlinestate ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
- \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.remarkName.length > 0 ? chatPerson.remarkName : chatPerson.userNickname,str];\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setChatTitle:chatPerson.remarkName.length > \cf7 0\cf4 ? chatPerson.remarkName : chatPerson.userNickname];\
- \
- \}\
- \}\
- \
- \}\
- \}\
- \
- JXMessageObject * msg = (JXMessageObject *)notification.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg ==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
- NSString * msgId = msg.content;\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i = \cf7 0\cf4 ; i < [_array count]; i ++) \{\
- JXMessageObject * p = [_array objectAtIndex:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.messageId isEqualToString:msgId]) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (p.isMySend)\{\
- p.isRead = [NSNumber numberWithInt:\cf7 1\cf4 ];\
- p.isSend = [NSNumber numberWithInt:\cf7 1\cf4 ];\
- \}\
- p.readPersons = [NSNumber numberWithInt:[p.readPersons intValue] + \cf7 1\cf4 ];\
- JXBaseChatCell* cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 getCell:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (cell)\{\
- [cell drawIsSend];\
- \cf2 // [cell drawIsRead];\cf4 \
- \}\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.isReadDel boolValue]) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!cell) \{\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 readDeleWithUser:p];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 ([p.type intValue]) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeImage:\{\
- JXImageCell *imageCell = (JXImageCell *)cell;\
- imageCell.isRemove =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [imageCell timeGo:p];\
- \cf2 // [g_notify postNotificationName:kImageDidTouchEndNotification object:p];\cf4 \
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeCustomFace:\
- \{\
- JXFaceCustomCell *imageCell = (JXFaceCustomCell *)cell;\
- imageCell.isRemove =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [imageCell timeGo:p];\
- \cf2 // [g_notify postNotificationName:kImageDidTouchEndNotification object:p];\cf4 \
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeEmoji:\
- \{\
- JXEmojiCell *imageCell = (JXEmojiCell *)cell;\
- imageCell.isRemove =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [imageCell timeGo:p];\
- \cf2 // [g_notify postNotificationName:kImageDidTouchEndNotification object:p];\cf4 \
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVoice:\{\
- JXAudioCell *audioCell = (JXAudioCell *)cell;\
- [audioCell timeGo:p.fileName];\
- \}\
- \
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideo:\{\
- JXVideoCell *videoCell = (JXVideoCell *)cell;\
- [videoCell timeGo:p.fileName];\
- \}\
- \
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeText:\{\
- JXMessageCell *messageCell = (JXMessageCell *)cell;\
- [messageCell deleteMsg:messageCell.msg];\
- \cf2 // [self readDeleWithUser:messageCell.msg];\cf4 \
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeReply:\{\
- JXReplyCell *replyCell = (JXReplyCell *)cell;\
- [replyCell deleteMsg:replyCell.msg];\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}\
- \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 readTypeMsgReceipt\cf4 :(NSNotification*)notification\{\cf2 //
- \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
- \f0 \cf4 \
- JXMessageObject * msg = (JXMessageObject *)notification.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg ==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i = \cf7 0\cf4 ; i < [_array count]; i ++) \{\
- JXMessageObject * p = [_array objectAtIndex:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.messageId isEqualToString:msg.content])\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.isMySend)\{\
- p.isRead = [NSNumber numberWithInt:\cf7 1\cf4 ];\
- p.isSend = [NSNumber numberWithInt:\cf7 1\cf4 ];\
- \}\
- p.readPersons = [NSNumber numberWithInt:[p.readPersons intValue] + \cf7 1\cf4 ];\
- JXBaseChatCell* cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 getCell:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (cell)\{\
- [cell drawIsSend];\
- [cell drawIsRead];\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'bb\'f1\'c8\'a1\'bf\'da\'c1\'ee\'ba\'ec\'b0\'fc\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
- \f0 \cf4 \
- -(NSMutableArray*)\cf11 fetchRedPacketListWithType\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )rpType\
- \{\
- NSString* myUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([myUserId length]<=\cf7 0\cf4 )\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- FMDatabase* db = [[JXXMPP sharedInstance] openUserDb:myUserId];\
- \
- NSMutableArray *messageList=[[NSMutableArray alloc]init];\
- NSString *s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- s = chatPerson.userId;\
- \
- NSString *queryString=[NSString stringWithFormat:\cf6 @"select * from msg_%@ where type=28 and fileName=3"\cf4 ,s];\
- \
- FMResultSet *rs=[db executeQuery:queryString];\
-
- \f2\b \cf8 while
- \f0\b0 \cf4 ([rs next]) \{\
- JXMessageObject *p=[[JXMessageObject alloc]init];\
- [p fromRs:rs];\
- [messageList addObject:p];\
- \cf2 // [p release];\cf4 \
- \}\
- [rs close];\
- db =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([messageList count]==\cf7 0\cf4 )\{\
- \cf2 // [messageList release];\cf4 \
- messageList =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 messageList;\
- \}\
- \
- \cf2 //
- \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
- \f0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 changeMessageRedPacketStatus\cf4 :(NSString*)redPacketId\{\
- NSString* myUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([myUserId length]<=\cf7 0\cf4 )\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- FMDatabase* db = [[JXXMPP sharedInstance] openUserDb:myUserId];\
- \
- NSString * sufStr =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid ?
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid :
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userId;\
- \
- NSString * sql = [NSString stringWithFormat:\cf6 @"update msg_%@ set fileSize=2 where objectId=?"\cf4 ,sufStr];\
- \
- [db executeUpdate:sql,redPacketId];\
- \
- db =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \cf2 //
- \f1 \'b8\'c4\'b1\'e4\'ba\'ec\'b0\'fc\'cf\'fb\'cf\'a2\'b2\'bb\'bf\'c9\'bb\'f1\'c8\'a1
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 changeMessageArrFileSize\cf4 :(NSString *)redPackerId\{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = _array.count - \cf7 1\cf4 ; i >= \cf7 0\cf4 ; i --) \{\
- JXMessageObject *msg = _array[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.objectId isEqualToString:redPackerId]) \{\
- msg.fileSize = [NSNumber numberWithInt:\cf7 2\cf4 ];\
- JXBaseChatCell *cell = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:\cf7 0\cf4 ]];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (cell) \{\
- \cf2 // [self.tableView reloadRow:(int)i section:0]; //
- \f1 \'d0\'de\'b8\'c4\'c1\'cb\'d7\'a2\'ca\'cd\'c1\'cb
- \f0 \cf4 \
- \}\
- \}\
- \}\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (JXMessageObject * msg
- \f2\b \cf8 in
- \f0\b0 \cf4 _orderRedPacketArray) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.objectId isEqualToString:redPackerId]) \{\
- msg.fileSize = [NSNumber numberWithInt:\cf7 2\cf4 ];\
- \}\
- \}\
- \}\
- \cf2 //
- \f1 \'b8\'fc\'d0\'c2\'d7\'aa\'d5\'cb\'d2\'d1\'c1\'ec\'c8\'a1\'d7\'b4\'cc\'ac
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 updateTransferMsgFileSize\cf4 :(NSNotification *)noti \{\
- NSString *str = [NSString stringWithFormat:\cf6 @"%@"\cf4 ,noti.object];\
- \
- JXMessageObject *msg = [[JXMessageObject alloc] init];\
- msg.objectId = str;\
- msg.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userId;\
- NSMutableArray *msgs = [msg getMsgWithObjectId:str];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i = \cf7 0\cf4 ; i < msgs.count; i++) \{\
- JXMessageObject *msg1 = msgs[i];\
- msg1.fileSize = [NSNumber numberWithInt:\cf7 2\cf4 ];\
- [msg1 updateFileSize];\
- \}\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 changeMessageArrFileSize:str];\
- \}\
- \
- -(JXBaseChatCell*)\cf11 getCell\cf4 :(
- \f2\b \cf8 long
- \f0\b0 \cf4 )index\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (index<\cf7 0\cf4 && index >= [_array count])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index inSection:\cf7 0\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 (JXBaseChatCell*)[_table cellForRowAtIndexPath:indexPath];\
- \}\
- \cf5 #pragma mark
- \f2\b \cf16 ------
- \f4 \'d7\'d4\'b6\'af\'cf\'f2\'cf\'c2\'b2\'a5\'b7\'c5\'d3\'ef\'d2\'f4
- \f0\b0 \cf4 \
- -(
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 audioPlayEnd\cf4 :(NSNotification*)notification\{\
- JXAudioCell* cell = (JXAudioCell*)notification.object;\
- JXMessageObject *msg=cell.msg;\
- _lastIndex = cell.indexNum;\
- \cf2 //msg.isReadDel = [NSNumber numberWithBool:YES];\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.isReadDel boolValue]) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_lastIndex >= _array.count)\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 while
- \f0\b0 \cf4 (_lastIndex<_array.count) \{\
- _lastIndex++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_lastIndex>=_array.count)\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- msg = [_array objectAtIndex:_lastIndex];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeVoice && ![msg.isRead boolValue] && !msg.isMySend)\{\
- JXAudioCell* nextCell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:_lastIndex inSection:\cf7 0\cf4 ]];\
- [nextCell.audioPlayer
- \f2\b \cf8 switch
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- msg =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- cell =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 canRecord\cf4 \
- \{\
-
- \f2\b \cf8 __block
- \f0\b0 \cf4
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 bCanRecord =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([[[UIDevice currentDevice]systemVersion]floatValue] >= \cf7 7.0\cf4 ) \{\
- AVAudioSession *audioSession = [AVAudioSession sharedInstance];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([audioSession respondsToSelector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (requestRecordPermission:)]) \{\
- [audioSession performSelector:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (requestRecordPermission:) withObject:^(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 granted) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (granted) \{\
- bCanRecord =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- bCanRecord =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \}];\
- \}\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 bCanRecord;\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 readDeleWithUser\cf4 :(JXMessageObject *)p\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .readDelNum ++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.fromUserId isEqualToString:MY_USER_ID]) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _array.count; i ++) \{\
- JXMessageObject *msg = _array[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.messageId isEqualToString:msg.messageId]) \{\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeRemind];\
- msg.content = Localized(\cf6 @"JX_OtherLookedYourReadingMsg"\cf4 );\
- [msg update];\
- \
- [_table reloadData];\
- \
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 deleteMsg:p];\
- \}\
- \
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 2\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .readDelNum > \cf7 5\cf4 ) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .readDelNum = \cf7 0\cf4 ;\
- \
- \
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableView reloadData];\
- NSLog(\cf6 @"readDelNum ----- %d"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .readDelNum);\
- \}\
- \});\
- \}\
- \
- \cf2 //#pragma mark--------
- \f1 \'b5\'c7\'c2\'bc\'d7\'b4\'cc\'ac\'b8\'c4\'b1\'e4
- \f0 \cf4 \
- \cf2 //-(void)onLoginChanged:(NSNotification *)notifacation\{\cf4 \
- \cf2 // [_wait stop];\cf4 \
- \cf2 // if (_isShowLoginChange) \{\cf4 \
- \cf2 // switch ([JXXMPP sharedInstance].isLogined)\{\cf4 \
- \cf2 // case login_status_ing:\cf4 \
- \cf2 // //
- \f1 \'c1\'ac\'bd\'d3\'ca\'a7\'b0\'dc
- \f0 \cf4 \
- \cf2 // [JXMyTools showTipView:Localized(@"JX_ConnectFailed")];\cf4 \
- \cf2 // break;\cf4 \
- \cf2 // case login_status_no:\cf4 \
- \cf2 // //
- \f1 \'c1\'ac\'bd\'d3\'ca\'a7\'b0\'dc
- \f0 \cf4 \
- \cf2 // [JXMyTools showTipView:Localized(@"JX_ConnectFailed")];\cf4 \
- \cf2 // break;\cf4 \
- \cf2 // case login_status_yes:\cf4 \
- \cf2 // //
- \f1 \'c1\'ac\'bd\'d3\'b3\'c9\'b9\'a6
- \f0 \cf4 \
- \cf2 // [JXMyTools showTipView:Localized(@"JX_ConnectSuccessfully")];\cf4 \
- \cf2 // break;\cf4 \
- \cf2 // \}\cf4 \
- \cf2 // \}\cf4 \
- \cf2 //\}\cf4 \
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onBackForRecordBtnLeft\cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .objToMsg =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- [_recordBtnLeft setBackgroundImage:[UIImage imageNamed:\cf6 @"im_input_ptt_normal"\cf4 ] forState:UIControlStateNormal];\
- [_recordBtnLeft setBackgroundImage:[UIImage imageNamed:\cf6 @"im_input_keyboard_normal"\cf4 ] forState:UIControlStateSelected];\
- [_recordBtnLeft removeTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onBackForRecordBtnLeft) forControlEvents:UIControlEventTouchUpInside];\
- [_recordBtnLeft addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (recordSwitch:) forControlEvents:UIControlEventTouchUpInside];\
- _messageText.textColor = [UIColor blackColor];\
- _messageText.text =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- _hisReplyMsg =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 textViewDidChange:_messageText];\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 getTextViewWatermark\cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_hisReplyMsg.length <= \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- [_messageText becomeFirstResponder];\
- \cf2 //
- \f1 \'b3\'a4\'b0\'b4\'bb\'d8\'b8\'b4
- \f0
- \f1 \'cf\'d4\'ca\'be\'cb\'ae\'d3\'a1
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![
- \f2\b \cf8 self
- \f0\b0 \cf4 changeEmjoyText:_hisReplyMsg textColor:[UIColor lightGrayColor]]) \{\
- [_messageText.textStorage insertAttributedString:[[NSAttributedString alloc] initWithString:_hisReplyMsg attributes:\cf7 @\{\cf4 NSFontAttributeName:SYSFONT(\cf7 18\cf4 ),NSForegroundColorAttributeName:[UIColor lightGrayColor]\cf7 \}\cf4 ] atIndex:_messageText.selectedRange.location];\
- \}\
- _messageText.textColor = [UIColor lightGrayColor];\
- _messageText.selectedRange = NSMakeRange(\cf7 0\cf4 , \cf7 0\cf4 );\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setTableFooterFrame:_messageText];\
- \}\
- \
- \cf2 //
- \f1 \'b3\'a4\'b0\'b4\'bb\'d8\'b8\'b4
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 replyIndexNum\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexNum \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!_messageText.userInteractionEnabled) \{\
- [JXMyTools showTipView:\cf6 @"
- \f1 \'c4\'fa\'d2\'d1\'b1\'bb\'bd\'fb\'d6\'b9\'b7\'a2\'d1\'d4
- \f0 "\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- JXMessageObject *msg = _array[indexNum];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_recordBtnLeft.selected) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 recordSwitch:_recordBtnLeft];\
- \}\
- [_messageText becomeFirstResponder];\
- [_recordBtnLeft setBackgroundImage:[UIImage imageNamed:\cf6 @"chat_back_reply"\cf4 ] forState:UIControlStateNormal];\
- [_recordBtnLeft removeTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (recordSwitch:) forControlEvents:UIControlEventTouchUpInside];\
- [_recordBtnLeft addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (onBackForRecordBtnLeft) forControlEvents:UIControlEventTouchUpInside];\
- _hisReplyMsg = [NSString stringWithFormat:\cf6 @"%@%@:%@"\cf4 ,Localized(\cf6 @"JX_Reply"\cf4 ),msg.fromUserName,[msg getTypeName]];\
- \cf2 //
- \f1 \'cf\'d4\'ca\'be\'cb\'ae\'d3\'a1
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 getTextViewWatermark];\
- \cf2 //
- \f1 \'d7\'aa\'b3\'c9
- \f0 json
- \f1 \'ca\'fd\'be\'dd
- \f0 \cf4 \
- SBJsonWriter * OderJsonwriter = [SBJsonWriter
- \f2\b \cf8 new
- \f0\b0 \cf4 ];\
- NSString * jsonString = [OderJsonwriter stringWithObject:[msg toDictionary]];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .objToMsg = jsonString;\
- \}\
- \
- \cf2 //
- \f1 \'b3\'a4\'b0\'b4\'d7\'aa\'b7\'a2
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 RelayIndexNum\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexNum \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- memberData *data = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:g_myself.userId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([data.role integerValue] == \cf7 4\cf4 ) \{\
- [JXMyTools showTipView:\cf6 @"
- \f1 \'d2\'fe\'c9\'ed\'c8\'cb\'b2\'bb\'c4\'dc\'d7\'aa\'b7\'a2\'cf\'fb\'cf\'a2
- \f0 "\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- JXMessageObject *msg = _array[indexNum];\
- JXRelayVC *vc = [[JXRelayVC alloc] init];\
- vc.chatPerson =
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson;\
- vc.roomJid =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- vc.isMoreSel =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- vc.chatVC =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- NSMutableArray *array = [NSMutableArray arrayWithObject:msg];\
- \cf2 // vc.msg = msg;\cf4 \
- vc.relayMsgArray = array;\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 setRelayMsgArray\cf4 :(NSMutableArray *)relayMsgArray \{\
- _relayMsgArray = relayMsgArray;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .friendStatus = friend_status_friend;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (JXMessageObject *msg
- \f2\b \cf8 in
- \f0\b0 \cf4 relayMsgArray) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeRedPacket) \{\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
- msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JX_RED"\cf4 )];\
- msg.chatMsgHeight = \cf6 @"0"\cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \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) \{\
- \
- msg.type = [NSNumber numberWithInt:kWCMessageTypeText];\
- msg.content = [NSString stringWithFormat:\cf6 @"[%@]"\cf4 , Localized(\cf6 @"JX_AudioAndVideoCalls"\cf4 )];\
- msg.chatMsgHeight = \cf6 @"0"\cf4 ;\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 relay:msg];\
- \}\
- \cf2 // [self relay];\cf4 \
- \}\
- \}\
- \
- \cf2 //- (void)setRelayMsg:(JXMessageObject *)relayMsg \{\cf4 \
- \cf2 // _relayMsg = relayMsg;\cf4 \
- \cf2 // self.friendStatus = friend_status_friend;\cf4 \
- \cf2 // if (!self.roomJid) \{\cf4 \
- \cf2 // [self relay];\cf4 \
- \cf2 // \}\cf4 \
- \cf2 //\}\cf4 \
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 relay\cf4 :(JXMessageObject *)msg\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 showDisableSay])\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck])\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.content.length > \cf7 0\cf4 ) \{\
- JXMessageObject *msg1 = [[JXMessageObject alloc]init];\
- msg1 = [msg copy];\
- msg1.messageId =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- msg1.timeSend = [NSDate date];\
- msg1.fromId =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- msg1.fileSize =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- msg1.fileName =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- msg1.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\{\
- msg1.toUserId =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
- msg1.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg1.fromUserName = _userNickName;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg1.toUserId = chatPerson.userId;\
- msg1.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \cf2 // msg.content = relayMsg.content;\cf4 \
- \cf2 // msg.type = relayMsg.type;\cf4 \
- msg1.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg1.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg1.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
- \f0 \cf4 \
- [msg1 insert:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\
- [g_xmpp sendMessage:msg1 roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg1];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_table.contentSize.height > (JX_SCREEN_HEIGHT +
- \f2\b \cf8 self
- \f0\b0 \cf4 .deltaHeight -
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter - \cf7 64\cf4 - \cf7 40\cf4 - \cf7 20\cf4 )) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .deltaY >= \cf7 0\cf4 ) \{\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableFooter.frame.origin.y != JX_SCREEN_HEIGHT-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter) \{\
- [CATransaction begin];\
- [UIView animateWithDuration:\cf7 0.1f\cf4 animations:^\{\
- \cf2 // self.tableFooter.frame = CGRectMake(0, self.view.frame.size.height+deltaY-self.heightFooter, JX_SCREEN_WIDTH, self.heightFooter);\cf4 \
- [_table setFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 +_noticeHeight, _table.frame.size.width,
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.frame.size.height+
- \f2\b \cf8 self
- \f0\b0 \cf4 .deltaHeight-
- \f2\b \cf8 self
- \f0\b0 \cf4 .heightFooter-_noticeHeight)];\
- \cf2 // [_table gotoLastRow:NO];\cf4 \
- \} completion:^(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 finished) \{\
- \}];\
- [CATransaction commit];\
- \}\
- \
- \}\
- \
- \}\
- \}\
- \
- [_messageText setText:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isShare &&
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareSchemes) \{\
- \
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(\cf7 1\cf4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^\{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareView = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT)];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareView.backgroundColor = [UIColor colorWithWhite:\cf7 0\cf4 alpha:\cf7 .3\cf4 ];\
- [g_window addSubview:
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareView];\
- \
- UIView *view = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , JX_SCREEN_WIDTH - \cf7 100\cf4 , \cf7 220\cf4 )];\
- view.backgroundColor = [UIColor whiteColor];\
- view.center = CGPointMake(
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareView.frame.size.width / \cf7 2\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareView.frame.size.height / \cf7 2\cf4 );\
- view.layer.cornerRadius = \cf7 3.0\cf4 ;\
- view.layer.masksToBounds =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareView addSubview:view];\
- \
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 25\cf4 , \cf7 50\cf4 , \cf7 50\cf4 )];\
- \
- imageView.image = [UIImage imageNamed:\cf6 @"ALOGO_120"\cf4 ];\
- imageView.center = CGPointMake(view.frame.size.width / \cf7 2\cf4 , imageView.center.y);\
- [view addSubview:imageView];\
- \
- UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , CGRectGetMaxY(imageView.frame) + \cf7 5\cf4 , view.frame.size.width, \cf7 30\cf4 )];\
- label.font = [UIFont systemFontOfSize:\cf7 18\cf4 ];\
- label.text = Localized(\cf6 @"JX_Sended"\cf4 );\
- label.textAlignment = NSTextAlignmentCenter;\
- [view addSubview:label];\
- \
- UIView *line = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , view.frame.size.height - \cf7 90\cf4 , view.frame.size.width, LINE_WH)];\
- line.backgroundColor = THE_LINE_COLOR;\
- [view addSubview:line];\
- \
- UIButton *btn1 = [[UIButton alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , line.frame.origin.y, line.frame.size.width, \cf7 45\cf4 )];\
- [btn1 setTitle:Localized(\cf6 @"JX_Return"\cf4 ) forState:UIControlStateNormal];\
- [btn1 setTitleColor:THEMECOLOR forState:UIControlStateNormal];\
- [btn1 addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (shareBackBtnAction) forControlEvents:UIControlEventTouchUpInside];\
- [view addSubview:btn1];\
- \
- line = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , view.frame.size.height - \cf7 45\cf4 , view.frame.size.width, LINE_WH)];\
- line.backgroundColor = THE_LINE_COLOR;\
- [view addSubview:line];\
- \
- UIButton *btn2 = [[UIButton alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , line.frame.origin.y, line.frame.size.width, \cf7 45\cf4 )];\
- [btn2 setTitle:[NSString stringWithFormat:\cf6 @"%@%@"\cf4 ,Localized(\cf6 @"JX_ToStayIn"\cf4 ),APP_NAME] forState:UIControlStateNormal];\
- [btn2 setTitleColor:THEMECOLOR forState:UIControlStateNormal];\
- [btn2 addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (shareKeepBtnAction) forControlEvents:UIControlEventTouchUpInside];\
- [view addSubview:btn2];\
- \});\
- \}\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 shareBackBtnAction\cf4 \{\
- NSString *str = [NSString stringWithFormat:\cf6 @"%@://type=%@"\cf4 ,
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareSchemes,\cf6 @"Share"\cf4 ];\
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] options:
- \f2\b \cf8 nil
- \f0\b0 \cf4 completionHandler:^(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 success) \{\
- \}];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareView removeFromSuperview];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 shareKeepBtnAction\cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareView.hidden =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .shareView removeFromSuperview];\
- \}\
- \
- \cf2 //
- \f1 \'b3\'a4\'b0\'b4\'c9\'be\'b3\'fd
- \f0 -->
- \f1 \'cc\'d8\'b1\'f0\'b9\'d8\'d0\'c4
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 deleteIndexNum\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexNum \{\
- \
- \
- \
- JXMessageObject *data2=[_array objectAtIndex:indexNum];\
- \
-
- \f2\b \cf8 long
- \f0\b0 \cf4 time = (
- \f2\b \cf8 long
- \f0\b0 \cf4 )[[NSDate date] timeIntervalSince1970];\
- time = (time *\cf7 1000\cf4 + g_server.timeDifference);\
- NSString *salt = [NSString stringWithFormat:\cf6 @"%ld"\cf4 , time];\
- \
- \
- [g_server UserRoomAttentionListion:salt userId:g_server.myself.userId jid:_roomJid attentionUserId:[NSString stringWithFormat:\cf6 @"%@"\cf4 ,data2.fromUserId] andToView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \cf2 //[g_server UserRoomAttentionListion:salt userId:[NSString stringWithFormat:@"%@",data2.fromUserId] jid:_roomJid andToView:self];\cf4 \
- \
- \cf2 // [g_server getUserRoomAttentionattentionLastInfo:salt userId:[NSString stringWithFormat:@"%@",data2.fromUserId] jid:_roomJid andToView:self];\cf4 \
- \
- \
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- memberData *data=[_array objectAtIndex:indexNum];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomId.length > \cf7 0\cf4 &&([data.role intValue] == \cf7 1\cf4 || [data.role intValue] == \cf7 2\cf4 )) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck]) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- JXMessageObject *msg = _array[indexNum];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex = indexNum;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 type = \cf7 1\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid) \{\
- type = \cf7 2\cf4 ;\
- \}\
- [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:\cf7 2\cf4 roomJid:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid deleteOrWithdraw:kWCMessageTypeSuperDelete toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- JXMessageObject *msg = _array[indexNum];\
- NSString* s;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid length]>\cf7 0\cf4 )\
- s =
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid;\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- s = chatPerson.userId;\
- \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (indexNum == _array.count - \cf7 1\cf4 ) \{\
- JXMessageObject *newLastMsg;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (indexNum == \cf7 0\cf4 ) \{\
- newLastMsg = [_array firstObject];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- newLastMsg = _array[indexNum - \cf7 1\cf4 ];\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .lastMsg.content = newLastMsg.content;\
- [newLastMsg updateLastSend:UpdateLastSendType_None];\
- \}\
- \
- \cf2 //
- \f1 \'c9\'be\'b3\'fd\'b1\'be\'b5\'d8\'c1\'c4\'cc\'ec\'bc\'c7\'c2\'bc
- \f0 \cf4 \
- [_array removeObjectAtIndex:indexNum];\
- [msg
- \f2\b \cf8 delete
- \f0\b0 \cf4 ];\
- \
- \cf2 // [_table deleteRow:indexNum section:0];\cf4 \
- [_table reloadData];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId.length > \cf7 0\cf4 ) \{\
- \cf2 // NSDictionary *dict = self.courseArray[indexNum];\cf4 \
- [g_server userCourseUpdateWithCourseId:
- \f2\b \cf8 self
- \f0\b0 \cf4 .courseId MessageIds:
- \f2\b \cf8 nil
- \f0\b0 \cf4 CourseName:
- \f2\b \cf8 nil
- \f0\b0 \cf4 CourseMessageId:msg.messageId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 type = \cf7 1\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid) \{\
- type = \cf7 2\cf4 ;\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex = -\cf7 1\cf4 ;\
- \
- \
- \
- \cf2 // [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:2 roomJid:self.roomJid toView:self];\cf4 \
- [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:\cf7 2\cf4 roomJid:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid deleteOrWithdraw:kWCMessageTypeSuperDelete toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'b3\'a4\'b0\'b4\'b3\'b7\'bb\'d8
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 withdrawIndexNum\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexNum \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMsgCheck]) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
- JXMessageObject *msg = _array[indexNum];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .withdrawIndex = indexNum;\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 type = \cf7 1\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid) \{\
- type = \cf7 2\cf4 ;\
- \}\
- \cf2 //
- \f1 \'ca\'b5\'cf\'d6\'b7\'c0\'b3\'b7\'bb\'d8
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 && _isAttritionRecall) \{\
- memberData *data = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:g_myself.userId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([data.role intValue] == \cf7 1\cf4 || [data.role intValue] == \cf7 2\cf4 ) \{\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [JXMyTools showTipView:\cf6 @"
- \f1 \'b8\'c3\'cf\'fb\'cf\'a2\'b2\'bb\'c4\'dc\'b3\'b7\'bb\'d8
- \f0 "\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \cf2 // [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:2 roomJid:self.roomJid toView:self];\cf4 \
- \
- \cf2 //
- \f1 \'c8\'ba\'b9\'dc\'c0\'ed
- \f0 \cf4 \
- memberData *data = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .room getMember:g_myself.userId];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid.length > \cf7 0\cf4 && _isAttritionRecall) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([data.role intValue] == \cf7 1\cf4 || [data.role intValue] == \cf7 2\cf4 ) \{\
- [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:\cf7 2\cf4 roomJid:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid deleteOrWithdraw:kWCMessageTypeSuperDelete toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [JXMyTools showTipView:\cf6 @"
- \f1 \'b8\'c3\'cf\'fb\'cf\'a2\'b2\'bb\'c4\'dc\'b3\'b7\'bb\'d8
- \f0 "\cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([data.role intValue] == \cf7 1\cf4 || [data.role intValue] == \cf7 2\cf4 ) \{\
- [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:\cf7 2\cf4 roomJid:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid deleteOrWithdraw:kWCMessageTypeSuperDelete toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [g_server tigaseDeleteMsgWithMessageId:msg.messageId type:type deleteType:\cf7 2\cf4 roomJid:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid deleteOrWithdraw:kWCMessageTypeWithdraw toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- \
- \}\
- \
- \cf2 //
- \f1 \'b3\'a4\'b0\'b4\'ca\'d5\'b2\'d8
- \f0 &&
- \f1 \'b3\'a4\'b0\'b4\'cc\'ed\'bc\'d3\'b1\'ed\'c7\'e9
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 favoritIndexNum\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexNum \cf11 type\cf4 :(CollectType)collectType\{\
- JXMessageObject *msg = _array[indexNum];\
- NSMutableArray *emoji = [[NSMutableArray alloc] init];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (collectType == CollectTypeEmoji) \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < g_myself.favorites.count; i ++) \{\
- NSDictionary *dict = g_myself.favorites[i];\
- NSString *url = dict[\cf6 @"url"\cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.content isEqualToString:url]) \{\
- \
- [JXMyTools showTipView:Localized(\cf6 @"JX_ExpressionAdded"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}\
- NSString *type = [NSString stringWithFormat:\cf6 @"%ld"\cf4 ,collectType];\
- NSMutableDictionary *dataDict = [[NSMutableDictionary alloc] init];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (collectType != CollectTypeEmoji) \{\
- [dataDict setValue:msg.messageId forKey:\cf6 @"msgId"\cf4 ];\
- \}\
- [dataDict setValue:msg.content forKey:\cf6 @"msg"\cf4 ];\
- [dataDict setValue:type forKey:\cf6 @"type"\cf4 ];\
- [dataDict setValue:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid forKey:\cf6 @"roomJid"\cf4 ];\
- [dataDict setValue:\cf7 @0\cf4 forKey:\cf6 @"collectType"\cf4 ];\
- [dataDict setValue:msg.content forKey:\cf6 @"url"\cf4 ];\
- \
- [emoji addObject:dataDict];\
- \cf2 // NSString * jsonString = [[SBJsonWriter new] stringWithObject:[msg toDictionary]];\cf4 \
- \cf2 // [g_server addFavoriteWithContent:jsonString type:collectType toView:self];\cf4 \
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (collectType == CollectTypeEmoji)\{\
- \cf2 //
- \f1 \'cc\'ed\'bc\'d3\'b5\'a5\'b8\'f6\'b1\'ed\'c7\'e9
- \f0 \cf4 \
- NSDate* date = [NSDate dateWithTimeIntervalSinceNow:\cf7 0\cf4 ];\
- NSTimeInterval time = [date timeIntervalSince1970]*\cf7 1000\cf4 ;\
- NSString *mixString = [NSString stringWithFormat:\cf6 @"%.0f"\cf4 , time];\
- NSString *faceName = [NSString stringWithFormat:\cf6 @"%@.jpg"\cf4 , mixString];\
- [g_server addFaceClollect:\cf6 @""\cf4 faceName:\cf6 @"noFacename"\cf4 url:msg.content View:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 //
- \f1 \'ca\'d5\'b2\'d8
- \f0 \cf4 \
- [g_server addFavoriteWithEmoji:emoji toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \
- \
- \cf2 // [g_server userEmojiAddWithUrl:msg.content toView:self];\cf4 \
- \
- \
- \
- \}\
- \
- \cf2 //
- \f1 \'b6\'e0\'d1\'a1
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 selectMoreIndexNum\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexNum \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreView.hidden =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .gotoBackBtn setBackgroundImage:
- \f2\b \cf8 nil
- \f0\b0 \cf4 forState:UIControlStateNormal];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .gotoBackBtn setTitle:Localized(\cf6 @"JX_Cencal"\cf4 ) forState:UIControlStateNormal];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 enableCell];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .tableView reloadData];\
- \}\
- \
- \cf2 //
- \f1 \'b6\'e0\'d1\'a1\'d1\'a1\'d4\'f1
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 checkBoxSelectIndexNum\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexNum \cf11 isSelect\cf4 :(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )isSelect \{\
- \
- JXMessageObject *msg = _array[indexNum];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.isReadDel boolValue]) \{\
- chatCell.checkBox.selected =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- [g_App showAlert:Localized(\cf6 @"JX_MessageBurningNo"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isSelect) \{\
- [_selectMoreArr addObject:_array[indexNum]];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [_selectMoreArr removeObject:_array[indexNum]];\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'b3\'a4\'b0\'b4\'bf\'aa\'ca\'bc\'c2\'bc\'d6\'c6
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 startRecordIndexNum\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexNum \{\
- [_recordArray removeAllObjects];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isRecording =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .recordStarNum = indexNum;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = Localized(\cf6 @"JX_StopRecording"\cf4 );\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \}\
- \
- \cf2 //
- \f1 \'b3\'a4\'b0\'b4\'bd\'e1\'ca\'f8\'c2\'bc\'d6\'c6
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 stopRecordIndexNum\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexNum \{\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i =
- \f2\b \cf8 self
- \f0\b0 \cf4 .recordStarNum; i<= indexNum; i ++) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (i >= _array.count) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- JXMessageObject *msg = _array[i];\
- \
-
- \f2\b \cf8 if
- \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)\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.messageId) \{\
- [_recordArray addObject:msg.messageId];\
- \}\
- \}\
- \
- UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:Localized(\cf6 @"JX_InputCourseName"\cf4 ) message:
- \f2\b \cf8 nil
- \f0\b0 \cf4 delegate:
- \f2\b \cf8 self
- \f0\b0 \cf4 cancelButtonTitle:Localized(\cf6 @"JX_Cencal"\cf4 ) otherButtonTitles:Localized(\cf6 @"JX_Confirm"\cf4 ),
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- alertView.alertViewStyle = UIAlertViewStylePlainTextInput;\
- [alertView show];\
- \
- \cf2 // NSString *str = self.onlinestate ? Localized(@"JX_OnLine") : Localized(@"JX_OffLine");\cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid || ([chatPerson.userId intValue]<\cf7 10100\cf4 && [chatPerson.userId intValue]>=\cf7 10000\cf4 )) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .title = chatPerson.userNickname;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- \cf2 // self.title = [NSString stringWithFormat:@"%@(%@)",chatPerson.remarkName.length > 0 ? chatPerson.remarkName : chatPerson.userNickname,str];\cf4 \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setChatTitle:chatPerson.remarkName.length > \cf7 0\cf4 ? chatPerson.remarkName : chatPerson.userNickname];\
- \}\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isRecording =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .recordStarNum = \cf7 0\cf4 ;\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \cf2 //
- \f1 \'cf\'fb\'cf\'a2\'d6\'d8\'b7\'a2
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 resendIndexNum\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexNum \{\
- JXActionSheetVC *actionVC = [[JXActionSheetVC alloc] initWithImages:\cf7 @[]\cf4 names:\cf7 @[\cf4 Localized(\cf6 @"JX_Delete"\cf4 ),Localized(\cf6 @"JXBaseChatCell_SendAngin"\cf4 )\cf7 ]\cf4 ];\
- actionVC.tag = \cf7 1111\cf4 ;\
- actionVC.delegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .indexNum = indexNum;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 presentViewController:actionVC animated:
- \f2\b \cf8 NO
- \f0\b0 \cf4 completion:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 chatCell\cf4 :(JXBaseChatCell *)chatCell \cf11 audioPlayChangeIndexNum\cf4 :(
- \f2\b \cf8 int
- \f0\b0 \cf4 )indexNum \{\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 flag = [g_default boolForKey:kChatVCMessageAudioIsNotPlayback];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!flag) \{\
- \cf2 //
- \f1 \'cc\'fd\'cd\'b2\'b2\'a5\'b7\'c5
- \f0 \cf4 \
- [g_default setBool:
- \f2\b \cf8 YES
- \f0\b0 \cf4 forKey:kChatVCMessageAudioIsNotPlayback];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 //
- \f1 \'d1\'ef\'c9\'f9\'c6\'f7\'b2\'a5\'b7\'c5
- \f0 \cf4 \
- [g_default setBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 forKey:kChatVCMessageAudioIsNotPlayback];\
- \}\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 setAudioIconFrame];\
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 getRecording\cf4 \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 self
- \f0\b0 \cf4 .isRecording;\
- \}\
- - (NSInteger)\cf11 getRecordStarNum\cf4 \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 self
- \f0\b0 \cf4 .recordStarNum;\
- \}\
- \
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'bf\'ce\'b3\'cc
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendCourseAction\cf4 \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_array.count <= \cf7 0\cf4 ) \{\
- [JXMyTools showTipView:Localized(\cf6 @"JX_ThisCourseEmpty"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (g_commonService.courseTimer) \{\
- [JXMyTools showTipView:Localized(\cf6 @"JX_SendingPleaseWait"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- JXRelayVC *vc = [[JXRelayVC alloc] init];\
- vc.isCourse =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- vc.relayDelegate =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 sendCourse\cf4 :(NSTimer *) timer\{\
- \
- JXMsgAndUserObject *obj = timer.userInfo;\
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isRoom;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([obj.user.roomFlag intValue] > \cf7 0\cf4 || obj.user.roomId.length > \cf7 0\cf4 ) \{\
- isRoom =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- isRoom =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .sendIndex ++;\
- \cf2 // [_chatWait start:[NSString stringWithFormat:@"
- \f1 \'d5\'fd\'d4\'da\'b7\'a2\'cb\'cd\'a3\'ba
- \f0 %d/%ld",self.sendIndex,_array.count] inView:g_window];\cf4 \
- [_chatWait setCaption:[NSString stringWithFormat:\cf6 @"%@
- \f1 \'a3\'ba
- \f0 %d/%ld"\cf4 ,Localized(\cf6 @"JX_SendNow"\cf4 ),
- \f2\b \cf8 self
- \f0\b0 \cf4 .sendIndex,_array.count]];\
- [_chatWait update];\
- \
- JXMessageObject *msg= _array[
- \f2\b \cf8 self
- \f0\b0 \cf4 .sendIndex - \cf7 1\cf4 ];\
- msg.messageId =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- msg.timeSend = [NSDate date];\
- msg.fromId =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- msg.fromUserId = MY_USER_ID;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isRoom)\{\
- msg.toUserId = obj.user.userId;\
- msg.isGroup =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- msg.fromUserName = g_myself.userNickname;\
- \}\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- msg.toUserId = obj.user.userId;\
- msg.isGroup =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \cf2 // msg.content = relayMsg.content;\cf4 \
- \cf2 // msg.type = relayMsg.type;\cf4 \
- msg.isSend = [NSNumber numberWithInt:transfer_status_ing];\
- msg.isRead = [NSNumber numberWithBool:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- msg.isReadDel = [NSNumber numberWithInt:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \cf2 //
- \f1 \'b7\'a2\'cd\'f9\'c4\'c4\'c0\'ef
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isRoom) \{\
- [msg insert:obj.user.userId];\
- [g_xmpp sendMessage:msg roomName:obj.user.userId];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [msg insert:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_array.count ==
- \f2\b \cf8 self
- \f0\b0 \cf4 .sendIndex) \{\
- [_chatWait stop];\
- [_timer invalidate];\
- _timer =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- [JXMyTools showTipView:Localized(\cf6 @"JXAlert_SendOK"\cf4 )];\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 relay\cf4 :(JXRelayVC *)relayVC \cf11 MsgAndUserObject\cf4 :(JXMsgAndUserObject *)obj \{\
- \
- \cf2 // [g_subWindow addSubview:_suspensionBtn];\cf4 \
- \cf2 // g_subWindow.hidden = YES;\cf4 \
- \cf2 // _chatWait.view.frame = CGRectMake(0, 0, 50, 50);\cf4 \
- \cf2 // [_chatWait start:[NSString stringWithFormat:@"%@
- \f1 \'a3\'ba
- \f0 1/%ld",Localized(@"JX_SendNow"),_array.count] inView:g_subWindow];\cf4 \
- \
- dispatch_async(dispatch_get_global_queue(\cf7 0\cf4 , \cf7 0\cf4 ), ^\{\
- \
- [g_commonService sendCourse:obj Array:_array];\
- \});\
- \
- \cf2 // _timer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(sendCourse:) userInfo:obj repeats:YES];\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 alertView\cf4 :(UIAlertView *)alertView \cf11 clickedButtonAtIndex\cf4 :(NSInteger)buttonIndex \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (alertView.tag == \cf7 2457\cf4 ) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (buttonIndex == \cf7 1\cf4 ) \{\
- \
- \cf2 // NSMutableString *msgIds = [NSMutableString string];\cf4 \
- \cf2 // NSMutableString *types = [NSMutableString string];\cf4 \
- NSMutableArray *emoji = [[NSMutableArray alloc] init];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr.count; i ++) \{\
- JXMessageObject *msg =
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr[i];\
-
- \f2\b \cf8 if
- \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) \{\
- \
- CollectType collectType = CollectTypeDefult;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeImage) \{\
- collectType = CollectTypeImage;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeCustomFace) \{\
- collectType = CollectTypeEmoji;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeEmoji) \{\
- collectType = CollectTypeEmoji;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeVideo) \{\
- collectType = CollectTypeVideo;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeFile) \{\
- collectType = CollectTypeFile;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeVoice) \{\
- collectType = CollectTypeVoice;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeText) \{\
- collectType = CollectTypeText;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (collectType == CollectTypeDefult) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- \cf2 // NSDictionary *dict = g_myself.favorites[i];\cf4 \
- \cf2 // NSString *url = dict[@"url"];\cf4 \
- \cf2 // if ([msg.content isEqualToString:url]) \{\cf4 \
- \cf2 // continue;\cf4 \
- \cf2 // \}\cf4 \
- \
- NSString *type = [NSString stringWithFormat:\cf6 @"%ld"\cf4 ,collectType];\
- NSMutableDictionary *dataDict = [[NSMutableDictionary alloc] init];\
- [dataDict setValue:msg.messageId forKey:\cf6 @"msgId"\cf4 ];\
- [dataDict setValue:msg.content forKey:\cf6 @"msg"\cf4 ];\
- [dataDict setValue:type forKey:\cf6 @"type"\cf4 ];\
- [dataDict setValue:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid forKey:\cf6 @"roomJid"\cf4 ];\
- [dataDict setValue:\cf7 @0\cf4 forKey:\cf6 @"collectType"\cf4 ];\
- \
- [emoji addObject:dataDict];\
- \
- \cf2 // if (msgIds.length <= 0) \{\cf4 \
- \cf2 // [msgIds appendString:msg.messageId];\cf4 \
- \cf2 // [types appendString:[NSString stringWithFormat:@"%ld",collectType]];\cf4 \
- \cf2 // \}else \{\cf4 \
- \cf2 // [msgIds appendFormat:@",%@", msg.messageId];\cf4 \
- \cf2 // [types appendFormat:@",%@", [NSString stringWithFormat:@"%ld",collectType]];\cf4 \
- \cf2 // \}\cf4 \
- \
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (emoji.count > \cf7 0\cf4 ) \{\
- [g_server addFavoriteWithEmoji:emoji toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 actionQuit];\
- \}\
- \}\
- \
- \}\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (alertView.tag == \cf7 2458\cf4 ) \{\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr.count; i ++) \{\
- JXMessageObject *msg =
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] == kWCMessageTypeImage || [msg.type intValue] == kWCMessageTypeCustomFace|| [msg.type intValue] == kWCMessageTypeEmoji) \{\
- UIImageView *imageView = [[UIImageView alloc] init];\
- NSURL* url;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.isMySend && isFileExist(msg.fileName))\
- url = [NSURL fileURLWithPath:msg.fileName];\
-
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- url = [NSURL URLWithString:msg.content];\
- [imageView sd_setImageWithURL:url completed:^(UIImage *
- \f2\b \cf8 _Nullable
- \f0\b0 \cf4 image, NSError *
- \f2\b \cf8 _Nullable
- \f0\b0 \cf4 error, SDImageCacheType cacheType, NSURL *
- \f2\b \cf8 _Nullable
- \f0\b0 \cf4 imageURL) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!error) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 saveImageToPhotos:imageView.image];\
- \}\
- \}];\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type integerValue] == kWCMessageTypeVideo) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.content rangeOfString:\cf6 @"http"\cf4 ].location != NSNotFound) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 playerDownload:msg.content];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 saveVideo:msg.content];\
- \}\
- \
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 actionQuit];\
- \}\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (alertView.tag == \cf7 3457\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (buttonIndex == \cf7 1\cf4 ) \{\
- \
- NSMutableArray *selects = [NSMutableArray array];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i <
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr.count; i ++) \{\
- JXMessageObject *msg = [
- \f2\b \cf8 self
- \f0\b0 \cf4 .selectMoreArr[i] copy];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.type intValue] != kWCMessageTypeRedPacket && [msg.type intValue] != kWCMessageTypeTransfer) \{\
- [selects addObject:msg];\
- \}\
- \}\
- \
- JXRelayVC *vc = [[JXRelayVC alloc] init];\
- vc.relayMsgArray = [NSMutableArray arrayWithArray:selects];\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (buttonIndex == \cf7 1\cf4 ) \{\
- UITextField *tf = [alertView textFieldAtIndex:\cf7 0\cf4 ];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (tf.text.length <= \cf7 0\cf4 ) \{\
- [g_App showAlert:Localized(\cf6 @"JX_InputCourseName"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- _recordName = tf.text;\
- NSMutableString *recordStr = [NSMutableString string];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < _recordArray.count; i ++) \{\
- NSString *str = _recordArray[i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (i == _recordArray.count - \cf7 1\cf4 ) \{\
- [recordStr appendString:str];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [recordStr appendFormat:\cf6 @"%@,"\cf4 ,str];\
- \}\
- \}\
- \
- [g_server userCourseAddWithMessageIds:recordStr CourseName:_recordName RoomJid:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 saveImageToPhotos\cf4 :(UIImage*)savedImage\
- \{\
- UIImageWriteToSavedPhotosAlbum(savedImage,
- \f2\b \cf8 self
- \f0\b0 \cf4 ,
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (image:didFinishSavingWithError:contextInfo:),
- \f2\b \cf8 NULL
- \f0\b0 \cf4 );\
- \}\
- \
- \
- \cf2 //
- \f1 \'d6\'b8\'b6\'a8\'bb\'d8\'b5\'f7\'b7\'bd\'b7\'a8
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 image\cf4 : (UIImage *) image \cf11 didFinishSavingWithError\cf4 : (NSError *) error \cf11 contextInfo\cf4 : (
- \f2\b \cf8 void
- \f0\b0 \cf4 *) contextInfo\{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!error) \{\
- \
- [JXMyTools showTipView:Localized(\cf6 @"JX_SaveSuessed"\cf4 )];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [JXMyTools showTipView:Localized(\cf6 @"JX_SaveFiled"\cf4 )];\
- \}\
- \}\
- \
- \cf2 //-----
- \f1 \'cf\'c2\'d4\'d8\'ca\'d3\'c6\'b5
- \f0 --\cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 playerDownload\cf4 :(NSString *)url\{\
- \
- \
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,
- \f2\b \cf8 YES
- \f0\b0 \cf4 );\
- NSString *documentsDirectory = [paths objectAtIndex:\cf7 0\cf4 ];\
- \
- AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];\
- NSString *fullPath = [NSString stringWithFormat:\cf6 @"%@/%@"\cf4 , documentsDirectory, \cf6 @"jaibaili.mp4"\cf4 ];\
- NSURL *urlNew = [NSURL URLWithString:url];\
- NSURLRequest *request = [NSURLRequest requestWithURL:urlNew];\
- NSURLSessionDownloadTask *task =\
- [manager downloadTaskWithRequest:request\
- progress:
- \f2\b \cf8 nil
- \f0\b0 \cf4 destination:^NSURL *(NSURL *targetPath, NSURLResponse *response) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 [NSURL fileURLWithPath:fullPath];\
- \}\
- completionHandler:^(NSURLResponse *response, NSURL *filePath, NSError *error) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 saveVideo:fullPath];\
- \}];\
- [task resume];\
- \
- \}\
- \
- \
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'d5\'fd\'d4\'da\'ca\'e4\'c8\'eb
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 sendEntering\cf4 \{\
- JXMessageObject *msg=[[JXMessageObject alloc]init];\
- msg.timeSend = [NSDate date];\
- msg.fromUserId = MY_USER_ID;\
- \
- msg.toUserId = chatPerson.userId;\
- msg.type = [NSNumber numberWithInt:kWCMessageTypeRelay];\
- [g_xmpp sendMessage:msg roomName:
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid];\cf2 //
- \f1 \'b7\'a2\'cb\'cd\'cf\'fb\'cf\'a2
- \f0 \cf4 \
- \}\
- \
- \cf2 //
- \f1 \'c8\'ba\'b8\'fc\'b8\'c4\'ea\'c7\'b3\'c6
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 setNickName\cf4 :(NSString *)nickName \{\
- _userNickName = nickName.length > \cf7 0\cf4 ? nickName : _userNickName;\
- [_table reloadData];\
- \}\
- \cf2 //
- \f1 \'b7\'a2\'cb\'cd\'d1\'fb\'c7\'eb\'c8\'ba\'b3\'c9\'d4\'b1\'d1\'e9\'d6\'a4
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 needVerify\cf4 :(JXMessageObject *)msg \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 showOneMsg:msg];\
- \}\
- \
- \cf2 //
- \f1 \'b5\'a5\'cc\'f5\'cd\'bc\'ce\'c4\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 onDidSystemImage1\cf4 :(NSNotification *)notif \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- JXMessageObject *msg = notif.object;\
- SBJsonParser * parser = [[SBJsonParser alloc] init] ;\
-
- \f2\b \cf8 id
- \f0\b0 \cf4 content = [parser objectWithString:msg.content];\
- NSString *url = [(NSDictionary *)content objectForKey:\cf6 @"url"\cf4 ];\
- \
- webpageVC *webVC = [webpageVC alloc];\
- webVC.isGotoBack=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.title = [(NSDictionary *)content objectForKey:\cf6 @"title"\cf4 ];\
- webVC.url = url;\
- webVC = [webVC init];\
- [g_navigation.navigationView addSubview:webVC.view];\
- \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
- \
- \}\
- \
- \cf2 //
- \f1 \'b6\'e0\'cc\'f5\'cd\'bc\'ce\'c4\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 onDidSystemImage2\cf4 :(NSNotification *)notif \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- NSDictionary *dic = notif.object;\
- NSString *url = [dic objectForKey:\cf6 @"url"\cf4 ];\
- \
- webpageVC *webVC = [webpageVC alloc];\
- webVC.isGotoBack=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.title = [dic objectForKey:\cf6 @"title"\cf4 ];\
- webVC.url = url;\
- webVC = [webVC init];\
- [g_navigation.navigationView addSubview:webVC.view];\
- \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
- \
- \}\
- \
- \cf2 //
- \f1 \'d2\'f4\'ca\'d3\'c6\'b5\'cd\'a8\'bb\'b0\'d7\'b4\'cc\'ac
- \f0 cell
- \f1 \'b5\'e3\'bb\'f7
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 onDidAVCall\cf4 :(NSNotification *)notif \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- JXMessageObject *msg = notif.object;\
- \
-
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 isMeeting =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 ([msg.type intValue]) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudioMeetingInvite:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudioChatCancel:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAudioChatEnd: \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- isMeeting =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \cf2 // [self onChatAudio:msg];\cf4 \
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideoMeetingInvite:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideoChatCancel:\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeVideoChatEnd: \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- isMeeting =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \cf2 // [self onChatVideo:msg];\cf4 \
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 case
- \f0\b0 \cf4 kWCMessageTypeAVBusy: \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.objectId isEqualToString:\cf6 @"1"\cf4 ]) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (isMeeting && [g_config.isOpenCluster integerValue] == \cf7 1\cf4 ) \{\
- \
- [g_server userOpenMeetWithToUserId:chatPerson.userId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isAudioMeeting) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onChatAudio:msg];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onChatVideo:msg];\
- \}\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'ce\'c4\'bc\'fe
- \f0 cell
- \f1 \'b5\'e3\'bb\'f7
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 onDidFile\cf4 :(NSNotification *)notif \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- JXMessageObject *msg = notif.object;\
- JXShareFileObject *obj = [[JXShareFileObject alloc] init];\
- obj.fileName = [msg.fileName lastPathComponent];\
- obj.url = msg.content;\
- obj.size = msg.fileSize;\
- \
- JXFileDetailViewController *vc = [[JXFileDetailViewController alloc] init];\
- vc.shareFile = obj;\
- \cf2 // [g_window addSubview:vc.view];\cf4 \
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}\
- \
- \cf2 //
- \f1 \'c1\'b4\'bd\'d3
- \f0 cell
- \f1 \'b5\'e3\'bb\'f7
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 ) \cf11 onDidLink\cf4 :(NSNotification *)notif \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- [_messageText resignFirstResponder];\
- \
- JXMessageObject *msg = notif.object;\
- SBJsonParser * parser = [[SBJsonParser alloc] init] ;\
-
- \f2\b \cf8 id
- \f0\b0 \cf4 content = [parser objectWithString:msg.content];\
- NSString *url = [(NSDictionary *)content objectForKey:\cf6 @"url"\cf4 ];\
- \
- webpageVC *webVC = [webpageVC alloc];\
- webVC.isGotoBack=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.title = [(NSDictionary *)content objectForKey:\cf6 @"title"\cf4 ];\
- webVC.url = url;\
- webVC = [webVC init];\
- [g_navigation.navigationView addSubview:webVC.view];\
- \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
- \
- \}\
- \
- \cf2 //
- \f1 \'b4\'c1\'d2\'bb\'b4\'c1\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onDidShake\cf4 :(NSNotification *)notif \{\
- JXMessageObject *msg = notif.object;\
- \
-
- \f2\b \cf8 int
- \f0\b0 \cf4 value = \cf7 0\cf4 ;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.isMySend) \{\
- value = -\cf7 50\cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- value = \cf7 50\cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.content.length>\cf7 0\cf4 ) \{\
- \cf2 // //
- \f1 \'b5\'af\'ca\'d3\'c6\'b5
- \f0 \cf4 \
- \cf2 // NSString *path = [[NSBundle mainBundle] pathForResource:@"
- \f1 \'b6\'b6\'d2\'bb\'b6\'b6\'c1\'e5\'c9\'f9
- \f0 " ofType:@"mp3"];\cf4 \
- \cf2 // JXStartSoundView *soundView=[JXStartSoundView new];\cf4 \
- \cf2 // [soundView createSoundStrUrl2:path messageText:_messageText valueInt:value];\cf4 \
- [SimpleAudioPlayer playFile:\cf6 @"
- \f1 \'b6\'b6\'d2\'bb\'b6\'b6\'c1\'e5\'c9\'f9
- \f0 .mp3"\cf4 ];\
- \
- \
- \cf2 // _palyer=[AVPlayer playerWithURL:[NSURL URLWithString:path]];\cf4 \
- \cf2 // [_palyer play];\cf4 \
- \
- CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:\cf6 @"transform.translation.x"\cf4 ];\cf12 ///
- \f1 \cf2 \'ba\'e1\'cf\'f2\'d2\'c6\'b6\'af
- \f0 \cf4 \
- \
- animation.toValue = [NSNumber numberWithInt:value];\
- \
- animation.duration = \cf7 .5\cf4 ;\
- \
- animation.removedOnCompletion =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\cf2 //yes
- \f1 \'b5\'c4\'bb\'b0\'a3\'ac\'d3\'d6\'b7\'b5\'bb\'d8\'d4\'ad\'ce\'bb\'d6\'c3\'c1\'cb\'a1\'a3
- \f0 \cf4 \
- \
- animation.repeatCount = \cf7 2\cf4 ;\
- animation.fillMode = kCAFillModeForwards;\
- \cf2 //
- \f1 \'b6\'b6\'d2\'bb\'b6\'b6\'c1\'e5\'c9\'f9
- \f0 \cf4 \
- \cf2 //
- \f1 \'cc\'ed\'bc\'d3\'d5\'f1\'b6\'af
- \f0 \cf4 \
- AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);\
- AudioServicesPlaySystemSound(\cf7 1521\cf4 );\
- [_messageText.inputView.superview.layer addAnimation:animation forKey:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_window.layer addAnimation:animation forKey:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \
- CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:\cf6 @"transform.translation.x"\cf4 ];\cf12 ///
- \f1 \cf2 \'ba\'e1\'cf\'f2\'d2\'c6\'b6\'af
- \f0 \cf4 \
- \
- animation.toValue = [NSNumber numberWithInt:value];\
- \
- animation.duration = \cf7 .5\cf4 ;\
- \
- animation.removedOnCompletion =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\cf2 //yes
- \f1 \'b5\'c4\'bb\'b0\'a3\'ac\'d3\'d6\'b7\'b5\'bb\'d8\'d4\'ad\'ce\'bb\'d6\'c3\'c1\'cb\'a1\'a3
- \f0 \cf4 \
- \
- animation.repeatCount = \cf7 2\cf4 ;\
- animation.fillMode = kCAFillModeForwards;\
- \
- AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);\
- AudioServicesPlaySystemSound(\cf7 1521\cf4 );\
- [_messageText.inputView.superview.layer addAnimation:animation forKey:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- [g_window.layer addAnimation:animation forKey:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \
- \}\
- \
- \cf2 //
- \f1 \'ba\'cf\'b2\'a2\'d7\'aa\'b7\'a2\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onDidMergeRelay\cf4 :(NSNotification *)notif \{\
- JXMessageObject *msg = notif.object;\
- SBJsonParser * parser = [[SBJsonParser alloc] init] ;\
- NSArray *content = [parser objectWithString:msg.content];\
- NSMutableArray *array = [NSMutableArray array];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i = \cf7 0\cf4 ; i < content.count; i ++) \{\
- NSString *str = content[i];\
- NSDictionary *dict = [parser objectWithString:str];\
- JXMessageObject *msg = [[JXMessageObject alloc] init];\
- [msg fromDictionary:dict];\
- msg.isNotUpdateHeight =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [array addObject:msg];\
- \}\
- \
- JXChatLogVC *vc = [[JXChatLogVC alloc] init];\
- \
- vc.array = array;\
- vc.title = msg.objectId;\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \}\
- \
- \cf2 //
- \f1 \'b7\'d6\'cf\'ed
- \f0 cell
- \f1 \'b5\'e3\'bb\'f7
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onDidShare\cf4 :(NSNotification *)notif \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- JXMessageObject *msg = notif.object;\
- NSDictionary * msgDict = [[[SBJsonParser alloc]init]objectWithString:msg.objectId];\
- \
- NSString *url = [msgDict objectForKey:\cf6 @"url"\cf4 ];\
- NSString *downloadUrl = [msgDict objectForKey:\cf6 @"downloadUrl"\cf4 ];\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([url rangeOfString:\cf6 @"http"\cf4 ].location == NSNotFound) \{\
- \
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url] options:
- \f2\b \cf8 nil
- \f0\b0 \cf4 completionHandler:^(
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 success) \{\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!success) \{\
- \
- webpageVC *webVC = [webpageVC alloc];\
- webVC.isGotoBack=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.titleString = [msgDict objectForKey:\cf6 @"title"\cf4 ];\
- webVC.url = downloadUrl;\
- webVC = [webVC init];\
- [g_navigation.navigationView addSubview:webVC.view];\
- \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
- \}\
- \
- \}];\
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- webpageVC *webVC = [webpageVC alloc];\
- webVC.isGotoBack=
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.isSend =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- webVC.titleString = [msgDict objectForKey:\cf6 @"title"\cf4 ];\
- webVC.url = url;\
- webVC = [webVC init];\
- [g_navigation.navigationView addSubview:webVC.view];\
- \cf2 // [g_navigation pushViewController:webVC animated:YES];\cf4 \
- \}\
- \
- \}\
- \
- \cf2 //
- \f1 \'bf\'d8\'d6\'c6\'cf\'fb\'cf\'a2\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onDidRemind\cf4 :(NSNotification *)notif \{\
- JXMessageObject *msg = notif.object;\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.remindType intValue] == kRoomRemind_NeedVerify) \{\
- JXVerifyDetailVC *vc = [[JXVerifyDetailVC alloc] init];\
- vc.chatVC =
- \f2\b \cf8 self
- \f0\b0 \cf4 ;\
- vc.msg = msg;\
- vc.room =
- \f2\b \cf8 self
- \f0\b0 \cf4 .room;\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msg.remindType intValue] == kWCMessageTypeRedPacketReceive) \{\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .isDidRedPacketRemind =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [g_server getRedPacket:msg.objectId toView:
- \f2\b \cf8 self
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- \cf2 //
- \f1 \'bb\'d8\'b8\'b4\'cf\'fb\'cf\'a2\'b5\'e3\'bb\'f7
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onDidReply\cf4 :(NSNotification *)notif \{\
-
- \f2\b \cf8 int
- \f0\b0 \cf4 indexNum = [notif.object intValue];\
- JXMessageObject *msg = _array[indexNum];\
- \
- JXMessageObject *msgObj = [[JXMessageObject alloc] init];\
- SBJsonParser *jsonParser = [[SBJsonParser alloc] init];\
- NSDictionary *dict = [jsonParser objectWithString:msg.objectId];\
- [msgObj fromDictionary:dict];\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (JXMessageObject *msg1
- \f2\b \cf8 in
- \f0\b0 \cf4 _array) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([msgObj.messageId isEqualToString:msg1.messageId]) \{\
- NSUInteger index = [_array indexOfObject:msg1];\
- [_table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:\cf7 0\cf4 ] atScrollPosition:UITableViewScrollPositionTop animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
- \}\
- \
- \cf2 //
- \f1 \'ce\'c4\'b1\'be\'cf\'fb\'cf\'a2\'d4\'c4\'ba\'f3\'bc\'b4\'b7\'d9
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 onDidMessageReadDel\cf4 :(NSNotification *)notif \{\
- \cf2 // int indexNum = [notif.object intValue];\cf4 \
- \cf2 // [_table reloadRow:indexNum section:0];\cf4 \
- [_table reloadData];\
- \
- \}\
- \
- \cf2 //
- \f1 \'cf\'fb\'cf\'a2\'b3\'b7\'bb\'d8
- \f0 \cf4 \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 withdrawNotifi\cf4 :(NSNotification *) notif \{\
- JXMessageObject *msg = notif.object;\
- \
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (NSInteger i=[_array count]-\cf7 1\cf4 ;i>=\cf7 0\cf4 ;i--)\{\
- JXMessageObject *p=[_array objectAtIndex:i];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([p.messageId isEqualToString:msg.messageId])\{\cf2 //
- \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
- \f0 \cf4 \
- p.content = msg.content;\
- p.type = msg.type;\
- [_table reloadRow:(
- \f2\b \cf8 int
- \f0\b0 \cf4 )i section:\cf7 0\cf4 ];\
- \}\
- p =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 enableCell\cf4 \{\
-
- \f2\b \cf8 for
- \f0\b0 \cf4 (
- \f2\b \cf8 int
- \f0\b0 \cf4 i = \cf7 0\cf4 ; i < _array.count; i++) \{\
- JXBaseChatCell *cell = [_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:\cf7 0\cf4 ]];\
- cell.bubbleBg.userInteractionEnabled = !
- \f2\b \cf8 self
- \f0\b0 \cf4 .isSelectMore;\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 createRoom\cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (recording) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- JXChatSettingVC *vc = [[JXChatSettingVC alloc] init];\
- vc.user =
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson;\
- vc.room =
- \f2\b \cf8 self
- \f0\b0 \cf4 .room;\
- vc.chatRoom =
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatRoom;\
- [g_navigation pushViewController:vc animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 ];\
- \
- \cf2 // JXSelFriendVC* vc = [JXSelFriendVC alloc];\cf4 \
- \cf12 ///
- \f3 \cf2 / vc.chatRoom = _chatRoom;
- \f0 \cf4 \
- \cf2 // vc.room = _room;\cf4 \
- \cf2 // vc.isNewRoom = YES;\cf4 \
- \cf2 // vc.isForRoom = YES;\cf4 \
- \cf2 // vc.forRoomUser = chatPerson;\cf4 \
- \cf2 // vc = [vc init];\cf4 \
- \cf12 ///
- \f3 \cf2 / [g_window addSubview:vc.view];
- \f0 \cf4 \
- \cf2 // [g_navigation pushViewController:vc animated:YES];\cf4 \
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 sendMsgCheck\cf4 \{\
- \cf2 //
- \f1 \'d1\'e9\'d6\'a4
- \f0 XMPP
- \f1 \'ca\'c7\'b7\'f1\'d4\'da\'cf\'df
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (g_xmpp.isLogined == login_status_no)\{\
- \cf2 // [self hideKeyboard:NO];\cf4 \
- \cf2 // [g_xmpp showXmppOfflineAlert];\cf4 \
- \cf2 // return YES;\cf4 \
- \
- \cf2 // [g_xmpp logout];\cf4 \
- [g_xmpp login];\
- \
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .roomJid) \{\
- NSString *s;\
- \cf2 //
- \f1 \'d1\'e9\'d6\'a4\'c8\'ba\'d7\'e9\'ca\'c7\'b7\'f1\'d3\'d0\'d0\'a7
- \f0 \cf4 \
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupStatus intValue]) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 0\cf4 :\
- s =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 1\cf4 :\
- s = Localized(\cf6 @"JX_OutOfTheGroup1"\cf4 );\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 \cf7 2\cf4 :\
- s = Localized(\cf6 @"JX_DissolutionGroup1"\cf4 );\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (!s || s.length <= \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (![g_xmpp.roomPool getRoom:
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userId] && [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.groupStatus intValue] == \cf7 0\cf4 ) \{\
- [g_xmpp.roomPool joinRoom:chatPerson.userId title:chatPerson.userNickname lastDate:
- \f2\b \cf8 nil
- \f0\b0 \cf4 isNew:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \cf2 // s = Localized(@"JX_GroupConnectionFailed");\cf4 \
- chatRoom = [[JXXMPP sharedInstance].roomPool joinRoom:chatPerson.userId title:chatPerson.userNickname lastDate:
- \f2\b \cf8 nil
- \f0\b0 \cf4 isNew:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- \}\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isDisable) \{\
- s = Localized(\cf6 @"JX_GroupNotUse"\cf4 );\
- \}\
- \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (s.length > \cf7 0\cf4 ) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 hideKeyboard:
- \f2\b \cf8 NO
- \f0\b0 \cf4 ];\
- [g_server showMsg:s];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \
- \cf2 // if (!chatRoom.isConnected) \{\cf4 \
- \cf2 // [_wait start];\cf4 \
- \cf2 // chatRoom = [[JXXMPP sharedInstance].roomPool joinRoom:chatPerson.userId title:chatPerson.userNickname isNew:NO];\cf4 \
- \cf2 // return YES;\cf4 \
- \cf2 // \}\cf4 \
- \
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userId intValue] <=\cf7 10100\cf4 && [
- \f2\b \cf8 self
- \f0\b0 \cf4 .chatPerson.userId intValue] >=\cf7 10000\cf4 ) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isGroupMessages) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \cf2 //
- \f1 \'ca\'c7\'b7\'f1\'b1\'bb\'c0\'ad\'c8\'eb\'ba\'da\'c3\'fb\'b5\'a5
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .isBeenBlack > \cf7 0\cf4 ) \{\
- [g_App showAlert:Localized(\cf6 @"TO_BLACKLIST"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \
- \cf2 // if (self.friendStatus != 2 && self.friendStatus != 10) \{\cf4 \
- \cf2 // [g_App showAlert:Localized(@"JX_NoFriendsWithMe")];\cf4 \
- \cf2 // return YES;\cf4 \
- \cf2 // \}else\cf4 \
- \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \
- - (
- \f2\b \cf8 BOOL
- \f0\b0 \cf4 )\cf11 checkCameraLimits\cf4 \{\
- \cf12 ///\cf4
- \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
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])\
- \{\
- \cf2 //
- \f1 \'d3\'c3\'bb\'a7\'ca\'c7\'b7\'f1\'d4\'ca\'d0\'ed\'c9\'e3\'cf\'f1\'cd\'b7\'ca\'b9\'d3\'c3
- \f0 \cf4 \
- NSString * mediaType = AVMediaTypeVideo;\
- AVAuthorizationStatus authorizationStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType];\
- \cf2 //
- \f1 \'b2\'bb\'d4\'ca\'d0\'ed\'b5\'af\'b3\'f6\'cc\'e1\'ca\'be\'bf\'f2
- \f0 \cf4 \
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (authorizationStatus == AVAuthorizationStatusRestricted|| authorizationStatus == AVAuthorizationStatusDenied) \{\
- \
- UIAlertController * alert = [UIAlertController alertControllerWithTitle:Localized(\cf6 @"JX_CameraNotTake"\cf4 ) message:
- \f2\b \cf8 nil
- \f0\b0 \cf4 preferredStyle:UIAlertControllerStyleAlert];\
- UIAlertAction * action = [UIAlertAction actionWithTitle:Localized(\cf6 @"JXSettingVC_Set"\cf4 ) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) \{\
- \cf2 //
- \f1 \'ce\'de\'c8\'a8\'cf\'de
- \f0
- \f1 \'d2\'fd\'b5\'bc\'c8\'a5\'bf\'aa\'c6\'f4
- \f0 \cf4 \
- NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([[UIApplication sharedApplication] canOpenURL:url]) \{\
- [[UIApplication sharedApplication] openURL:url];\
- \}\
- \}];\
- UIAlertAction * actionCancel = [UIAlertAction actionWithTitle:Localized(\cf6 @"JX_Cencal"\cf4 ) style:UIAlertActionStyleCancel handler:^(UIAlertAction *
- \f2\b \cf8 _Nonnull
- \f0\b0 \cf4 action) \{\
- \}];\
- [alert addAction:action];\
- [alert addAction:actionCancel];\
- \
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 presentViewController:alert animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 completion:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 //
- \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
- \f0 \cf4 \
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- \}\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- \cf2 //
- \f1 \'d3\'b2\'bc\'fe\'ce\'ca\'cc\'e2\'cc\'e1\'ca\'be
- \f0 \cf4 \
- [g_App showAlert:Localized(\cf6 @"JX_CameraBad"\cf4 )];\
-
- \f2\b \cf8 return
- \f0\b0 \cf4
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 showCallMsg\cf4 :(NSNotification *)notifice\{\
- JXMessageObject *msg = (JXMessageObject *)notifice.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg==
- \f2\b \cf8 nil
- \f0\b0 \cf4 )\{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- _messageText.text = msg.content;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendIt:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 addWaitGroupSendViewWithMsgNum\cf4 :(NSInteger )msgNum \cf11 withType\cf4 :(NSInteger )type\{\
- _sendedNum = \cf7 0\cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupMessagesIndex = \cf7 0\cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendMsgArray =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- _groupSendType = type;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendAllNum =
- \f2\b \cf8 self
- \f0\b0 \cf4 .userIds.count * msgNum;\
- _isGroupSendCancel =
- \f2\b \cf8 NO
- \f0\b0 \cf4 ;\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .imgsAndVideosDic =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView = [[UIView alloc] initWithFrame:
- \f2\b \cf8 self
- \f0\b0 \cf4 .view.bounds];\
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView.backgroundColor = [UIColor clearColor];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .view addSubview:
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .view bringSubviewToFront:
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView];\
- \
- UIView *centerView = [[UIView alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 0\cf4 , \cf7 100\cf4 , \cf7 80\cf4 )];\
- centerView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:\cf7 0.5\cf4 ];\
- centerView.layer.cornerRadius = \cf7 5.f\cf4 ;\
- centerView.layer.masksToBounds =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView addSubview:centerView];\
- centerView.center =
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView.center;\
- \
- UILabel *lab = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 20\cf4 , \cf7 100\cf4 , \cf7 20\cf4 )];\
- [lab setTextColor:[UIColor whiteColor]];\
- [lab setFont:g_factory.font12];\
- [lab setText:\cf6 @"
- \f1 \'d5\'fd\'d4\'da\'b7\'a2\'cb\'cd\'a3\'ba
- \f0 "\cf4 ];\
- [lab setTextAlignment:NSTextAlignmentCenter];\
- [lab setBackgroundColor:[UIColor clearColor]];\
- [centerView addSubview:lab];\
- \
-
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendLable = [[UILabel alloc] initWithFrame:CGRectMake(\cf7 0\cf4 , \cf7 40\cf4 , \cf7 100\cf4 , \cf7 20\cf4 )];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendLable setTextAlignment:NSTextAlignmentCenter];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendLable setBackgroundColor:[UIColor clearColor]];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendLable setTextColor:[UIColor whiteColor]];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendLable setFont:g_factory.font12];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendLable setText:[NSString stringWithFormat:\cf6 @"%ld/%ld"\cf4 ,(
- \f2\b \cf8 long
- \f0\b0 \cf4 )_sendedNum,(
- \f2\b \cf8 long
- \f0\b0 \cf4 )
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendAllNum]];\
- [centerView addSubview:
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendLable];\
- \
- UIButton *cancelButton = [[UIButton alloc] initWithFrame:CGRectMake(\cf7 85\cf4 , \cf7 5\cf4 , \cf7 10\cf4 , \cf7 10\cf4 )];\
- [cancelButton setImage:[UIImage imageNamed:\cf6 @"close_preview"\cf4 ] forState:UIControlStateNormal];\
- [cancelButton addTarget:
- \f2\b \cf8 self
- \f0\b0 \cf4 action:
- \f2\b \cf8 @selector
- \f0\b0 \cf4 (groupSendCancel) forControlEvents:UIControlEventTouchUpInside];\
- [centerView addSubview:cancelButton];\
- \
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 groupSendCancel\cf4 \{\
- UIAlertController *alert = [[UIAlertController alloc] init];\
- alert.title = \cf6 @"
- \f1 \'ca\'c7\'b7\'f1\'cd\'a3\'d6\'b9\'b7\'a2\'cb\'cd
- \f0 "\cf4 ;\
- UIAlertAction *cancel = [UIAlertAction actionWithTitle:\cf6 @"
- \f1 \'c8\'a1\'cf\'fb
- \f0 "\cf4 style:UIAlertActionStyleCancel handler:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- UIAlertAction *ok = [UIAlertAction actionWithTitle:\cf6 @"
- \f1 \'c8\'b7\'c8\'cf
- \f0 "\cf4 style:UIAlertActionStyleDefault handler:^(UIAlertAction *
- \f2\b \cf8 _Nonnull
- \f0\b0 \cf4 action) \{\
- _isGroupSendCancel =
- \f2\b \cf8 YES
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView removeFromSuperview];\
- \}];\
- [alert addAction:cancel];\
- [alert addAction:ok];\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 presentViewController:alert animated:
- \f2\b \cf8 YES
- \f0\b0 \cf4 completion:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 keepOnGroupSend\cf4 :(NSNotification *)notifice\{\
- _sendedNum ++;\
- JXMessageObject *msg = (JXMessageObject *)notifice.object;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendLable setText:[NSString stringWithFormat:\cf6 @"%ld/%ld"\cf4 ,(
- \f2\b \cf8 long
- \f0\b0 \cf4 )_sendedNum,(
- \f2\b \cf8 long
- \f0\b0 \cf4 )
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendAllNum]];\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_sendedNum ==
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendAllNum) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendView removeFromSuperview];\
- [g_App showAlert:Localized(\cf6 @"JX_SendComplete"\cf4 )];\
- \}\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (msg.isLastGroupSend) \{\
-
- \f2\b \cf8 switch
- \f0\b0 \cf4 (_groupSendType) \{\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 groupsend_msgType_text:\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendIt:
- \f2\b \cf8 nil
- \f0\b0 \cf4 ];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 groupsend_msgType_shake:\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onShake];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 groupsend_msgType_addressbook:\{\
- JXSelectAddressBookVC *selectVC =
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray.lastObject;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 selectAddressBookVC:selectVC doneAction:
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendMsgArray];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 groupsend_msgType_card:\{\
- JXSelectFriendsVC *vc =
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendMsgArray.lastObject;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onAfterAddMember:vc];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 groupsend_msgType_collect:\{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ([
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendMsgArray.lastObject isKindOfClass:[WeiboData
- \f2\b \cf8 class
- \f0\b0 \cf4 ]]) \{\
- WeiboData *data =
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendMsgArray.lastObject;\
- WeiboViewControlle *vc =
- \f2\b \cf8 nil
- \f0\b0 \cf4 ;\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 weiboVC:vc didSelectWithData:data];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4 \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 collectionMsgSendAll:
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendMsgArray];\
- \}\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 case
- \f0\b0 \cf4 groupsend_msgType_location:\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 onSelLocation:
- \f2\b \cf8 self
- \f0\b0 \cf4 .mapData];\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
-
- \f2\b \cf8 default
- \f0\b0 \cf4 :\
-
- \f2\b \cf8 break
- \f0\b0 \cf4 ;\
- \}\
- \}\
- \}\
- \
- - (
- \f2\b \cf8 void
- \f0\b0 \cf4 )\cf11 keepOnUplpadGroupSend\cf4 \{\
- _sendedNum++;\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_sendedNum >
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendAllNum) \{\
-
- \f2\b \cf8 return
- \f0\b0 \cf4 ;\
- \}\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 .waitGroupSendLable setText:[NSString stringWithFormat:\cf6 @"%ld/%ld"\cf4 ,(
- \f2\b \cf8 long
- \f0\b0 \cf4 )_sendedNum,(
- \f2\b \cf8 long
- \f0\b0 \cf4 )
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupSendAllNum]];\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_sendedNum %
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray.count == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 ((_sendedNum /
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray.count) % _onceSendNum == \cf7 0\cf4 ) \{\
-
- \f2\b \cf8 if
- \f0\b0 \cf4 (_groupSendType == groupsend_msgType_image) \{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendPhotos:
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray withOriginal:_isOriginal];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (_groupSendType == groupsend_msgType_video)\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendMedias:
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray isSave:_isOriginal];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (_groupSendType == groupsend_msgType_audio)\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendVoices:
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (_groupSendType == groupsend_msgType_file)\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendFiles:
- \f2\b \cf8 self
- \f0\b0 \cf4 .groupUploadObjArray];\
- \}
- \f2\b \cf8 else
- \f0\b0 \cf4
- \f2\b \cf8 if
- \f0\b0 \cf4 (_groupSendType == groupsend_msgType_imagesAndVideos)\{\
- [
- \f2\b \cf8 self
- \f0\b0 \cf4 sendImagesAndVideos:
- \f2\b \cf8 self
- \f0\b0 \cf4 .imgsAndVideosDic];\
- \}\
- \}\
- \}\
- \}\
- \cf2 //\cf4 \
- \cf2 //\cf4 \
- \cf2 //\cf4 \
- \f2\b \cf8 @end
- \f0\b0 \cf4 \
- }
|