s0nerik / fast_contacts

A faster way of accessing device's contacts list in Flutter
MIT License
15 stars 16 forks source link

fix: crash for getting non existing image for a contact #22

Closed amrgetment closed 3 months ago

amrgetment commented 4 months ago

fix: crash for getting a non-existing image for a contact

the crash

I/flutter (21932): ----------------FIREBASE CRASHLYTICS----------------
I/flutter (21932): PlatformException(, No photo file found for ID 0, java.io.FileNotFoundException: No photo file found for ID 0, null)
I/flutter (21932): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648:7)
I/flutter (21932): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)
I/flutter (21932): <asynchronous suspension>
I/flutter (21932): #2      ContactsPhotosService._getContactImage (package:example/features/contacts_import/data/services/contacts_photos_service.dart:115:9)
I/flutter (21932): <asynchronous suspension>
amrgetment commented 3 months ago

@s0nerik Could you check my PR?

s0nerik commented 3 months ago

Thanks for your contribution, @amrgetment! I'll look into it somewhere closer to the weekend.

Sorry for the delay, just lost the previous notification somehow...

amrgetment commented 3 months ago

No worries, I understand you’re busy in work, good luck and thanks for your effort in this library

s0nerik commented 3 months ago

I've applied the fix from this PR in v3.1.4. Thanks for your contribution!