Skip to content

Commit 876e923

Browse files
author
hyb1996
committed
修复 社区Tab崩溃的问题
1 parent 402a78c commit 876e923

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed
0 Bytes
Binary file not shown.

app/src/main/java/org/autojs/autojs/build/TinySign.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private static String writeMF(File dir, Manifest manifest, ZipOutputStream zos)
131131
zipAndSha1(dir, zos, dos, manifest);
132132
Attributes main = manifest.getMainAttributes();
133133
main.putValue("Manifest-Version", "1.0");
134-
main.putValue("Created-By", "tiny-sign-" + TinySign.class.getPackage().getImplementationVersion());
134+
main.putValue("Created-By", "Auto.js");
135135
zos.putNextEntry(new ZipEntry("META-INF/MANIFEST.MF"));
136136
manifest.write(dos);
137137
zos.closeEntry();

app/src/main/java/org/autojs/autojs/ui/main/community/CommunityFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ public void onDestroy() {
129129
@Override
130130
public void onPageShow() {
131131
super.onPageShow();
132-
EventBus.getDefault().post(new VisibilityChange(true));
132+
//EventBus.getDefault().post(new VisibilityChange(true));
133133
}
134134

135135
@Override
136136
public void onPageHide() {
137137
super.onPageHide();
138-
EventBus.getDefault().post(new VisibilityChange(false));
138+
//EventBus.getDefault().post(new VisibilityChange(false));
139139
}
140140
}

app/src/main/java/org/autojs/autojs/ui/main/drawer/CommunityDrawerMenu.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private void refreshUserStatus(DrawerMenuAdapter adapter) {
6868
if (online) {
6969
refreshNotificationCount(adapter);
7070
}
71-
});
71+
}, Throwable::printStackTrace);
7272

7373
}
7474

app/src/main/java/org/autojs/autojs/ui/main/market/MarketFragment.kt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,15 @@ class MarketFragment : ViewPagerFragment(0) {
4444
private fun refresh() {
4545
GlobalScope.launch(Dispatchers.Main) {
4646
swipeRefreshLayout.isRefreshing = true
47-
val topics = TopicService.getScriptsTopics()
48-
mTopics.clear()
49-
mTopics.addAll(topics)
50-
topicsView.adapter!!.notifyDataSetChanged()
51-
swipeRefreshLayout.isRefreshing = false
47+
try {
48+
val topics = TopicService.getScriptsTopics()
49+
mTopics.clear()
50+
mTopics.addAll(topics)
51+
topicsView.adapter!!.notifyDataSetChanged()
52+
swipeRefreshLayout.isRefreshing = false
53+
} catch (e: Exception) {
54+
e.printStackTrace()
55+
}
5256
}
5357
}
5458

0 commit comments

Comments
 (0)