I have a couple activities, while each of them is rather unique, there has to be some common api calls like getCurrentUser() or updateUser()
Given the MVP pattern (I am currently using MVP mosby), since each of these activity only has a single presenter. As i am developing, it seems that sometimes I copy-paste a lot of these common api calls all over these presenters. Say I have api Call A, B, C, D.
A, C are used in presenter 1,
B, D, A are used in presenter 2,
C, E are used in presenter 3 .....
and so on. It is really difficult to find a "common" presenter to inherit from. So the api calls, C and A are basically copy pasted.
My question is, given the current situation, what is the best way to avoid code copy-pasting? Is it almost not avoidable? Or should I try my best to do OOP but risking a bunch of refactoring every time API calls are added/removed from different presenters?