mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 14:27:57 +01:00 
			
		
		
		
	Rewrote Backup (#650)
* Rewrote Backup * Save automatic backups with datetime * Minor improvements * Remove suggested directories for backup and hardcoded strings. Rename JSON -> Backup * Bugfix * Fix tests * Run restore inside a transaction, use external cache dir for log and other minor changes
This commit is contained in:
		
				
					committed by
					
						 inorichi
						inorichi
					
				
			
			
				
	
			
			
			
						parent
						
							3094d084d6
						
					
				
				
					commit
					0642889b64
				
			| @@ -0,0 +1,33 @@ | ||||
| package eu.kanade.tachiyomi.widget | ||||
|  | ||||
| import android.support.v7.widget.RecyclerView | ||||
| import android.view.ViewGroup | ||||
| import com.nononsenseapps.filepicker.AbstractFilePickerFragment | ||||
| import com.nononsenseapps.filepicker.FilePickerActivity | ||||
| import com.nononsenseapps.filepicker.FilePickerFragment | ||||
| import com.nononsenseapps.filepicker.LogicHandler | ||||
| import eu.kanade.tachiyomi.R | ||||
| import eu.kanade.tachiyomi.util.inflate | ||||
| import java.io.File | ||||
|  | ||||
| class CustomLayoutPickerActivity : FilePickerActivity() { | ||||
|  | ||||
|     override fun getFragment(startPath: String?, mode: Int, allowMultiple: Boolean, allowCreateDir: Boolean): | ||||
|             AbstractFilePickerFragment<File> { | ||||
|         val fragment = CustomLayoutFilePickerFragment() | ||||
|         fragment.setArgs(startPath, mode, allowMultiple, allowCreateDir) | ||||
|         return fragment | ||||
|     } | ||||
| } | ||||
|  | ||||
| class CustomLayoutFilePickerFragment : FilePickerFragment() { | ||||
|     override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { | ||||
|         when (viewType) { | ||||
|             LogicHandler.VIEWTYPE_DIR -> { | ||||
|                 val view = parent.inflate(R.layout.listitem_dir) | ||||
|                 return DirViewHolder(view) | ||||
|             } | ||||
|             else -> return super.onCreateViewHolder(parent, viewType) | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user