Quivr / Android-Week-View

Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.
Apache License 2.0
258 stars 64 forks source link

Question: why deprecate the identifier of long, in favor of String? #101

Open AndroidDeveloperLB opened 6 years ago

AndroidDeveloperLB commented 6 years ago

Wouldn't a Long be better? Or maybe String is actually what's used on popular calendars events ids ?

jhoobergs commented 6 years ago

I think that the iOS calendar app uses strings, so they are not compatible with the Long we used.

AndroidDeveloperLB commented 6 years ago

You mean the IOS calendar app uses a string from the server?

jhoobergs commented 6 years ago

If you want to load the calendars from the phone on iOS, they use strings as id's. So if you want to show those events in the weekview, it would be hard.

BerndSchrooten commented 6 years ago

I can understand why this sounds strange, but we use this library in conjunction with an iOS version in our React Native app. That's why @jhoobergs mentions iOS. However, also Google uses a String as the format of their event identifiers.

AndroidDeveloperLB commented 6 years ago

How odd. Anyway, it's actually not a hard thing to have, to convert from unique String to unique long. You just have to manage a HashMap<String,Long> .

AndroidDeveloperLB commented 6 years ago

@jhoobergs I think it's better to remove the long-ids, then. Why deprecate it, if String is the way to go for those popular calendars... Whoever uses the library can just convert from Long to String, if that's needed. I don't think it's the role of the library to do it.