File tree Expand file tree Collapse file tree
app/src/main/java/co/tinode/tindroid
tinodesdk/src/main/java/co/tinode/tinodesdk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,5 +60,5 @@ Pull requests with translations are welcome. See [Russian translation](app/src/m
6060
6161
6262## Screenshots
63- <img src =" android-contacts.png " alt =" App screenshot - contacts " width =" 270 " /> <img src =" android-chat.png " alt =" App screenshot - chat " width =" 270 " /> <img src =" android-topic-info.png " alt =" App screenshot - chat settings " width =" 270 " />
63+ <img src =" android-contacts.png " alt =" App screenshot - chat list " width =" 270 " /> <img src =" android-chat.png " alt =" App screenshot - chat " width =" 270 " /> <img src =" android-topic-info.png " alt =" App screenshot - chat settings " width =" 270 " />
6464<img src =" android-account.png " alt =" App screenshot - account info " width =" 270 " /> <img src =" android-find-people.png " alt =" App screenshot - searching for contacts " width =" 270 " /> <img src =" android-new-topic.png " alt =" App screenshot - creating new topic " width =" 270 " />
Original file line number Diff line number Diff line change @@ -74,10 +74,8 @@ public boolean isIncluded(Topic t) {
7474 });
7575
7676 final HashMap <String ,Integer > newTopicIndex = new HashMap <>(newTopics .size ());
77- int i = 0 ;
7877 for (Topic t : newTopics ) {
79- newTopicIndex .put (t .getName (), i );
80- i ++;
78+ newTopicIndex .put (t .getName (), newTopicIndex .size ());
8179 }
8280
8381 activity .runOnUiThread (new Runnable () {
Original file line number Diff line number Diff line change 2929import android .view .animation .Animation ;
3030
3131import androidx .appcompat .widget .AppCompatImageView ;
32- import androidx .core .content .ContextCompat ;
3332import androidx .core .view .ViewCompat ;
3433
3534/**
3635 * This ImageView is used to display circular progress indicator. It matches the one in SwipeRefreshLayout.
3736 *
38- * Copied from android/9.0.0/androidx/swiperefreshlayout/widget/circleimageview.java
37+ * Adopted from android/9.0.0/androidx/swiperefreshlayout/widget/circleimageview.java
3938 */
4039public class CircleImageView extends AppCompatImageView {
4140
4241 private static final int CIRCLE_BG_LIGHT = 0xFFFAFAFA ;
4342
43+ // Default offset in dips from the top of the view to where the progress spinner should appear.
44+ private static final int DEFAULT_CIRCLE_TARGET = 64 ;
45+
4446 private static final int KEY_SHADOW_COLOR = 0x1E000000 ;
4547 private static final int FILL_SHADOW_COLOR = 0x3D000000 ;
4648 // PX
@@ -115,15 +117,6 @@ public void onAnimationEnd() {
115117 }
116118 }
117119
118- /**
119- * Update the background color of the circle image view.
120- *
121- * @param colorRes Id of a color resource.
122- */
123- public void setBackgroundColorRes (int colorRes ) {
124- setBackgroundColor (ContextCompat .getColor (getContext (), colorRes ));
125- }
126-
127120 @ Override
128121 public void setBackgroundColor (int color ) {
129122 if (getBackground () instanceof ShapeDrawable ) {
Original file line number Diff line number Diff line change @@ -1504,7 +1504,7 @@ public <T extends Topic> List<T> getFilteredTopics(TopicFilter filter) {
15041504 }
15051505
15061506 /**
1507- * Start tracking topic.
1507+ * Start tracking topic: add it to in-memory cache .
15081508 */
15091509 void startTrackingTopic (final Topic topic ) {
15101510 final String name = topic .getName ();
@@ -1516,7 +1516,7 @@ void startTrackingTopic(final Topic topic) {
15161516 }
15171517
15181518 /**
1519- * Stop tracking the topic, delete it from local storage .
1519+ * Stop tracking the topic: remove it from in-memory cache .
15201520 */
15211521 void stopTrackingTopic (String topicName ) {
15221522 mTopics .remove (topicName );
You can’t perform that action at this time.
0 commit comments