isar / hive

Lightweight and blazing fast key-value database written in pure Dart.
Apache License 2.0
4.1k stars 406 forks source link

Disable Hive storage if Firefox private is detected #1021

Open poka-IT opened 2 years ago

poka-IT commented 2 years ago

This issue has been close but I think this is a Hive issue: https://github.com/hivedb/hive/issues/800

Is it not possible to disable Hive storage if Firefox private is detected ?

techno-disaster commented 2 years ago

you could probably just check if indexedDb is available and not use a different way to store stuff. In most cases you would just prompt the user to change browsers

poka-IT commented 2 years ago

How can I check if indexedDb is available ? If I try import 'dart:indexed_db'; This is undefined, there is tones of issues about it

So I can't use IdbFactory.supported.

techno-disaster commented 2 years ago

How can I check if indexedDb is available ? If I try import 'dart:indexed_db'; This is undefined, there is tones of issues about it

So I can't use IdbFactory.supported.

You can try to import dart:html and try opening indexedDb with window.indexedDb (this will still return a object, so make sure you can modify the db itself)

gokhanmeteerturk commented 1 year ago

Just wanted to note that firefox 115.0 supports indexedDb in private browsing by default now. Release notes can be found here.