-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blank screen#240 fix #241
base: main
Are you sure you want to change the base?
Blank screen#240 fix #241
Changes from 2 commits
0a6e970
fbdc3a5
4c0789a
99472ec
70d2156
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -65,13 +65,21 @@ protected void onStart() { | |||||
RoomDb.databaseWriteExecutor.execute(() -> { | ||||||
List<Application> applications = applicationDao.loadAll(); | ||||||
Log.d(getClass().getName(), "applications.size(): " + applications.size()); | ||||||
applicationListAdapter.setApplications(applications); | ||||||
|
||||||
if(null!=applications) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok i will update it. |
||||||
applicationListAdapter.setApplications(applications); | ||||||
nya-elimu marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
} | ||||||
List<ApplicationVersion> applicationVersions = applicationVersionDao.loadAll(); | ||||||
Log.d(getClass().getName(), "applicationVersions.size(): " + applicationVersions.size()); | ||||||
applicationListAdapter.setApplicationVersions(applicationVersions); | ||||||
|
||||||
applicationListAdapter.notifyDataSetChanged(); | ||||||
|
||||||
recyclerView.post(new Runnable() { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To avoid the dependence on
Suggested change
|
||||||
@Override | ||||||
public void run() { | ||||||
applicationListAdapter.notifyDataSetChanged(); | ||||||
nya-elimu marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
} | ||||||
}); | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
}); | ||||||
} | ||||||
} | ||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was
runOnUiThread
added?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While running application on local i faced an issue where after coming back to app it was running on different thread while loading data on to Screen. So i used runOnUiThread to in UI thread.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arvind-1 Are you saying that the application was already downloading content from the REST API when you came back to the app after having opened it previously? If that's the case, maybe it would be better if we implement code that will cancel the download if the user leaves the activity (
onStop()
) before the download completes?CC @gscdev