-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Session sharing functionality was implemented. #1029
✨ Session sharing functionality was implemented. #1029
Conversation
Hi @Corvus400! Codes seem to be unformatted. To resolve this issue, please run |
.setType("text/plain") | ||
.startChooser() | ||
} catch (e: ActivityNotFoundException) { | ||
Log.e("ActivityNotFoundException", "Fail startActivity", e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use Kermit for logging. Logger.e
Please check it out 🙏
/** | ||
* Platform sharing feature wrapper | ||
*/ | ||
interface ShareManager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we won't use this this year for other platforms. So how about removing this and rename AndroidShareManager with ShareStarter
or ShareLauncher
or ShareNavigator
?
Snapshot diff report
|
@@ -284,6 +292,14 @@ private class ExternalNavController( | |||
context.startActivity(Intent(context, OssLicensesMenuActivity::class.java)) | |||
} | |||
|
|||
fun onShareClick(timeTableItem: TimetableItem) { | |||
shareNavigator.share( | |||
"[${timeTableItem.room.name.currentLangTitle}] ${timeTableItem.startsTimeString} - ${timeTableItem.endsTimeString}\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding date info too? 👀
Perhaps, we are referring the formatted datetime property on the detail screen, so we may reuse it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Corvus400
Ah, sorry. My intention was to use timetableItem.formattedDateTimeString
🙇♂️
I think it is not suitable to use getDropDownText
here since it is literally prepared for the drop down menu.
On the other hand, the value of timetableItem.formattedDateTimeString
was much longer than I originally expected. This is just an optional, so please revert it if it is difficult to add date info in a simple way 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tkhs0604
It seems that we can add a method to get only month and date by adding it to TimetableItem.kt.
However, I felt it was a bit redundant to add a method that is only used for the share function, so I decided to revert to the original method. 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can tweet post by this! Thanks! 🐦
@tkhs0604 Please merge when you like! |
This reverts commit 66b0144.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for bothering you, and thank you for implementing nice share function! 📪
Issue
Overview (Required)
Links
Movie (Optional)
share.mp4