diff --git a/app/src/main/java/net/devemperor/wristassist/activities/CreateImageActivity.java b/app/src/main/java/net/devemperor/wristassist/activities/CreateImageActivity.java index e24cb9c..b36380b 100644 --- a/app/src/main/java/net/devemperor/wristassist/activities/CreateImageActivity.java +++ b/app/src/main/java/net/devemperor/wristassist/activities/CreateImageActivity.java @@ -153,7 +153,7 @@ private void createAndDownloadImage() { imageResult = service.createImage(cir); image = imageResult.getData().get(0); - timer.scheduleAtFixedRate(new TimerTask() { + timer.schedule(new TimerTask() { @Override public void run() { long minutes = (imageResult.getCreated()*1000 + 60*60*1000 - System.currentTimeMillis()) / 60 / 1000; diff --git a/app/src/main/java/net/devemperor/wristassist/activities/OpenImageActivity.java b/app/src/main/java/net/devemperor/wristassist/activities/OpenImageActivity.java index c2e2b95..86e93c3 100644 --- a/app/src/main/java/net/devemperor/wristassist/activities/OpenImageActivity.java +++ b/app/src/main/java/net/devemperor/wristassist/activities/OpenImageActivity.java @@ -84,7 +84,7 @@ protected void onCreate(Bundle savedInstanceState) { styleTv.setVisibility(TextView.GONE); } - timer.scheduleAtFixedRate(new TimerTask() { + timer.schedule(new TimerTask() { @Override public void run() { long minutes = (imageModel.getCreated() + 60*60*1000 - System.currentTimeMillis()) / 60 / 1000; diff --git a/app/src/main/java/net/devemperor/wristassist/adapters/ImageAdapter.java b/app/src/main/java/net/devemperor/wristassist/adapters/ImageAdapter.java index b3939f4..0294e01 100644 --- a/app/src/main/java/net/devemperor/wristassist/adapters/ImageAdapter.java +++ b/app/src/main/java/net/devemperor/wristassist/adapters/ImageAdapter.java @@ -56,7 +56,7 @@ public void onBindViewHolder(@NonNull RecyclerViewHolder holder, final int posit } holder.image.setOnClickListener(v -> { if (callback != null) { - callback.onItemClicked(holder.getAdapterPosition(), holder.image); + callback.onItemClicked(holder.getBindingAdapterPosition(), holder.image); } }); } diff --git a/app/src/main/java/net/devemperor/wristassist/adapters/SavedChatsAdapter.java b/app/src/main/java/net/devemperor/wristassist/adapters/SavedChatsAdapter.java index 7c5af94..c3181dc 100644 --- a/app/src/main/java/net/devemperor/wristassist/adapters/SavedChatsAdapter.java +++ b/app/src/main/java/net/devemperor/wristassist/adapters/SavedChatsAdapter.java @@ -54,12 +54,12 @@ public void onBindViewHolder(RecyclerViewHolder holder, final int position) { holder.savedChatContainer.setOnClickListener(v -> { if (callback != null) { - callback.onItemClicked(holder.getAdapterPosition(), false); + callback.onItemClicked(holder.getBindingAdapterPosition(), false); } }); holder.savedChatContainer.setOnLongClickListener(v -> { if (callback != null) { - callback.onItemClicked(holder.getAdapterPosition(), true); + callback.onItemClicked(holder.getBindingAdapterPosition(), true); } return true; }); diff --git a/app/src/main/java/net/devemperor/wristassist/util/WristAssistUtil.java b/app/src/main/java/net/devemperor/wristassist/util/WristAssistUtil.java index b98d9b2..312d86b 100644 --- a/app/src/main/java/net/devemperor/wristassist/util/WristAssistUtil.java +++ b/app/src/main/java/net/devemperor/wristassist/util/WristAssistUtil.java @@ -77,18 +77,16 @@ public static double calcCostImage(String model, String quality, String size) { public static String translate(Context context, String origin) { switch (origin) { - case "gpt-3.5-turbo": - return "GPT-3.5 Turbo"; case "gpt-4o-mini": return "GPT-4 Omni Mini"; - case "gpt-4-turbo-preview": + case "gpt-4o": + return "GPT-4 Omni"; + case "gpt-4-turbo": return "GPT-4 Turbo"; case "gpt-4": return "GPT-4"; - case "gpt-4-32k": - return "GPT-4 32K"; - case "gpt-4o": - return "GPT-4 Omni"; + case "gpt-3.5-turbo": + return "GPT-3.5 Turbo"; case "dall-e-3": return "DALL-E 3"; case "dall-e-2":