mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Add user restore method selection plumbing to old device.
This commit is contained in:
committed by
Greyson Parrelli
parent
b6bb3928e7
commit
75f0d3363b
@@ -1,35 +0,0 @@
|
||||
package org.thoughtcrime.securesms.devicetransfer.newdevice;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.signal.devicetransfer.TransferStatus;
|
||||
import org.thoughtcrime.securesms.LoggingFragment;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.util.navigation.SafeNavigation;
|
||||
|
||||
/**
|
||||
* Shows instructions for new device to being transfer.
|
||||
*/
|
||||
public final class NewDeviceTransferInstructionsFragment extends LoggingFragment {
|
||||
public NewDeviceTransferInstructionsFragment() {
|
||||
super(R.layout.new_device_transfer_instructions_fragment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
view.findViewById(R.id.new_device_transfer_instructions_fragment_continue)
|
||||
.setOnClickListener(v -> SafeNavigation.safeNavigate(Navigation.findNavController(v), R.id.action_device_transfer_setup));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
EventBus.getDefault().removeStickyEvent(TransferStatus.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package org.thoughtcrime.securesms.devicetransfer.newdevice
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.signal.devicetransfer.TransferStatus
|
||||
import org.thoughtcrime.securesms.LoggingFragment
|
||||
import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.util.navigation.safeNavigate
|
||||
|
||||
/**
|
||||
* Shows instructions for new device to being transfer.
|
||||
*/
|
||||
class NewDeviceTransferInstructionsFragment : LoggingFragment(R.layout.new_device_transfer_instructions_fragment) {
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
view
|
||||
.findViewById<View>(R.id.new_device_transfer_instructions_fragment_continue)
|
||||
.setOnClickListener { findNavController().safeNavigate(R.id.action_device_transfer_setup) }
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
EventBus.getDefault().removeStickyEvent(TransferStatus::class.java)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user