Fix typo
This commit is contained in:
parent
9d3c2583c3
commit
cceace8e65
|
@ -560,7 +560,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
if( status.getPoll() != null && status.getPoll().getOptionsList() != null ){
|
if( status.getPoll() != null && status.getPoll().getOptionsList() != null ){
|
||||||
Poll poll = status.getPoll();
|
Poll poll = status.getPoll();
|
||||||
int choiceCount = status.getPoll().getOptionsList().size();
|
int choiceCount = status.getPoll().getOptionsList().size();
|
||||||
if( poll.isVoted()){
|
if( poll.isVoted() || poll.isExpired()){
|
||||||
holder.rated.setVisibility(View.VISIBLE);
|
holder.rated.setVisibility(View.VISIBLE);
|
||||||
List<BarItem> items = new ArrayList<>();
|
List<BarItem> items = new ArrayList<>();
|
||||||
int greaterValue = 0;
|
int greaterValue = 0;
|
||||||
|
|
|
@ -57,25 +57,9 @@ public class MastalabWebViewClient extends WebViewClient {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WebResourceResponse shouldInterceptRequest (final WebView view, String url) {
|
public WebResourceResponse shouldInterceptRequest (final WebView view, String url) {
|
||||||
URI uri;
|
if( WebviewActivity.trackingDomains != null){
|
||||||
try {
|
URI uri;
|
||||||
uri = new URI(url);
|
|
||||||
String domain = uri.getHost();
|
|
||||||
if( domain != null) {
|
|
||||||
domain = domain.startsWith("www.") ? domain.substring(4) : domain;
|
|
||||||
}
|
|
||||||
if (domain != null && WebviewActivity.trackingDomains.contains(domain)) {
|
|
||||||
if( activity instanceof WebviewActivity){
|
|
||||||
count++;
|
|
||||||
domains.add(url);
|
|
||||||
((WebviewActivity)activity).setCount(activity, String.valueOf(count));
|
|
||||||
}
|
|
||||||
ByteArrayInputStream nothing = new ByteArrayInputStream("".getBytes());
|
|
||||||
return new WebResourceResponse("text/plain", "utf-8", nothing);
|
|
||||||
}
|
|
||||||
} catch (URISyntaxException e) {
|
|
||||||
try {
|
try {
|
||||||
url = url.substring(0,50);
|
|
||||||
uri = new URI(url);
|
uri = new URI(url);
|
||||||
String domain = uri.getHost();
|
String domain = uri.getHost();
|
||||||
if( domain != null) {
|
if( domain != null) {
|
||||||
|
@ -89,11 +73,30 @@ public class MastalabWebViewClient extends WebViewClient {
|
||||||
}
|
}
|
||||||
ByteArrayInputStream nothing = new ByteArrayInputStream("".getBytes());
|
ByteArrayInputStream nothing = new ByteArrayInputStream("".getBytes());
|
||||||
return new WebResourceResponse("text/plain", "utf-8", nothing);
|
return new WebResourceResponse("text/plain", "utf-8", nothing);
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (URISyntaxException ignored) {
|
} catch (URISyntaxException e) {
|
||||||
ignored.printStackTrace();
|
try {
|
||||||
} }
|
url = url.substring(0, 50);
|
||||||
|
uri = new URI(url);
|
||||||
|
String domain = uri.getHost();
|
||||||
|
if (domain != null) {
|
||||||
|
domain = domain.startsWith("www.") ? domain.substring(4) : domain;
|
||||||
|
}
|
||||||
|
if (domain != null && WebviewActivity.trackingDomains.contains(domain)) {
|
||||||
|
if (activity instanceof WebviewActivity) {
|
||||||
|
count++;
|
||||||
|
domains.add(url);
|
||||||
|
((WebviewActivity) activity).setCount(activity, String.valueOf(count));
|
||||||
|
}
|
||||||
|
ByteArrayInputStream nothing = new ByteArrayInputStream("".getBytes());
|
||||||
|
return new WebResourceResponse("text/plain", "utf-8", nothing);
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch (URISyntaxException ignored) {
|
||||||
|
ignored.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return super.shouldInterceptRequest(view, url);
|
return super.shouldInterceptRequest(view, url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue