Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ android {
applicationId = "ltd.grunt.brainwallet"
minSdk = 29
targetSdk = 34
versionCode = 202503031
versionName = "v4.3.1"
versionCode = 202503221
versionName = "v4.4.0"

multiDexEnabled = true
base.archivesName.set("${defaultConfig.versionName}(${defaultConfig.versionCode})")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import com.brainwallet.presenter.activities.util.BRActivity;
import com.brainwallet.presenter.customviews.BRNotificationBar;
import com.brainwallet.presenter.fragments.BuyTabFragment;
import com.brainwallet.presenter.fragments.FragmentMoonpay;
import com.brainwallet.presenter.history.HistoryFragment;
import com.brainwallet.tools.animation.BRAnimator;
import com.brainwallet.tools.animation.TextSizeTransition;
Expand Down Expand Up @@ -240,6 +241,7 @@ private void setListeners() {
public boolean handleNavigationItemSelected(int menuItemId) {
if (mSelectedBottomNavItem == menuItemId) return true;
mSelectedBottomNavItem = menuItemId;

//TODO: revisit
// we are using compose, that's why commented, will remove it after fully migrated to compose
if (menuItemId == R.id.nav_history) {
Expand All @@ -254,8 +256,12 @@ public boolean handleNavigationItemSelected(int menuItemId) {
BRAnimator.showReceiveFragment(BreadActivity.this, true);
}
mSelectedBottomNavItem = 0;
} else if (menuItemId == R.id.nav_buy) {
ExtensionKt.replaceFragment(BreadActivity.this, new BuyTabFragment(), false, R.id.fragment_container);
}
else if (menuItemId == R.id.nav_buy) {
if (BRAnimator.isClickAllowed()) {
BRAnimator.showMoonpayFragment(BreadActivity.this);
}
mSelectedBottomNavItem = 0;
}
return true;
}
Expand Down
45 changes: 0 additions & 45 deletions app/src/main/java/com/brainwallet/presenter/entities/Partner.java

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,28 @@
import androidx.recyclerview.widget.RecyclerView;

import com.brainwallet.R;
import com.brainwallet.presenter.entities.Partner;
import com.brainwallet.presenter.fragments.BuyPartnersAdapter;
import com.brainwallet.presenter.fragments.FragmentBuy;
import com.brainwallet.tools.manager.AnalyticsManager;
import com.brainwallet.tools.util.BRConstants;

import java.util.ArrayList;
import java.util.List;

public class BuyTabFragment extends Fragment {

private RecyclerView mRecyclerView;

@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_buy_tab, container, false);
return null;
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);

mRecyclerView = view.findViewById(R.id.recycler_view);

mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));

DividerItemDecoration itemDecor = new DividerItemDecoration(mRecyclerView.getContext(), DividerItemDecoration.VERTICAL);
itemDecor.setDrawable(ContextCompat.getDrawable(mRecyclerView.getContext(), R.drawable.divider_white_shape));
mRecyclerView.addItemDecoration(itemDecor);

mRecyclerView.setAdapter(new com.brainwallet.presenter.fragments.BuyPartnersAdapter(getContext(), getPartners()));
AnalyticsManager.logCustomEvent(BRConstants._20191105_DTBT);
}

private List<Partner> getPartners() {
List<Partner> partners = new ArrayList<>();
partners.add(new Partner(R.drawable.ic_moonpay_logo, R.string.BuyCenter_moonpay_Title, R.string.BuyCenter_moonpay_FinancialDetails, FragmentBuy.Partner.MOONPAY));
return partners;
}
}
Loading