{ "id": "171391", "key": "TIMOB-25903", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20102", "name": "Release 7.1.1", "archived": false, "released": true, "releaseDate": "2018-05-02" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-03-27T23:30:02.000+0000", "created": "2018-03-23T17:18:19.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "regression", "tableview", "updateRow" ], "versions": [ { "id": "19957", "description": "", "name": "Release 7.1.0", "archived": false, "released": true, "releaseDate": "2018-03-14" } ], "issuelinks": [], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2018-04-23T18:00:39.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Updating a tableViewRow with updateRow method doesn't update desired row on Android using Titanium SDK 7.1.0.GA. It works fine on SDK 7.0.3.v20180226072443 and 6.3.1\r\nOn iOS it works on every mentioned SDK.\r\n\r\n*update*: It is something regarding \"run-on-main-thread\". Having it turned off blocks row of being updated. Is there a reason for this?\r\n\r\nHow to test it:\r\n\r\n\r\n{code:java}\r\n\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white'});\r\n\r\nvar rowData = [];\r\nvar row = Ti.UI.createTableViewRow({\r\n height: 120,\r\n title: 'ROW #00'\r\n});\r\nrowData.push(row);\r\n\r\nvar table = Ti.UI.createTableView({\r\n top: 50,\r\n height: 120,\r\n data: rowData\r\n});\r\ntable.addEventListener( 'click', function(e) {\r\n console.log(' ***** click on table ');\r\n});\r\nwin.add(table);\r\n\r\nvar bt = Ti.UI.createButton({\r\n top: 200,\r\n title: 'UPDATE ROW'\r\n});\r\n\r\nbt.addEventListener('click',function(e){\r\n var newRow = Ti.UI.createTableViewRow({\r\n height: 120,\r\n title: 'NEW ROW'\r\n });\r\n table.updateRow(0,newRow);\r\n});\r\nwin.add(bt);\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\nExpected result: Row on index 0 should be updated with a new one with the title \"NEW ROW\"\r\nCurrent result: First row is not updated and the click event is not fired at all\r\n", "attachment": [], "flagged": false, "summary": "Android: TableView.updateRow() not working in 7.1.0 if \"run-on-main-thread\" is false", "creator": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "435988", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (7.1.x): https://github.com/appcelerator/titanium_mobile/pull/9963", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-27T19:27:00.000+0000", "updated": "2018-03-27T19:27:00.000+0000" }, { "id": "435999", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed. PR's merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-27T23:29:57.000+0000", "updated": "2018-03-27T23:29:57.000+0000" }, { "id": "436654", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with SDK 7.2.0.v20180409070600 & 7.1.1.v20180406141533.\r\n\r\nClosing.\r\n\r\nStudio Ver: 5.1.0\r\nSDK Ver: 7.2.0.v20180409070600\r\nOS Ver: 10.13.2\r\nXcode Ver: Xcode 9.3\r\nAppc NPM: 4.2.13-2\r\nAppc CLI: 7.0.3-master.34\r\nDaemon Ver: 1.0.1\r\nTi CLI Ver: 5.1.0\r\nAlloy Ver: 1.11.0\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 10\r\nDevices: ⇨ google Nexus 5 --- Android 6.0.1\r\n ⇨ google Nexus 6P --- Android 8.0.0", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-09T17:42:51.000+0000", "updated": "2018-04-09T17:42:51.000+0000" }, { "id": "437069", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Awesome!\r\nBTW, what \"nativeTableViewReference.setModelDirty()\" is supposed to do?\r\n\r\nThanks!", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-23T08:53:29.000+0000", "updated": "2018-04-23T08:53:29.000+0000" }, { "id": "437075", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The {{setModelDirty()}} flags that the data for the TableView has changed and the UI needs to be updated via Android's \"adapter\" pattern. It's an optimization. The issue was that there was 1 spot in the code where we forgot to flag that the TableView needs updating after our last refactoring of the code.\r\n\r\nSorry about the issue and thanks for reporting it.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-23T18:00:39.000+0000", "updated": "2018-04-23T18:00:39.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }