修复 社区Tab崩溃的问题
This commit is contained in:
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@@ -131,7 +131,7 @@ public class TinySign {
|
||||
zipAndSha1(dir, zos, dos, manifest);
|
||||
Attributes main = manifest.getMainAttributes();
|
||||
main.putValue("Manifest-Version", "1.0");
|
||||
main.putValue("Created-By", "tiny-sign-" + TinySign.class.getPackage().getImplementationVersion());
|
||||
main.putValue("Created-By", "Auto.js");
|
||||
zos.putNextEntry(new ZipEntry("META-INF/MANIFEST.MF"));
|
||||
manifest.write(dos);
|
||||
zos.closeEntry();
|
||||
|
||||
@@ -129,12 +129,12 @@ public class CommunityFragment extends ViewPagerFragment implements BackPressedH
|
||||
@Override
|
||||
public void onPageShow() {
|
||||
super.onPageShow();
|
||||
EventBus.getDefault().post(new VisibilityChange(true));
|
||||
//EventBus.getDefault().post(new VisibilityChange(true));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageHide() {
|
||||
super.onPageHide();
|
||||
EventBus.getDefault().post(new VisibilityChange(false));
|
||||
//EventBus.getDefault().post(new VisibilityChange(false));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class CommunityDrawerMenu {
|
||||
if (online) {
|
||||
refreshNotificationCount(adapter);
|
||||
}
|
||||
});
|
||||
}, Throwable::printStackTrace);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -44,11 +44,15 @@ class MarketFragment : ViewPagerFragment(0) {
|
||||
private fun refresh() {
|
||||
GlobalScope.launch(Dispatchers.Main) {
|
||||
swipeRefreshLayout.isRefreshing = true
|
||||
val topics = TopicService.getScriptsTopics()
|
||||
mTopics.clear()
|
||||
mTopics.addAll(topics)
|
||||
topicsView.adapter!!.notifyDataSetChanged()
|
||||
swipeRefreshLayout.isRefreshing = false
|
||||
try {
|
||||
val topics = TopicService.getScriptsTopics()
|
||||
mTopics.clear()
|
||||
mTopics.addAll(topics)
|
||||
topicsView.adapter!!.notifyDataSetChanged()
|
||||
swipeRefreshLayout.isRefreshing = false
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user