| | | |
Offset 1, 18 lines modified | Offset 1, 18 lines modified |
| |
1 | package·com.perflyst.twire.adapters; | 1 | package·com.perflyst.twire.adapters; |
| |
2 | import·android.view.LayoutInflater; | 2 | import·android.view.LayoutInflater; |
3 | import·android.view.ViewGroup; | 3 | import·android.view.ViewGroup; |
4 | import·android.widget.TextView; | 4 | import·android.widget.TextView; |
5 | import·com.perflyst.twire.model.Emote; | 5 | import·com.perflyst.twire.model.Emote; |
| 6 | import·com.perflyst.twire.service.Service; |
6 | import·android.view.View$OnClickListener; | 7 | import·android.view.View$OnClickListener; |
7 | import·android.text.method.LinkMovementMethod; | 8 | import·android.text.method.LinkMovementMethod; |
8 | import·android.text.style.RelativeSizeSpan; | 9 | import·android.text.style.RelativeSizeSpan; |
9 | import·com.perflyst.twire.service.Service; | |
10 | import·com.perflyst.twire.model.ChatEmote; | 10 | import·com.perflyst.twire.model.ChatEmote; |
11 | import·android.text.style.StyleSpan; | 11 | import·android.text.style.StyleSpan; |
12 | import·android.text.style.ForegroundColorSpan; | 12 | import·android.text.style.ForegroundColorSpan; |
13 | import·com.perflyst.twire.misc.GlideImageSpan; | 13 | import·com.perflyst.twire.misc.GlideImageSpan; |
14 | import·com.perflyst.twire.model.Badge; | 14 | import·com.perflyst.twire.model.Badge; |
15 | import·androidx.recyclerview.widget.RecyclerView$ViewHolder; | 15 | import·androidx.recyclerview.widget.RecyclerView$ViewHolder; |
16 | import·android.view.View; | 16 | import·android.view.View; |
Offset 47, 27 lines modified | Offset 47, 26 lines modified |
47 | ···· | 47 | ···· |
48 | ····public·ChatAdapter(final·ChatRecyclerView·mRecyclerView,·Activity·context,·final·ChatAdapter$ChatAdapterCallback·mCallback)·{ | 48 | ····public·ChatAdapter(final·ChatRecyclerView·mRecyclerView,·Activity·context,·final·ChatAdapter$ChatAdapterCallback·mCallback)·{ |
49 | ········this.LOG_TAG·=·this.getClass().getSimpleName(); | 49 | ········this.LOG_TAG·=·this.getClass().getSimpleName(); |
50 | ········this.messages·=·new·ArrayList(); | 50 | ········this.messages·=·new·ArrayList(); |
51 | ········this.mRecyclerView·=·mRecyclerView; | 51 | ········this.mRecyclerView·=·mRecyclerView; |
52 | ········this.context·=·context; | 52 | ········this.context·=·context; |
53 | ········this.mCallback·=·mCallback; | 53 | ········this.mCallback·=·mCallback; |
54 | ········context·=·this.context; | |
55 | ········final·Settings·settings·=·new·Settings((Context)context); | 54 | ········final·Settings·settings·=·new·Settings((Context)context); |
56 | ········this.settings·=·settings; | 55 | ········this.settings·=·settings; |
57 | ········final·String·theme·=·settings.getTheme(); | 56 | ········final·String·theme·=·settings.getTheme(); |
58 | ········context·=·this.context; | 57 | ········context·=·this.context; |
59 | ········boolean·isNightTheme·=·false; | 58 | ········boolean·isNightTheme·=·false; |
60 | ········Label_0152:·{ | 59 | ········Label_0147:·{ |
61 | ············if·(!theme.equals(context.getString(2131689714)))·{ | 60 | ············if·(!theme.equals(context.getString(2131689714)))·{ |
62 | ················final·String·theme2·=·this.settings.getTheme(); | 61 | ················final·String·theme2·=·this.settings.getTheme(); |
63 | ················context·=·this.context; | 62 | ················context·=·this.context; |
64 | ················if·(!theme2.equals(context.getString(2131689854)))·{ | 63 | ················if·(!theme2.equals(context.getString(2131689854)))·{ |
65 | ····················isNightTheme·=·false; | 64 | ····················isNightTheme·=·false; |
66 | ····················break·Label_0152; | 65 | ····················break·Label_0147; |
67 | ················} | 66 | ················} |
68 | ············} | 67 | ············} |
69 | ············isNightTheme·=·true; | 68 | ············isNightTheme·=·true; |
70 | ········} | 69 | ········} |
71 | ········this.isNightTheme·=·isNightTheme; | 70 | ········this.isNightTheme·=·isNightTheme; |
72 | ····} | 71 | ····} |
73 | ···· | 72 | ···· |
Offset 275, 15 lines modified | Offset 274, 15 lines modified |
275 | ····················································································································} | 274 | ····················································································································} |
276 | ····················································································································final·ChatEmote·chatEmote·=·(ChatEmote)iterator2.next(); | 275 | ····················································································································final·ChatEmote·chatEmote·=·(ChatEmote)iterator2.next(); |
277 | ····················································································································try·{ | 276 | ····················································································································try·{ |
278 | ························································································································final·int[]·positions·=·chatEmote.getPositions(); | 277 | ························································································································final·int[]·positions·=·chatEmote.getPositions(); |
279 | ························································································································try·{ | 278 | ························································································································try·{ |
280 | ····························································································································int·length2·=·positions.length; | 279 | ····························································································································int·length2·=·positions.length; |
281 | ····························································································································int·i·=·0; | 280 | ····························································································································int·i·=·0; |
282 | ························································································································Block_69_Outer: | 281 | ························································································································Label_0930_Outer: |
283 | ····························································································································while·(i·<·length2)·{ | 282 | ····························································································································while·(i·<·length2)·{ |
284 | ································································································································final·int·j·=·positions[i]; | 283 | ································································································································final·int·j·=·positions[i]; |
285 | ································································································································try·{ | 284 | ································································································································try·{ |
286 | ····································································································································final·Integer·value2·=·Integer.valueOf(j); | 285 | ····································································································································final·Integer·value2·=·Integer.valueOf(j); |
287 | ····································································································································try·{ | 286 | ····································································································································try·{ |
288 | ········································································································································final·Emote·emote·=·chatEmote.getEmote(); | 287 | ········································································································································final·Emote·emote·=·chatEmote.getEmote(); |
289 | ········································································································································try·{ | 288 | ········································································································································try·{ |
Offset 318, 46 lines modified | Offset 317, 44 lines modified |
318 | ································································································································································final·GlideImageSpan·glideImageSpan4·=·glideImageSpan2; | 317 | ································································································································································final·GlideImageSpan·glideImageSpan4·=·glideImageSpan2; |
319 | ································································································································································final·int·n7·=·length2; | 318 | ································································································································································final·int·n7·=·length2; |
320 | ································································································································································new·GlideImageSpan(context3,·emoteUrl,·access$000,·text,·n5,·n6); | 319 | ································································································································································new·GlideImageSpan(context3,·emoteUrl,·access$000,·text,·n5,·n6); |
321 | ································································································································································ChatAdapter$ContactViewHolder.access$000(chatAdapter$ContactViewHolder).setTextIsSelectable((boolean)(textIsSelectable·!=·0)); | 320 | ································································································································································ChatAdapter$ContactViewHolder.access$000(chatAdapter$ContactViewHolder).setTextIsSelectable((boolean)(textIsSelectable·!=·0)); |
322 | ································································································································································text.setSpan((Object)glideImageSpan4,·n3·+·2,·n4·+·1·+·2,·18); | 321 | ································································································································································text.setSpan((Object)glideImageSpan4,·n3·+·2,·n4·+·1·+·2,·18); |
323 | ································································································································································++i; | 322 | ································································································································································++i; |
324 | ································································································································································length2·=·n7; | 323 | ································································································································································length2·=·n7; |
325 | ································································································································································continue·Block_69_Outer; | 324 | ································································································································································continue·Label_0930_Outer; |
326 | ································································································································································//·iftrue(Label_0930:,·!chatMessage.isHighlight()) | |
327 | ····························································································································································Label_0930: | |
328 | ································································································································································while·(true)·{ | 325 | ································································································································································while·(true)·{ |
329 | ····································································································································································ChatAdapter$ContactViewHolder.access$000(chatAdapter$ContactViewHolder).setBackgroundColor(Service.getColorAttribute(2130968742,·2131099672,·(Context)this.context)); | |
330 | ····································································································································································break·Label_0930; | |
331 | ····································································································································································continue; | |
332 | ································································································································································} | |
333 | ································································································································································try·{ | |
334 | ····································································································································································text.setSpan((Object)new·RelativeSizeSpan(this.getTextSize()),·0,·text.length(),·33); | |
335 | ····································································································································································ChatAdapter$ContactViewHolder.access$000(chatAdapter$ContactViewHolder).setText((CharSequence)text); | |
336 | ····································································································································································final·TextView·access$2·=·ChatAdapter$ContactViewHolder.access$000(chatAdapter$ContactViewHolder); | |
337 | ····································································································································································try·{ | 326 | ····································································································································································try·{ |
338 | ········································································································································································access$2.setMovementMethod(LinkMovementMethod.getInstance()); | 327 | ········································································································································································text.setSpan((Object)new·RelativeSizeSpan(this.getTextSize()),·0,·text.length(),·33); |
| 328 | ········································································································································································ChatAdapter$ContactViewHolder.access$000(chatAdapter$ContactViewHolder).setText((CharSequence)text); |
339 | ········································································································································································final·TextView·access$3·=·ChatAdapter$ContactViewHolder.access$000(chatAdapter$ContactViewHolder); | 329 | ········································································································································································final·TextView·access$2·=·ChatAdapter$ContactViewHolder.access$000(chatAdapter$ContactViewHolder); |
340 | ········································································································································································try·{ | 330 | ········································································································································································try·{ |
341 | ············································································································································································final·-$$Lambda$ChatAdapter$hYagX6MSaf_0FFAMhpKB4gRSVyM·onClickListener·=·new·-$$Lambda$ChatAdapter$hYagX6MSaf_0FFAMhpKB4gRSVyM(this,·text,·chatMessage); | |
342 | ············································································································································································final·TextView·textView·=·access$3; | 331 | ············································································································································································access$2.setMovementMethod(LinkMovementMethod.getInstance()); |
| 332 | ············································································································································································final·TextView·access$3·=·ChatAdapter$ContactViewHolder.access$000(chatAdapter$ContactViewHolder); |
343 | ············································································································································································try·{ | 333 | ············································································································································································try·{ |
| 334 | ················································································································································································final·-$$Lambda$ChatAdapter$hYagX6MSaf_0FFAMhpKB4gRSVyM·onClickListener·=·new·-$$Lambda$ChatAdapter$hYagX6MSaf_0FFAMhpKB4gRSVyM(this,·text,·chatMessage); |
| 335 | ················································································································································································final·TextView·textView·=·access$3; |
| 336 | ················································································································································································try·{ |
344 | ················································································································································································textView.setOnClickListener((View$OnClickListener)onClickListener); | 337 | ····················································································································································································textView.setOnClickListener((View$OnClickListener)onClickListener); |
345 | ············································································································································································} | 338 | ················································································································································································} |
346 | ············································································································································································catch·(Exception·ex)·{ | 339 | ················································································································································································catch·(Exception·ex)·{ |
347 | ················································································································································································Log.d(this.LOG_TAG,·"Failed·to·show·Message"); | 340 | ····················································································································································································Log.d(this.LOG_TAG,·"Failed·to·show·Message"); |
348 | ················································································································································································ex.printStackTrace(); | 341 | ····················································································································································································ex.printStackTrace(); |
| 342 | ················································································································································································} |
349 | ············································································································································································} | 343 | ············································································································································································} |
| 344 | ············································································································································································catch·(Exception·ex2)·{} |
350 | ········································································································································································} | 345 | ········································································································································································} |
351 | ········································································································································································catch·(Exception·ex2)·{} | 346 | ········································································································································································catch·(Exception·ex3)·{} |
352 | ····································································································································································} | 347 | ····································································································································································} |
353 | ····································································································································································catch·(Exception·ex3)·{} | 348 | ····································································································································································catch·(Exception·ex4)·{} |
| 349 | ····································································································································································ChatAdapter$ContactViewHolder.access$000(chatAdapter$ContactViewHolder).setBackgroundColor(Service.getColorAttribute(2130968742,·2131099672,·(Context)this.context)); |
| 350 | ····································································································································································continue; |
354 | ································································································································································} | 351 | ································································································································································} |
355 | ································································································································································catch·(Exception·ex4)·{} | |
356 | ····························································································································································} | 352 | ····························································································································································} |
| 353 | ····························································································································································//·iftrue(Label_0930:,·!chatMessage.isHighlight()) |
357 | ····························································································································································catch·(Exception·ex5)·{} | 354 | ····························································································································································catch·(Exception·ex5)·{} |
358 | ························································································································································} | 355 | ························································································································································} |
359 | ························································································································································catch·(Exception·ex6)·{} | 356 | ························································································································································catch·(Exception·ex6)·{} |
360 | ····················································································································································} | 357 | ····················································································································································} |
361 | ····················································································································································catch·(Exception·ex7)·{} | 358 | ····················································································································································catch·(Exception·ex7)·{} |
362 | ················································································································································} | 359 | ················································································································································} |
363 | ················································································································································catch·(Exception·ex8)·{} | 360 | ················································································································································catch·(Exception·ex8)·{} |