refactor: Structure files in more directories

This commit is contained in:
Christian Pauly 2021-05-22 09:24:39 +02:00
commit 988a691eeb
35 changed files with 55 additions and 55 deletions

View file

@ -0,0 +1,38 @@
import 'package:famedlysdk/famedlysdk.dart';
import 'package:famedlysdk/encryption.dart';
import 'package:matrix_api_lite/fake_matrix_api.dart';
import '../platform_infos.dart';
import '../famedlysdk_store.dart';
class FluffyClient extends Client {
static FluffyClient _instance;
/// The ID of the currently active room, if there is one. May be null or emtpy
String activeRoomId;
factory FluffyClient({testMode = false}) {
_instance ??= FluffyClient._internal(testMode: testMode);
return _instance;
}
FluffyClient._internal({testMode = false})
: super(
testMode ? 'FluffyChat Widget Tests' : PlatformInfos.clientName,
httpClient: testMode ? FakeMatrixApi() : null,
enableE2eeRecovery: true,
verificationMethods: {
KeyVerificationMethod.numbers,
if (PlatformInfos.isMobile || PlatformInfos.isLinux)
KeyVerificationMethod.emoji,
},
importantStateEvents: <String>{
'im.ponies.room_emotes', // we want emotes to work properly
},
databaseBuilder: testMode ? null : getDatabase,
supportedLoginTypes: {
AuthenticationTypes.password,
if (PlatformInfos.isMobile || PlatformInfos.isWeb)
AuthenticationTypes.sso
},
);
}