changeset 2567:19d82c1f135f

Android: Fix incorrect display of first container entry with the new layout code. Guess it is safe to return 0 from getCount(), we had been returning 1 if the list was empty, causing the first entry being created before columns were setup.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 19 May 2021 20:37:23 +0000
parents 4427af56eebe
children b536b7b21682
files android/DWindows.kt
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/android/DWindows.kt	Wed May 19 20:13:11 2021 +0000
+++ b/android/DWindows.kt	Wed May 19 20:37:23 2021 +0000
@@ -629,11 +629,7 @@
     var simpleMode: Boolean = true
 
     override fun getCount(): Int {
-        val count = model.numberOfRows()
-        if(count > 0) {
-            return count
-        }
-        return 1
+        return model.numberOfRows()
     }
 
     override fun getItem(position: Int): Any? {