~singpolyma/cheogram-android

7b59d2be84689c200fca39515ffc92f103885d30 — Stephen Paul Weber 3 months ago 2483f4f
Table view tweaks
M src/cheogram/res/layout/command_result_cell.xml => src/cheogram/res/layout/command_result_cell.xml +3 -0
@@ 7,6 7,9 @@
        android:textIsSelectable="true"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingLeft="8dp"
        android:paddingRight="8dp"
        android:paddingBottom="8dp"
        android:textAppearance="@style/TextAppearance.Conversations.Body1"
        android:textColor="?attr/edit_text_color" />


M src/main/java/eu/siacs/conversations/entities/Conversation.java => src/main/java/eu/siacs/conversations/entities/Conversation.java +3 -3
@@ 2271,7 2271,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
                        }

                        if (el.getName().equals("reported") || el.getName().equals("item")) {
                            if ((layoutManager == null ? 1 : layoutManager.getSpanCount()) < 2) {
                            if ((layoutManager == null ? 1 : layoutManager.getSpanCount()) < reported.size()) {
                                if (el.getName().equals("reported")) continue;
                                i += 1;
                            } else {


@@ 2308,7 2308,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
                                Cell cell = null;

                                if (reported != null) {
                                    if ((layoutManager == null ? 1 : layoutManager.getSpanCount()) < 2) {
                                    if ((layoutManager == null ? 1 : layoutManager.getSpanCount()) < reported.size()) {
                                        if (el.getName().equals("reported")) continue;
                                        if (i == position) {
                                            items.put(position, new Item(el, TYPE_ITEM_CARD));


@@ 2524,7 2524,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
                        (a, b) -> a + b
                    );

                    spanCount = tableHeaderWidth > 0.75 * screenWidth ? 1 : this.reported.size();
                    spanCount = tableHeaderWidth > 0.65 * screenWidth ? 1 : this.reported.size();
                }

                if (layoutManager != null && layoutManager.getSpanCount() != spanCount) {