mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 02:53:09 +01:00
Fix crash when refreshing feed after importing database or subscriptions
The database was not closed correctly
This commit is contained in:
parent
a73a4afcad
commit
7c3f5a62c5
@ -21,6 +21,7 @@ import androidx.fragment.app.FragmentTransaction;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
|
||||
import org.schabi.newpipe.MainActivity;
|
||||
import org.schabi.newpipe.NewPipeDatabase;
|
||||
import org.schabi.newpipe.R;
|
||||
import org.schabi.newpipe.RouterActivity;
|
||||
import org.schabi.newpipe.about.AboutActivity;
|
||||
@ -608,6 +609,7 @@ public final class NavigationHelper {
|
||||
* @param activity the activity to finish
|
||||
*/
|
||||
public static void restartApp(final Activity activity) {
|
||||
NewPipeDatabase.getInstance(activity).close();
|
||||
activity.finishAffinity();
|
||||
final Intent intent = new Intent(activity, MainActivity.class);
|
||||
activity.startActivity(intent);
|
||||
|
Loading…
Reference in New Issue
Block a user