You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$500] Android - Log-Unable to share log as tapping on conversation does not trigger any action #38209
@stephanieelliott I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
changed the title [-]Android - Log-Unable to share log as tapping on conversation does not trigger any action[/-][+][$500] Android - Log-Unable to share log as tapping on conversation does not trigger any action[/+]on Mar 14, 2024
// Assuming this is within an Adapter for a RecyclerView
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
Conversation conversation = conversations.get(position);
holder.itemView.setOnClickListener(v -> {
Intent intent = new Intent(context, ConversationActivity.class);
intent.putExtra("logData", logData); // Assume logData is a String or serializable object
context.startActivity(intent);
});
}
In your ConversationActivity, you would then retrieve the log data:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_conversation);
// Retrieve the log data
String logData = getIntent().getStringExtra("logData");
// Now you can use logData, e.g., display it or attach it to a message
}
📣 @Eros472! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
In navigateToAndOpenReport, we'll pass an option parameter file and then have the below logic after openReport call to add attachment before navigating.
-function navigateToAndOpenReport(userLogins: string[], shouldDismissModal = true) {+function navigateToAndOpenReport(userLogins: string[], shouldDismissModal = true, file: File = undefined) {
let newChat: ReportUtils.OptimisticChatReport | EmptyObject = {};
const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins(userLogins);
const chat = ReportUtils.getChatByParticipants(participantAccountIDs);
if (!chat) {
newChat = ReportUtils.buildOptimisticChatReport(participantAccountIDs);
}
const report = chat ?? newChat;
// We want to pass newChat here because if anything is passed in that param (even an existing chat), we will try to create a chat on the server
openReport(report.reportID, userLogins, newChat);
+ if (file && report.reportID) {+ addAttachment(report.reportID, file, '');+ }
if (shouldDismissModal) {
Navigation.dismissModalWithReport(report);
} else {
Navigation.navigateWithSwitchPolicyID({route: ROUTES.HOME});
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report.reportID));
}
}
The above was for the web code.
Similar thing can be done for the native code as well.
Activity
melvin-bot commentedon Mar 13, 2024
Triggered auto assignment to @stephanieelliott (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.izarutskaya commentedon Mar 13, 2024
@stephanieelliott I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
shahinyan11 commentedon Mar 13, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Log-Unable to share log as tapping on conversation does not trigger any action
What is the root cause of that problem?
Here we return early if
reportIDis not exist. And this can happen if users have not had conversation beforeWhat changes do you think we should make in order to solve the problem?
Create new report if there is not exist old one. To do that we can do below steps
return report.reportIDat the end of the navigateToAndOpenReport function.What alternative solutions did you explore? (Optional)
callbackparam for navigateToAndOpenReport function. And add following codecallback?.(report.reportID)after this line[-]Android - Log-Unable to share log as tapping on conversation does not trigger any action[/-][+][$500] Android - Log-Unable to share log as tapping on conversation does not trigger any action[/+]melvin-bot commentedon Mar 14, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01c66f93b0f705d0fa
melvin-bot commentedon Mar 14, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (
External)stephanieelliott commentedon Mar 14, 2024
Yea I think this may be a BE issue -- @situchan can you help me confirm?
situchan commentedon Mar 14, 2024
This is frontend issue
situchan commentedon Mar 14, 2024
@shahinyan11 does this happen only on android or all platforms?
shahinyan11 commentedon Mar 14, 2024
On all platforms
Erick4725 commentedon Mar 15, 2024
In your ConversationActivity, you would then retrieve the log data:
melvin-bot commentedon Mar 15, 2024
📣 @Eros472! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
ShridharGoel commentedon Mar 16, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Unable to share log as tapping on conversation does not trigger any action.
What is the root cause of that problem?
When selecting a user with no existing report, the report ID in the
optionis null which leads to no navigation based on the existing logic.App/src/pages/settings/AboutPage/ShareLogList/BaseShareLogList.tsx
Lines 106 to 114 in f84219f
App/src/pages/settings/AboutPage/ShareLogList/index.native.tsx
Lines 9 to 18 in f84219f
What changes do you think we should make in order to solve the problem?
The report ID check can be removed.
Instead of having reportID in
onAttachLogToReport, we will have option and then callnavigateToAndOpenReportwith the file.In navigateToAndOpenReport, we'll pass an option parameter file and then have the below logic after
openReportcall to add attachment before navigating.The above was for the web code.
Similar thing can be done for the native code as well.
stephanieelliott commentedon Mar 19, 2024
Closing this based on the updated guidance, I think this is somewhat low ROI and can be fixed later when we move to the polish phase.