That fuck shit the fascists are using
at master 39 lines 962 B view raw
1@file:Suppress("DEPRECATION") 2 3package org.tm.archive.components 4 5import android.app.ProgressDialog 6import android.content.Context 7import android.content.DialogInterface 8 9/** 10 * Wraps a normal progress dialog for showing blocking in-progress UI. 11 */ 12class SignalProgressDialog private constructor(val progressDialog: ProgressDialog) { 13 14 val isShowing: Boolean 15 get() = progressDialog.isShowing 16 17 fun hide() { 18 progressDialog.hide() 19 } 20 21 fun dismiss() { 22 progressDialog.dismiss() 23 } 24 25 companion object { 26 @JvmStatic 27 @JvmOverloads 28 fun show( 29 context: Context, 30 title: CharSequence? = null, 31 message: CharSequence? = null, 32 indeterminate: Boolean = false, 33 cancelable: Boolean = false, 34 cancelListener: DialogInterface.OnCancelListener? = null 35 ): SignalProgressDialog { 36 return SignalProgressDialog(ProgressDialog.show(context, title, message, indeterminate, cancelable, cancelListener)) 37 } 38 } 39}