From debf218fa45a767f4be4fc67bc73ddcbc6de26e9 Mon Sep 17 00:00:00 2001 From: Mohit Sarveiya Date: Thu, 25 Jan 2018 17:47:41 -0500 Subject: [PATCH] Revert resuing VimeoClient instance for initialization --- .../java/com/vimeo/networking/VimeoClient.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/vimeo-networking/src/main/java/com/vimeo/networking/VimeoClient.java b/vimeo-networking/src/main/java/com/vimeo/networking/VimeoClient.java index 03ded01e8..27e79f414 100644 --- a/vimeo-networking/src/main/java/com/vimeo/networking/VimeoClient.java +++ b/vimeo-networking/src/main/java/com/vimeo/networking/VimeoClient.java @@ -137,23 +137,10 @@ public static VimeoClient getInstance() { } public static void initialize(@NotNull Configuration configuration) { - if (sSharedInstance != null) { - sSharedInstance.mConfiguration.deleteAccount(sSharedInstance.mVimeoAccount); - sSharedInstance.setup(configuration); - } else { - sSharedInstance = new VimeoClient(configuration); - } + sSharedInstance = new VimeoClient(configuration); } private VimeoClient(@NotNull Configuration configuration) { - setup(configuration); - } - - /** - * Setup Retrofit object, API service and cache object to make requests. - * This setup is done when a new {@link Configuration} object is initialized. - */ - private void setup(final Configuration configuration) { mConfiguration = configuration; mConfiguration.mInterceptors.add(mBaseUrlInterceptor); mCache = mConfiguration.getCache();