Fixed crash when adding tunnel to empty list
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
0.9.26
|
||||
* Fixed "I2CP already listening" bug
|
||||
* Fixed crash when adding tunnel to empty list
|
||||
|
||||
0.9.25 / 2016-04-17 / 46d45a878a2b73394b26ca27dbe6c696dedcf1c3
|
||||
* Fixed a bug on Samsung Android 4.2 devices
|
||||
|
@ -65,8 +65,13 @@ public class TunnelEntryAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
||||
}
|
||||
|
||||
public void addTunnel(TunnelEntry tunnel) {
|
||||
boolean wasEmpty = mTunnels.isEmpty();
|
||||
mTunnels.add(tunnel);
|
||||
notifyItemInserted(mTunnels.size()-1);
|
||||
if (wasEmpty) {
|
||||
notifyDataSetChanged();
|
||||
} else {
|
||||
notifyItemInserted(mTunnels.size() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
public TunnelEntry getTunnel(int position) {
|
||||
|
Reference in New Issue
Block a user