Release 2.35.3

This commit is contained in:
Thomas 2020-05-07 17:02:07 +02:00
parent db69b02f5f
commit daab98b84f
6 changed files with 17 additions and 22 deletions

View File

@ -1,2 +1,3 @@
Fixed: Fixed:
- Fix last remaining issues - Fix an issue with banana.dog instance
- Fix some other issues.

View File

@ -157,6 +157,7 @@ import app.fedilab.android.sqlite.TimelineCacheDAO;
import app.fedilab.android.sqlite.TimelinesDAO; import app.fedilab.android.sqlite.TimelinesDAO;
import es.dmoral.toasty.Toasty; import es.dmoral.toasty.Toasty;
import static app.fedilab.android.activities.WebviewActivity.trackingDomains;
import static app.fedilab.android.asynctasks.ManageFiltersAsyncTask.action.GET_ALL_FILTER; import static app.fedilab.android.asynctasks.ManageFiltersAsyncTask.action.GET_ALL_FILTER;
import static app.fedilab.android.helper.Helper.changeDrawableColor; import static app.fedilab.android.helper.Helper.changeDrawableColor;
@ -1677,6 +1678,9 @@ public abstract class BaseMainActivity extends BaseActivity
} }
}); });
} }
if( trackingDomains != null){
trackingDomains = null;
}
if (hidde_menu != null) if (hidde_menu != null)
LocalBroadcastManager.getInstance(BaseMainActivity.this).unregisterReceiver(hidde_menu); LocalBroadcastManager.getInstance(BaseMainActivity.this).unregisterReceiver(hidde_menu);
if (update_topbar != null) if (update_topbar != null)

View File

@ -153,6 +153,11 @@ public class SettingsActivity extends BaseActivity {
} }
@Override
public void onDestroy(){
super.onDestroy();
}
private void showDialog() { private void showDialog() {
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(SettingsActivity.this); AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(SettingsActivity.this);
dialogBuilder.setMessage(R.string.restart_message); dialogBuilder.setMessage(R.string.restart_message);

View File

@ -33,6 +33,7 @@ import java.util.List;
import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.HttpsURLConnection;
import app.fedilab.android.R; import app.fedilab.android.R;
import app.fedilab.android.helper.Helper;
import app.fedilab.android.sqlite.DomainBlockDAO; import app.fedilab.android.sqlite.DomainBlockDAO;
import app.fedilab.android.sqlite.Sqlite; import app.fedilab.android.sqlite.Sqlite;
import es.dmoral.toasty.Toasty; import es.dmoral.toasty.Toasty;
@ -61,12 +62,10 @@ public class DownloadTrackingDomainsAsyncTask extends AsyncTask<Void, Void, Bool
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream())); BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line; String line;
List<String> domains = new ArrayList<>(); List<String> domains = new ArrayList<>();
boolean canRecord = false;
while ((line = br.readLine()) != null) { while ((line = br.readLine()) != null) {
if (canRecord) if (line.startsWith("0.0.0.0 ")) {
domains.add(line.replace("0.0.0.0 ", "").trim()); domains.add(line.replace("0.0.0.0 ", "").trim());
else if (line.contains("# Blocked domains")) }
canRecord = true;
} }
br.close(); br.close();
connection.disconnect(); connection.disconnect();

View File

@ -134,13 +134,6 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
private EditText your_api_key; private EditText your_api_key;
private int style; private int style;
public static ContentSettingsFragment newInstance(int resId) {
ContentSettingsFragment contentFragment = new ContentSettingsFragment();
Bundle bundle = new Bundle();
bundle.putInt(Integer.class.getName(), resId);
contentFragment.setArguments(bundle);
return contentFragment;
}
//From: https://gist.github.com/asifmujteba/d89ba9074bc941de1eaa#file-asfurihelper //From: https://gist.github.com/asifmujteba/d89ba9074bc941de1eaa#file-asfurihelper
@TargetApi(Build.VERSION_CODES.KITKAT) @TargetApi(Build.VERSION_CODES.KITKAT)
@ -295,13 +288,6 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
} }
} }
@Override
public void onViewCreated(@NotNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
context = getContext();
assert context != null;
}
@Override @Override
public void onActivityResult(int requestCode, int resultCode, Intent data) { public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != RESULT_OK) return; if (resultCode != RESULT_OK) return;
@ -357,7 +343,7 @@ public class ContentSettingsFragment extends Fragment implements OnRetrieveRemot
if (bundle != null) { if (bundle != null) {
type = (type) bundle.getSerializable("typeOfSettings"); type = (type) bundle.getSerializable("typeOfSettings");
} }
context = getActivity();
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE); SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, MODE_PRIVATE);
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);

View File

@ -27,6 +27,7 @@ import java.util.List;
* Created by Thomas on 14/02/2019. * Created by Thomas on 14/02/2019.
* Manage domain block in DB * Manage domain block in DB
*/ */
@SuppressWarnings("unused")
public class DomainBlockDAO { public class DomainBlockDAO {
public Context context; public Context context;
@ -50,8 +51,7 @@ public class DomainBlockDAO {
values.put(Sqlite.COL_DOMAIN, domain); values.put(Sqlite.COL_DOMAIN, domain);
try { try {
db.insert(Sqlite.TABLE_TRACKING_BLOCK, null, values); db.insert(Sqlite.TABLE_TRACKING_BLOCK, null, values);
} catch (Exception ignored) { } catch (Exception ignored) {}
}
} }
/** /**