Skip to content

Commit c85bfb6

Browse files
committed
解决分享后删除按钮失灵的bug
1 parent 8f62b13 commit c85bfb6

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

blockcanary-android/src/main/java/com/github/moduth/blockcanary/ui/DisplayActivity.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -296,18 +296,18 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
296296
}
297297
mActionButton.setVisibility(VISIBLE);
298298
mActionButton.setText(R.string.block_canary_delete);
299-
mActionButton.setOnClickListener(new View.OnClickListener() {
300-
@Override
301-
public void onClick(View v) {
302-
if (blockInfo != null) {
303-
blockInfo.logFile.delete();
304-
mBlockStartTime = null;
305-
mBlockInfoEntries.remove(blockInfo);
306-
updateUi();
307-
}
308-
}
309-
});
310299
}
300+
mActionButton.setOnClickListener(new View.OnClickListener() {
301+
@Override
302+
public void onClick(View v) {
303+
if (blockInfo != null) {
304+
blockInfo.logFile.delete();
305+
mBlockStartTime = null;
306+
mBlockInfoEntries.remove(blockInfo);
307+
updateUi();
308+
}
309+
}
310+
});
311311
adapter.update(blockInfo);
312312
setTitle(getString(R.string.block_canary_class_has_blocked, blockInfo.timeCost));
313313
}

0 commit comments

Comments
 (0)