|
|
@@ -10,6 +10,7 @@ import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
|
import com.sheep.gamegroup.util.NetUtil;
|
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
|
+import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
|
|
|
import rx.Subscriber;
|
|
|
|
|
|
@@ -30,6 +31,8 @@ public abstract class SheepSubscriber<T> extends Subscriber<T> {
|
|
|
super.onStart();
|
|
|
Log.i("tag","MySubscriber.onStart()");
|
|
|
//接下来可以检查网络连接等操作
|
|
|
+ if(context == null)
|
|
|
+ context = SheepApp.mContext;
|
|
|
if (!NetUtil.isConnected(context)) {
|
|
|
|
|
|
Toast.makeText(context, "当前网络不可用,请检查网络情况", Toast.LENGTH_SHORT).show();
|